Help with triggers plz

bboykonjo

New Member
Reaction score
1
you know when u set the number of kills for a game u use this trgger:
Events
Unit - A unit Dies
Conditions
Actions
For each Integer A from 1 to 12, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Kills[Integer A] is equal or Greater than 50

Then - Actions
Game - Victory Player (Integer A) (Show dialogs, Show scores)
Set Winner = Player (Integer A)
Pick every player in All players and do (Actions
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Picked player) not equal to Winner
Then - Actions
Defeat for (Picked player)








My question is :Where do u find the :If - Conditions
Kills[Integer A] is equal or Greater than 50????
 

Wratox1

Member
Reaction score
22
first of, its much easier to read the trigger if you put it inside wc3-tags:

Trigger:
  • Events
    • Unit - A unit Dies
    • Conditions
    • Actions
    • For each Integer A from 1 to 12, do (Actions)
    • Loop - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • Kills[Integer A] is equal or Greater than 50
    • Then - Actions
    • Game - Victory Player (Integer A) (Show dialogs, Show scores)
    • Set Winner = Player (Integer A)
    • Pick every player in All players and do (Actions
    • Loop - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • (Picked player) not equal to Winner
    • Then - Actions
    • Defeat for (Picked player)


and to answer your question, its a integer comparison, select integer comparison and the click on "(number of in(units in(playabe map area)))" select your variable instead, then there will appear "[index]" click on it and select "for loop integer a", then click on "equal to" and select "greater than or equal to", then click on "0" and type in 50(if thats the number you want)
and then your done!;)
 

Necrach

You can change this now in User CP.
Reaction score
62
Just to check, I suppose you know that this trigger won't "set the number of kills". It will need something like this
Trigger:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • ((Dying unit) belongs to an enemy of (Owner of (Killing unit))) Equal to True
    • Then - Actions
      • Set kills[(Player number of (Owner of (Killing unit)))] = (kills[(Player number of (Owner of (Killing unit)))] + 1)
    • Else - Actions

before your If loops for victory/defeat (remove leaks before using this)

but I am sure you already have a trigger/some actions for this, and that you just forgot to post it here
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top