Alias help needed...

Post » Sun Nov 18, 2012 6:13 am

I have an alias somepoorslob in a quest say called quest1 that is someone that matches the criteria in the cell. somepoorslob is marked optional.

I have another quest with an actor who is both an alias and an actor I know fills that alias that I want to be able to have that actor start combat with the somepoorslob.


How do I I refer to the Alias somepoorslob correctly I cant seem to do it in the quest fragment or a script attached to the quest with out getting GetActorReference() is not a function

same with getref() or getactorref()

HELP !!!! :swear:
User avatar
Red Sauce
 
Posts: 3431
Joined: Fri Aug 04, 2006 1:35 pm

Post » Sun Nov 18, 2012 5:29 am

There are at least two possible methods:

1) Define a referencealias property and fill it with the somepoorslob alias.

2) Define a quest property, fill it with quest1, and use http://www.creationkit.com/GetAlias_-_Quest.
User avatar
Joanne Crump
 
Posts: 3457
Joined: Sat Jul 22, 2006 9:44 am

Post » Sun Nov 18, 2012 1:40 pm

Well I defined the quest alias as someone in the cell and I can look at the alias but I need to get the alias actor reference and when I try within a dialog fragment or if I try from a script attached to the quest with the alias I get

GetActorReference() is not a function

same with getref() or getactorref()
User avatar
!beef
 
Posts: 3497
Joined: Wed Aug 16, 2006 4:41 pm

Post » Sun Nov 18, 2012 3:12 am

http://www.creationkit.com/GetReference_-_ReferenceAlias

That should work
myActorIs = myAlias.GetReference()

BUT, it must be used on a script that extends ReferenceAlias (I think!). So, for a script in your quest, just make sure that script is extending the right thing.

But/So, it may not work from dialogue fragments.

HOWEVER: In a dialogue fragment, can use the target/speaker variable? ... depending on exactly what you are doing? If you can, you could try using akSpeaker (or akSpeaker.GetReference()) ... maybe that will work? (I never tried, as far as I remember)
User avatar
Bethany Short
 
Posts: 3450
Joined: Fri Jul 14, 2006 11:47 am

Post » Sun Nov 18, 2012 9:49 am

Ok I try this


ScriptName SatireFindtheactor extends Alias
Alias Alias_PoorSlob
ObjectReference theTarget
Actor theActor

Function Setpoorslob()

theActor = Alias_PoorSlob.GetActorReference() ; Does not matter if I reverse theactor with thetarget use with either getactorref ???
theTarget = Alias_PoorSlob.GetActorRef()

endfunction

and get this

Starting 1 compile threads for 1 files...
Compiling "SatireFindtheactor"...
c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\SatireFindtheactor.psc(8,27): GetActorReference is not a function or does not exist
c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\SatireFindtheactor.psc(9,27): GetActorRef is not a function or does not exist
No output generated for SatireFindtheactor, compilation failed.

Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on SatireFindtheactor

if I change extends Alias to extends ReferenceAlias I get the same thing ???
User avatar
Eliza Potter
 
Posts: 3481
Joined: Mon Mar 05, 2007 3:20 am

Post » Sun Nov 18, 2012 10:59 am

Perhaps the second line should be ReferenceAlias Alias_PoorSlob?

In addition, ReferenceAliases are generally declared as properties.
User avatar
Alexxxxxx
 
Posts: 3417
Joined: Mon Jul 31, 2006 10:55 am

Post » Sun Nov 18, 2012 6:51 am

You need to cast the Alias as ReferenceAlias type :

theActor = (Alias_PoorSlob as ReferenceAlias).GetActorReference()theTarget = (Alias_PoorSlob as ReferenceAlias).GetActorRef()
User avatar
stephanie eastwood
 
Posts: 3526
Joined: Thu Jun 08, 2006 1:25 pm

Post » Sun Nov 18, 2012 3:56 pm

Yes that worked ReferenceAlias Thanks for all the help... Your all top notch in my book..


Sometimes when you stare at the screen you miss what everyone around you can see... "YOU"
User avatar
Red Sauce
 
Posts: 3431
Joined: Fri Aug 04, 2006 1:35 pm


Return to V - Skyrim