Mattiewagg Posted September 24, 2014 Author Share Posted September 24, 2014 Yes.? Yes to multiple scenes? Link to comment Share on other sites More sharing options...
Mattiewagg Posted September 24, 2014 Author Share Posted September 24, 2014 Is there a FailAllObjectivesExcept sort of function? I want to fail every objective except for one, at a certain stage in a quest. I could do: FailAllObjectives() SetObjectiveCompleted(MyException) But would that not show: Objective - Failed Objective - Failed Etc. MyException - Failed MyException - Completed? Or does failing all objectives not affect those already completed? Link to comment Share on other sites More sharing options...
Terra Nova Posted September 25, 2014 Share Posted September 25, 2014 (edited) The only way to find that out is to test FailAllObjectives() yourself. I'm betting it is one of those functions that is hardly ever used. I was working a custom function to do this easily, via arrays but ran into an interesting discovery with isObjectiveCompleted() and SetObjectiveFailed(). Passing arrays into the former will only return the index, instead of what the index is holding(in this case myQuest.IsObjectiveCompleted(Obj)), resulting in an error and printing to the log about unknown quest objective. Since obviously the indexes will not match the values representing that objectives. Edited September 25, 2014 by Terra Nova Link to comment Share on other sites More sharing options...
Mattiewagg Posted September 25, 2014 Author Share Posted September 25, 2014 The only way to find that out is to test FailAllObjectives() yourself. I'm betting it is one of those functions that is hardly ever used. I was working a custom function to do this easily, via arrays but ran into an interesting discovery with isObjectiveCompleted() and SetObjectiveFailed(). Passing arrays into the former will only return the index, instead of what the index is holding(in this case myQuest.IsObjectiveCompleted(Obj)), resulting in an error and printing to the log about unknown quest objective. Since obviously the indexes will not match the values representing that objectives.Well I suppose I'll test it and then add a note to the wiki about my findings. Link to comment Share on other sites More sharing options...
Terra Nova Posted September 25, 2014 Share Posted September 25, 2014 (edited) Nah, I did it for you lol. If a stage is already completed, it is still flagged(in the journal) as failed with FailAllObjectives. But the completed stage will not display on screen with the rest of the failed objectives, if you know what I mean. Edited September 25, 2014 by Terra Nova Link to comment Share on other sites More sharing options...
Mattiewagg Posted September 25, 2014 Author Share Posted September 25, 2014 Nah, I did it for you lol. If a stage is already completed, it is still flagged(in the journal) as failed with FailAllObjectives. But the completed stage will not display on screen with the rest of the failed objectives, if you know what I mean.Hmm. Does it fail non-displayed objectives? Ones that haven't been shown yet? Link to comment Share on other sites More sharing options...
Terra Nova Posted September 25, 2014 Share Posted September 25, 2014 (edited) Nah, I did it for you lol. If a stage is already completed, it is still flagged(in the journal) as failed with FailAllObjectives. But the completed stage will not display on screen with the rest of the failed objectives, if you know what I mean.Hmm. Does it fail non-displayed objectives? Ones that haven't been shown yet?I don't know how to properly test non displayed ones. This is how I tested it. I made 5 Objectives: SetObjectiveDisplayed(10)SetObjectiveDisplayed(20)SetObjectiveDisplayed(30)SetObjectiveDisplayed(40)SetObjectiveDisplayed(50) SetObjectiveCompleted(40) utility.wait(8.0)FailAllObjectives() utility.wait(10.0)debug.notification("Check" +IsObjectiveCompleted(40)) ← false 10-30, and 50 will show up on screen, 40 gets completed as expected. When FaillAllObjectives kicks in, this shows up on the screen: Failed Test 1Failed Test 2Failed Test 3Failed Test 5 But in the journal all are flagged failed. Seems to me like it does what its intended, and not the function you're looking for. Edit: the check works as expected. Even though 40 is completed, it is set to failed, and returns false. Edited September 25, 2014 by Terra Nova Link to comment Share on other sites More sharing options...
Mattiewagg Posted September 25, 2014 Author Share Posted September 25, 2014 Hmm. That kind of works but not as well so I gues I'll just fail all possible objectives based on when something happened.For example, if the thing happened at stage 20 fail stage 10, and set the stage to 200 which will complete 15. If done at stage 80, fail all objectives below <= 80, except 15, set the stage to 200 which completes stage 15. Link to comment Share on other sites More sharing options...
Terra Nova Posted September 25, 2014 Share Posted September 25, 2014 (edited) I tried testing a non displayed one with the console command's version of SetObjectiveDisplayed (I used 30 for this) and nothing happened. Edited September 25, 2014 by Terra Nova Link to comment Share on other sites More sharing options...
Mattiewagg Posted September 25, 2014 Author Share Posted September 25, 2014 I tried testing a non displayed one with the console command's version of SetObjectiveDisplayed (I used 30 for this) and nothing happened.Alright then. I won't use FailAllObjectives. Doesn't work for me in this case. Link to comment Share on other sites More sharing options...
Recommended Posts