Hi, Im having trouble getting the trigger to loop back to check conditions before moving on to next sequence. The objectives themselves I got it fine, but I cant get the trigger to really wait til previous objectives trigger to be complete before execute next one. I tried put wait trigger in different place, I tried to swtich conditions from the IF statement or without using IF THEN ELSE statement, but either I got all my objectives to show right from beginning or my 2nd objectives never starts.... Below is what I had, what did I do wrong? Or what would u suggest? Much appreciated.
-----------------------------------------------
gloabl variables
1st objective = no objective <objective>
2nd objective = no objective <objective>
3rd objective = no objective <objective>
Trigger#1 [Map Initialization]
Event
Game Map Initialization
Local Var
Condition
Action
Trigger - Run (Trigger01) Ignore conditions, Wait until finish.
Trigger - Run (Trigger02) Ignore conditions, Wait until finish.
Trigger - Run (Trigger03) Ignore conditions, Wait until finish.
(Trigger01)
Event
Local Var
Condition
Action
Objective - Create a Active Primary objective with text "" & description ""
Variable - Set (1st objective) = (Last created objective)
(Trigger02)
Event
Local Var
Condition
Action
=> IF
((1st objective) state) == Completed
THEN
Destroy (1st objective)
Objective - Create a Active Primary objective with text "" & description ""
Variable - Set (2nd objective) = (Last created objective)
ELSE
Trigger - Run (Trigger02) Ignore conditions, Wait until finish.
(Trigger03)
Event
Local Var
Condition
Action
=> IF
((2nd objective) state) == Completed
THEN
Destroy (2nd objective)
Objective - Create a Active Primary objective with text "" & description ""
Variable - Set (2nd objective) = (Last created objective)
ELSE
Trigger - Run (Trigger03) Ignore conditions, Wait until finish.
... I dont have problems with objectives, its the trigger looping back that I had trouble with. the Ignore condition / check condition & Wait & Dont Wait in Run trigger dont seems to work the way I assume...
I think I see the problem. You're not actually looping in this code. What this does, is creates the two objectives and when one is completed it will create the second. However, after that, you have no cases to continue the loop, hence it ends. I would instead of doing a run trigger action, just have the trigger initially off and turn it on in that first trigger, then have an event for objective completed or something so that it runs anytime an objective is completed. I havent used objectives much, I'm not sure if you can specify which objective to be completed. I guess you could do it in the conditions part.
Hi, Im having trouble getting the trigger to loop back to check conditions before moving on to next sequence. The objectives themselves I got it fine, but I cant get the trigger to really wait til previous objectives trigger to be complete before execute next one. I tried put wait trigger in different place, I tried to swtich conditions from the IF statement or without using IF THEN ELSE statement, but either I got all my objectives to show right from beginning or my 2nd objectives never starts.... Below is what I had, what did I do wrong? Or what would u suggest? Much appreciated.
-----------------------------------------------
gloabl variables
1st objective = no objective <objective>
2nd objective = no objective <objective>
3rd objective = no objective <objective>
Trigger#1 [Map Initialization]
Event
Game Map Initialization
Local Var
Condition
Action
Trigger - Run (Trigger01) Ignore conditions, Wait until finish.
Trigger - Run (Trigger02) Ignore conditions, Wait until finish.
Trigger - Run (Trigger03) Ignore conditions, Wait until finish.
(Trigger01)
Event
Local Var
Condition
Action
Objective - Create a Active Primary objective with text "" & description ""
Variable - Set (1st objective) = (Last created objective)
(Trigger02)
Event
Local Var
Condition
Action
=> IF
((1st objective) state) == Completed
THEN
Destroy (1st objective)
Objective - Create a Active Primary objective with text "" & description ""
Variable - Set (2nd objective) = (Last created objective)
ELSE
Trigger - Run (Trigger02) Ignore conditions, Wait until finish.
(Trigger03)
Event
Local Var
Condition
Action
=> IF
((2nd objective) state) == Completed
THEN
Destroy (2nd objective)
Objective - Create a Active Primary objective with text "" & description ""
Variable - Set (2nd objective) = (Last created objective)
ELSE
Trigger - Run (Trigger03) Ignore conditions, Wait until finish.
... I dont have problems with objectives, its the trigger looping back that I had trouble with. the Ignore condition / check condition & Wait & Dont Wait in Run trigger dont seems to work the way I assume...
I think I see the problem. You're not actually looping in this code. What this does, is creates the two objectives and when one is completed it will create the second. However, after that, you have no cases to continue the loop, hence it ends. I would instead of doing a run trigger action, just have the trigger initially off and turn it on in that first trigger, then have an event for objective completed or something so that it runs anytime an objective is completed. I havent used objectives much, I'm not sure if you can specify which objective to be completed. I guess you could do it in the conditions part.
New to the Editor? Need a tutorial? Click Here
Want data assets? Click Here
thx, I did what u suggest with objectives, so far so good. thx again.