bagelfromhell Posted July 3, 2012 Share Posted July 3, 2012 (edited) Whenever i walk into the trigger box nothing happens scriptname ParastasQuestStage30 extends objectReference { this is a generic script for one-shot quest stage updates} import game import debug quest property ParastasQ auto { quest to call SetStage on} int property stage auto { stage to set} bool property doOnce = True auto {Set the stage only once.} int property prereqStageOPT = -1 auto { OPTIONAL: stage that must be set for this trigger to fire } bool property disableWhenDone = true auto { disable myself after I've been triggered. Defaults to true } auto STATE waitingForPlayer EVENT onTriggerEnter(objectReference triggerRef) if triggerRef == getPlayer() as actor ; check to see if a pre-req stage was specificed and if it's been met if prereqStageOPT == -1 || ParastasQ.getStageDone(10) == 1 ; Start the quest just in case it isn't already running. if ParastasQ.isRunning() == FALSE bool check = ParastasQ.start() ; do a quick check in case the quest could not be started if !check ; debug.trace("ERROR: "+ParastasQ+" not started by "+self) endif endif ; do the actual business of setting the stage we want ParastasQ.setStage(30) if doOnce gotoState("hasBeenTriggered") endif if disableWhenDone Disable() endif endif endif endEVENT endSTATE STATE hasBeenTriggered ; this is an empty state. endSTATE Edited July 3, 2012 by bagelfromhell Link to comment Share on other sites More sharing options...
gasti89 Posted July 3, 2012 Share Posted July 3, 2012 if ParastasQ.isRunning() == FALSE bool check = ParastasQ.start() ; do a quick check in case the quest could not be started if !check ; debug.trace("ERROR: "+ParastasQ+" not started by "+self) endif endif If you remove this part the script works? Link to comment Share on other sites More sharing options...
bagelfromhell Posted July 4, 2012 Author Share Posted July 4, 2012 (edited) if ParastasQ.isRunning() == FALSE bool check = ParastasQ.start() ; do a quick check in case the quest could not be started if !check ; debug.trace("ERROR: "+ParastasQ+" not started by "+self) endif endif If you remove this part the script works? No. I walk through the trig box and nothing happens still Edited July 4, 2012 by bagelfromhell Link to comment Share on other sites More sharing options...
gasti89 Posted July 4, 2012 Share Posted July 4, 2012 A few question before messing. Do you want this trigger to run only once? Do you want the quest to start and make the trigger fire even if it's not started? Link to comment Share on other sites More sharing options...
bagelfromhell Posted July 4, 2012 Author Share Posted July 4, 2012 A few question before messing. Do you want this trigger to run only once? Do you want the quest to start and make the trigger fire even if it's not started? It'd be less confusing to the player if we had the trigger start the quest even if they did not have it active before + if it was not active the player would be stuck unless they used a coc command. So yes even if the quest is not started i would like it to start it Link to comment Share on other sites More sharing options...
Recommended Posts