David Brasher Posted May 25, 2012 Share Posted May 25, 2012 (edited) I want a script on a reference which is an activator object to call a function in my quest script. Scriptname AAMyQuestScript extends Quest Function AAMyAction() ; Do Stuff. End Function Scriptname AAMyActivatorScript ObjectReference Event OnActivate (ObjectReference akActionRef) AAMyQuest.AAMyAction() EndEvent Quest Property AAMyQuest Auto This second script does not compile. How should it be written? Edited May 25, 2012 by David Brasher Link to comment Share on other sites More sharing options...
David Brasher Posted May 25, 2012 Author Share Posted May 25, 2012 (edited) I think I found a workaround with three scripts to replace the two I wanted: Reference script on activator object:Scriptname AAMyActivatorScript extends ObjectReference Event OnActivate (ObjectReference akActionRef) AAMyQuest.SetStage(10) EndEvent Quest Property AAMyQuest Auto Quest Stage Result Script Stage 10:kmyquest.AAMyAction()(Where kmyQuest == AAMyQuest) Quest Script on AAMyQuest:Scriptname AAMyQuestScript extends Quest Function AAMyAction() ; Do Stuff. End Function Edited May 25, 2012 by David Brasher Link to comment Share on other sites More sharing options...
steve40 Posted May 25, 2012 Share Posted May 25, 2012 (edited) I want a script on a reference which is an activator object to call a function in my quest script. Scriptname AAMyQuestScript extends Quest Function AAMyAction() ; Do Stuff. End Function Scriptname AAMyActivator Script ObjectReference Event OnActivate (ObjectReference akActionRef) AAMyQuest.AAMyAction() EndEvent Quest Property AAMyQuest Auto This second script does not compile. How should it be written? Scriptname AAMyActivatorScript extends ObjectReference Event OnActivate (ObjectReference akActionRef) AAMyQuest.AAMyAction() EndEvent Quest Property AAMyQuest Auto Typo ^^ :laugh: Edited May 25, 2012 by steve40 Link to comment Share on other sites More sharing options...
fg109 Posted May 25, 2012 Share Posted May 25, 2012 Scriptname AAMyActivatorScript extends ObjectReference Event OnActivate (ObjectReference akActionRef) (AAMyQuest as AAMyQuestScript).AAMyAction() EndEvent Quest Property AAMyQuest Autoor alternatively: Scriptname AAMyActivatorScript extends ObjectReference Event OnActivate (ObjectReference akActionRef) AAMyQuest.AAMyAction() EndEvent AAMyQuestScript Property AAMyQuest Auto Link to comment Share on other sites More sharing options...
cscottydont Posted May 25, 2012 Share Posted May 25, 2012 or alternatively: Scriptname AAMyActivatorScript extends ObjectReference Event OnActivate (ObjectReference akActionRef) AAMyQuest.AAMyAction() EndEvent AAMyQuestScript Property AAMyQuest Auto ^^ This guy has you covered. Calling things from other scripts is weird and not all that well explained on the wiki (IMO). The script you're calling becomes a new property type (like Spell, Armor, Weapon, etc.) o_O and then the quest it is attached to is of that new property type, hence the property listed above. Link to comment Share on other sites More sharing options...
Recommended Posts