Help with a trigger

J

Jax

Guest
Well I'm making a tag game, but I can't make the trigger for the hunters to win... I need an option that says for example : If there are no Zerglings (the hunted) in playable map area, victory for the hunters... (When Zerglings die they turn into a wisp in the center of the map) Someone halp me pls =D (Zerglings have 200 hp and Wisps have about 1000 and lots of regeneration, so they cant be killed but revived when attacked, maybe this helps =S)
 

quraji

zap
Reaction score
144
First of all, this is in the wrong section (should be in World Editor Help).

Anyways, in your kill trigger, add an if statement that checks to see if there are no zerglings.

Example:

Code:
Zergling Kill
    Events
        Unit - A unit Dies
    Conditions
        (Unit-type of (Triggering unit)) Equal to (==) Zergling
    Actions
        Set TempRegion = (Playable map area)
         Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Number of units in (Units in TempRegion matching ((Unit-type of (Matching unit)) Equal to (==) Zergling))) Equal to (==) 0
            Then - Actions
                Game - Victory Player 1 (Red) (Show dialogs, Show scores)
            Else - Actions
        Custom script:   call RemoveRect(udg_TempRegion)

The "Set TempRegion = (Playable map area)" and "Custom script: call RemoveRect(udg_TempRegion)" have to do with removing memory leaks, if you didn't know already (if you didn't, I suggest looking up a tutorial on it, there are several).
 
J

Jax

Guest
thx a lot, i know it was wrong section but i couldnt find another one... to newb D=
 
J

Jax

Guest
hmm.. I thought it would work but it didnt... Maybe its because of those "(==)" things? (I dont know what they are D:)
 

istar

New Member
Reaction score
31
???
hmm.. I thought it would work but it didnt... Maybe its because of those "(==)" things? (I dont know what they are D
(==) = (equals to) ...-.-
you dont have to put (==) if you using GUI, GUI uses (equals to)
they are the same thing expressed differently
 
J

Jax

Guest
Hmm got ya, but still it doesnt work T.T!!!! I've tried everything but if there are for example 9 zerglings and i kill one i get instant victory =S
 

quraji

zap
Reaction score
144
Sorry for the (==) things, they're part of my editor.

Anyways, if you're still having trouble post your trigger. I can't help without seeing what is going on, can I? ;)
 
J

Jax

Guest
What if I send u the map? cuz the trigger is exactly as u posted there exept for player numbers...
 
J

Jax

Guest
Sure, just don't steal it hehe

There you are =)
 

Attachments

  • Zerg Tag!.w3x
    281.8 KB · Views: 140

WilliamPa

Active Member
Reaction score
51
This is an old sheep tag i almost made, it just ended in that nobody played sheep tag nomore :/ There should be wisp systems etc if i am correct, but i have to go to school soon, so no chance to test. Anyways, the triggers should fit in your map if you delete some parts of them.
 

Attachments

  • SheepTag.w3x
    31.1 KB · Views: 152
J

Jax

Guest
Damn you can do more than I do in 1/8th of the triggers xD... I am not made for this type of editors xD... Thanks btw WilliamPa =)
 
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