help life lost like TD

goozaru_TUDC

New Member
Reaction score
1
plz help me i need a trigger to make lifes and make life lost if a creature gets into a cirkel of power just like TD plz help
 

Exide

I am amazingly focused right now!
Reaction score
448
You need an integer variable.

Code:
Untitled Trigger 002
    Events
        Unit - A unit enters [B]*Your_Region*[/B]
    Conditions
        (Owner of (Triggering unit)) Equal to Player 12 (Brown)
    Actions
        Set Lives = (Lives - 1)

-You also need to set the variable in the start of the game.
 

Exide

I am amazingly focused right now!
Reaction score
448
The exact same way, but instead of taking 1 life away, you set them to ..whatever you want it to be..

Code:
Melee Initialization
    Events
        Map initialization
    Conditions
    Actions
        Set Lives = 40
 

hasslarn

New Member
Reaction score
20
and if u want defeat


Code:
defeat
    Events
        Time - Evry 1 sec of the game
    Conditions
    Actions
        If then else
IF- Lives Equal to 0

Then - Defeat player 1 , 2 ,3 ,4, 5,
 

FireBladesX

Eating my wings!
Reaction score
123
Or, set the initial value of the Lives integer to 40, and check lives remaining upon leaks to save some triggers.

And IMO, it's better to remove all units from the map and turn off spawn triggers instead of defeat.
So that the players can bitch to each other.
 

T.s.e

Wish I was old and a little sentimental
Reaction score
133
Code:
Untitled Trigger 001
    Events
        Unit - A unit enters YourRegion
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Lives Equal to 0
            Then - Actions
                Game - Defeat Player 1 (Red) with the message: Defeat!
            Else - Actions
                Set Lives = (Lives - 1)

Something like this?
 

Kazuga

Let the game begin...
Reaction score
110
I agree with FirebladesX, it's better to remove all your buildings, workers and units when your defeated instead of defeating the player. This because the player is still defeated but he can stay an chat if he wants to.
 
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