How to create a sort of "income"

Sivert

New Member
Reaction score
0
Code:
[B]Defeat[/B]
Events
    A unit dies
Conditions
    (Number of units owned by owner of Triggering unit Equal to 0)
Actions 
    Game - defeat (owner of (Triggering unit)) with the message: Defeat!

That should work for you.

Cheers

That sounded realy simple compared to anything else ^^

What kind of condition is it?

I get:

Code:
(number of units owned[B]in[/B]
 

Icyculyr

I'm a Mac
Reaction score
68
Try this

Variables (Name, type of variable)
Code:
UGroup, Unit Group
Code:
Defeat
Events
    A unit dies
Conditions
Actions
    Set UGroup = All units owned by owner of triggering unit
    If/Then/Else - Multiple Functions
        If - Conditions
            Number of units in UGroup Greater than 0
        Then - Actions
            Skip Remaining Actions
        Else - Actions
    Custom script:   call DestroyGroup(udg_UGroup)
    Game - Defeat (Owner of (Triggering unit)) with the message: Defeat!

That should work, my code was a bit incorrect before.

Cheers
 

esb

Because none of us are as cruel as all of us.
Reaction score
329
But if you Skip the remaining actions, that means you never destroy the leak? Therefore it will leak everytime a unit dies?
 

Icyculyr

I'm a Mac
Reaction score
68
lol yes, I see that, sorry, I do not really use 'Skip Remaining Actions', did not notice I had set that up:p

Code:
Defeat
Events
    A unit dies
Conditions
Actions
    Set UGroup = All units owned by owner of triggering unit
    If/Then/Else - Multiple Functions
        If - Conditions
            Number of units in UGroup Greater than 0
        Then - Actions
            Custom script:   call DestroyGroup(udg_UGroup)
            Skip Remaining Actions
        Else - Actions
    Custom script:   call DestroyGroup(udg_UGroup)
    Game - Defeat (Owner of (Triggering unit)) with the message: Defeat!

Fixed
 
General chit-chat
Help Users

      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