Reference an Actor from Script A in Script B?

Post » Tue Nov 20, 2012 12:49 pm

I'm using an OnActivate Choice to capture an Actor Reference.

What I can't do is then use that ActorReference in the Script I want. I thought I used this code:

MyQuest Property MyQuestScript AutoObjectReference ActivateTargetActivateTarget = akTargetRefMyQuest.MyTarget = ActivateTarget

But that returns an error about "No viable alternative at input property". If I remove "MyQuest Property MyQuestScript Auto" I get told "MyQuest" is not defined, but nothing I do seems to define it... Can anyone help me work this out, please?
User avatar
Leticia Hernandez
 
Posts: 3426
Joined: Tue Oct 23, 2007 9:46 am

Post » Tue Nov 20, 2012 2:55 pm

Instead of Myquest property MyquestScript Auto, you should use Myquestscript property myquest auto.

But you need to select an instance of myquestproperty. Right now myquest is a void myquestscript property waiting to be filled

I think this is what you are looking for:
Quest Property MyQuest  AutoObjectReference ActivateTargetActivateTarget = akTargetRef(MyQuest as MyQuestScript).MyTarget = ActivateTarget
User avatar
Oyuki Manson Lavey
 
Posts: 3438
Joined: Mon Aug 28, 2006 2:47 am

Post » Tue Nov 20, 2012 6:52 am

Thanks for your help :) I had to do a bit of messing around since it wouldn't accept the Variable/Defines at first, but now it is and it all works :D
User avatar
Jesus Duran
 
Posts: 3444
Joined: Wed Aug 15, 2007 12:16 am


Return to V - Skyrim