Please help with trigger problem !

Happy

Well-Known Member
Reaction score
71
Code:
Trigger A1
Event
Unit - Captain 0340 <gen> Dies
Condition
(Owner of (Triggering unit)) Equal to Player 5 (Yellow)
Action
if died unit is in Area A 
then Set Control_Boolean[1] = True
Trigger - Turn on Top Def A2 <gen>
else
if died unit is in area B
then Set Control_Boolean[2] = True
Trigger - Turn on Top Def A2 <gen>
else
if died unit is in area C
then Set Control_Boolean[3] = True
Trigger - Turn on Top Def A2 <gen>
else

for this trigger you need a array boolean variable (Control_Boolean). for array just check the box under the variables name ^^ that should be the only "problem" here...so lets go on...

Code:
Trigger A2
Event
Time - Every 0.03 seconds of game time
Condition
Action
integer A from 1 to 3
    if Control_Boolean [integer A] = True
    then Unit - Order Barracks [Integer A] to train/upgrade to a Knight
         Set Control_Boolean [integer A] = False
else

for this one you set the action "for each Integer A" (or something like that ^^ it can be found hardly at the top of the actions). then you set it from 1 to 3. for the barracks stuff you need a seperate trigger.

Code:
XYZ
Event
After 0.5 seconds of game-time
Condition
Action
Set Barrack [1] = barrack X
Set Barrack [2] = barrack Y
Set Barrack [3] = barrack Z

Barrack is an array unit variable. and barrack X/Y/Z are the 3 barracks you have. but have in mind which was 1, which was 2 and which was 3 :D
if you made this trigger you should be able to make the trigger above^^

Code:
Trigger A3
Event
Unit - Barracks [1] Finishes training a unit
Condition
(Unit-type of (Trained unit)) Equal to Knight
Action
Unit - Order (Trained unit) to Attack-Move To (Center of Area A)


Code:
Trigger A4
Event
Unit - Barracks [2] Finishes training a unit
Condition
(Unit-type of (Trained unit)) Equal to Knight
Action
Unit - Order (Trained unit) to Attack-Move To (Center of Area B)


Code:
Trigger A5
Event
Unit - Barracks [3] Finishes training a unit
Condition
(Unit-type of (Trained unit)) Equal to Knight
Action
Unit - Order (Trained unit) to Attack-Move To (Center of Area C)

these 3 trigger you should be able to make on your own now.

i hope you got it now ^^

greetz happy
 

HydraRancher

Truth begins in lies
Reaction score
197
I think you got muddled with my term 'freehand'. What it means by that, is that the trigger itself was written by typing it out, from memory. When you make the trigger in the editor, it may look a bit different.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top