complex trigger??

lmichael89

New Member
Reaction score
3
I am making a Car that is neutral to all players. The car has mana{gasoline}, and when a player comes within range the car will be given to that player and the unit is loaded inside and activates an immolation that drains 1 mana per second{cannot be turned off}. If the unit unloads from the car or when mana reaches 0, the unit is removed from the car and the car is given back to neutral players and immolation is turned off. (Optional) Units cannot enter car if mana is 0.

Other Info:
-Car only gives ownership over to player only if the car is neutral to begin with.
-Car cannot be used by certain players
 

the_ideal

user title
Reaction score
61
Instead of using immolation for mana, use this.

Code:
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Unit-type of (Picked unit)) Equal to Footman
                        (Owner of (Picked unit)) Not equal to Neutral Passive
                    Then - Actions
                        Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) - 1.00)
                    Else - Actions
                        Do nothing

(note: this leaks, but you don't have to worry about what that means for now)
 
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