Jump to content

Need OnActivate Script help


CarnivalOfFear

Recommended Posts

I basically want to have a Activator advance a quest heres what I got

 

scn AAAtest

begin onActivate
setobjectivecompleted aaahytri 10 1
endif
end

 

keeping it simple right now till I can figure out whats wrong. As soon as I apply the script to the switch activator when I test it in game the animation on the activator doesn't play and the script doesn't complete the quest objective.

Link to comment
Share on other sites

U need to put it more like this:

 

 Event onActivate()
setobjectivecompleted aaahytri 10 1
EndEvent

 

My scripting is crappy, but I think it might work this way. That "endif" line doesn't have a previous "if" line to match it up. Did the script even compile?

Link to comment
Share on other sites

U need to put it more like this:

 

 Event onActivate()
setobjectivecompleted aaahytri 10 1
EndEvent

 

My scripting is crappy, but I think it might work this way. That "endif" line doesn't have a previous "if" line to match it up. Did the script even compile?

 

yeah it did. there was an if in there before but I took it out to troubleshoot.

 

EDIT: your script wont compile

 

Cipscis says event is an unknown function

 

Got it all to work im wondering if there is a way to add to a variable rather than simply set it to be exactly something

Edited by CarnivalOfFear
Link to comment
Share on other sites

U need to put it more like this:

 

 Event onActivate()
setobjectivecompleted aaahytri 10 1
EndEvent

 

My scripting is crappy, but I think it might work this way. That "endif" line doesn't have a previous "if" line to match it up. Did the script even compile?

 

That is not Fallout scripting syntax. Skyrim, maybe?

Link to comment
Share on other sites

in the end I ended up with this thought I would post it for other scripting noobs comments are after the semi-colons ";"

 

scn AAAtest2

int DoOnce ; Variable to only let switch activate once
;should also mention AAAMoiraFreesideint is a global variable that applies to all scripts.

begin onActivate
if (DoOnce == 0) && (GetObjectiveCompleted AAAhytri 10 == 0) && (GetObjectiveCompleted AAAhytri 0 == 1) ;this line checks if the player has initiated the quest and done necessarily objectives to get to this stage and that the switch has not been activated yet
Set AAAMoiraFreesideint to AAAMoiraFreesideint + 1 ;this line is a counter to allow the switches to be triggered in any order then there is a object with a script on it that runs onGamemode to check if the counter is high enough to forward the quest objective
Set DoOnce to 1 ;this line ensures the switch cannot be clicked again.
Activate ;this line activates the switch and runs its animation
RewardXP 15 
endif
end

 

heres the code for my counter check object in case anyone wanted to see that.

 

scn AAAhytriNEXTSCRIPT

Begin Gamemode == 1 
If AAAmoirafreesideint == 2
SetObjectiveCompleted AAAhytri 10 1
SetObjectiveDisplayed AAAhytri 20 1
endif

If AAAmoirafreesideint == 5
SetObjectiveCompleted AAAhytri 20 1
SetObjectiveDisplayed AAAhytri 30 1
endif
end

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...