- Home /
The question is answered, right answer was accepted
An Order Of The Objectives
Hi Everybody!
So I Want To Make A Game That Have A Specific Order Of Objectives (Like a Mission In GTA) , So I Have All The Scripts To Accomplish The Objectives , But I Didn't find A Way To Order Them. Like First I Should Collect That Item , Than i should Kill Someone Etc.....
Thanks For The Help
Well you could have a script dedicated to just storing a bunch of public bools. Then put those bools in an array or a list-kind-of-format and script it to say:
if(bool1 == true)
{
if(bool2 == true)
{
if(bool3 == true) //... etc etc
}
}
This will mean that the last bool in the list/array can only be true if the one before it was true, which can only be true if the one before it was true, and so on. This would create an objective based system that would basically be like a checklist, where each box has to be ticked off in order, for the objective to be completed.
You can reference the bool-dedicated script in all of the scripts for completing individual tasks, and set the correct bools to true for each specific task. Hope this gives you something to start off with. @ockyboo
Answer by TrollHachem · Feb 15, 2013 at 01:02 AM
Hey Guys , No Need To Answer This. I Figured it out^^