Baramoth2 Posted March 13, 2012 Share Posted March 13, 2012 Hi , I was wondering how I would pull off a script in which I need to make sure the quest stage is as a certain point. For example: Event OnDeath(Actor killer) TrethnylDead.SetObjectiveDisplayed(70) TrethnylDead.SetStage(70) EndEvent Event OnDeath(Actor killer) TrethnylDead.SetObjectiveDisplayed(71) TrethnylDead.SetStage(71) EndEvent Event OnDeath(Actor killer) TrethnylDead.SetObjectiveDisplayed(72) TrethnylDead.SetStage(72) EndEvent I want to make it check the previous stage with an if comparison and then channel the results to one of these 3 branches. thanks for your help in advance :) Link to comment Share on other sites More sharing options...
Baramoth2 Posted March 13, 2012 Author Share Posted March 13, 2012 Would it look something like this (this won't work, it says "missing EOF at if")? Scriptname ThrethnylDead extends ObjectReference Quest Property TrethnylDead Auto if (getstage=60) Event OnDeath(Actor killer) TrethnylDead.SetObjectiveDisplayed(70) TrethnylDead.SetStage(70) EndEvent else if (getstage=61) Event OnDeath(Actor killer) TrethnylDead.SetObjectiveDisplayed(71) TrethnylDead.SetStage(71)EndEventelse (getstage=62) Event OnDeath(Actor killer) TrethnylDead.SetObjectiveDisplayed(71) TrethnylDead.SetStage(71)EndEventendif Link to comment Share on other sites More sharing options...
tunaisafish Posted March 13, 2012 Share Posted March 13, 2012 Missing EOF means that you don't have any Events or Functions. That 'if' is in the wrong place. You only need one OnDeath event block and put your logic inside of that.Can you also please post within [ code ] tags, as it keeps the formatting so is easier to follow. Scriptname ThrethnylDead extends ObjectReference Quest Property TrethnylDead Auto Event OnDeath(Actor killer) int stg = TrethnylDead.getstage() if ( stg == 60 ) TrethnylDead.SetObjectiveDisplayed(70) TrethnylDead.SetStage(70) elseif ( stg == 61 ) TrethnylDead.SetObjectiveDisplayed(71) TrethnylDead.SetStage(71) elseif ( stg == 62 ) TrethnylDead.SetObjectiveDisplayed(72) TrethnylDead.SetStage(72) endif endEvent I think that's what you meant. BTW, beware of using '=' (an assignment), when you mean '==' (are these equal) Link to comment Share on other sites More sharing options...
Baramoth2 Posted March 13, 2012 Author Share Posted March 13, 2012 Excellent, thanks :) Link to comment Share on other sites More sharing options...
Recommended Posts