Revive X Times?

Ashlebede

New Member
Reaction score
43
Trigger:
  • //Hand-Written
    • Events
      • A unit Dies
    • Conditions
      • (Triggering unit) Equal to {My unit}
      • -------- or (Unit-type of (Triggering unit)) equal to {Unit-type} --------
      • (Custom value of (Triggering unit)) Less than 3
    • Actions
      • Hero - Instantly revive (Triggering unit) at (Position of (Triggering unit)) Show revival graphics
      • Unit - Set (Triggering unit) custom value to (((Triggering unit) custom value)+1)


Leak to remove : (Position of (Triggering unit)). This would become :

Trigger:
  • //Hand-Written
    • Events
      • A unit Dies
    • Conditions
      • (Triggering unit) Equal to {My unit}
      • -------- or (Unit-type of (Triggering unit)) equal to {Unit-type} --------
      • (Custom value of (Triggering unit)) Less than 3
    • Actions
      • Set loc = (Position of (Triggering unit))
      • Hero - Instantly revive (Triggering unit) at loc Show revival graphics
      • Custom Script : call RemoveLocation(udg_loc)
      • Unit - Set (Triggering unit) custom value to (((Triggering unit) custom value)+1)
 

iTzShiny

New Member
Reaction score
0
Excatly how do you get this?
Trigger:
  • (Custom value of (Triggering unit)) Less than 3
?
 

Ashlebede

New Member
Reaction score
43
The custom value of a unit is an integer stored for every unit. Its default value is 0. It has no use whatsoever without triggers. That would be under the "Integer comparison" category.
 

Ashlebede

New Member
Reaction score
43
You could store it in a hashtable, but if Custom value is unused, then there is no reason not to use it.
 

iTzShiny

New Member
Reaction score
0
I can't find this trigger
Trigger:
  • Unit - Set (Triggering unit) custom value to (((Triggering unit) custom value)+1)
 

Ashlebede

New Member
Reaction score
43
It's under unit, I just checked. Copied from WE :

Trigger:
  • Unit - Set the custom value of (Triggering unit) to 0


If you really can't find it, try the "-Search for text -->" inside the "Configure Action" window.
 

iTzShiny

New Member
Reaction score
0
Trigger:
  • Custom Script : call RemoveLocation(udg_loc)
    • Set loc = (Position of (Triggering unit))


Whats Variable Loc suppose to be?
 

iTzShiny

New Member
Reaction score
0
Hmmm... What does it keep reviving more than 3 times?

Trigger:
  • Revive
    • Events
      • Unit - A unit owned by Player 1 (Red) Dies
    • Conditions
      • (Triggering unit) Equal to (Triggering unit)
      • (Custom value of (Triggering unit)) Less than 3
    • Actions
      • Set Loc = (Position of (Triggering unit))
      • Hero - Instantly revive (Triggering unit) at Loc, Show revival graphics
      • Custom script: call RemoveLocation(udg_Loc)
      • Unit - Set the custom value of (Triggering unit) to 0
 

Ashlebede

New Member
Reaction score
43
You set it to [ljass]0[/ljass]. You should set it to [ljass]((Custom value of (Triggering Unit))+1)[/ljass].
 

Ashlebede

New Member
Reaction score
43
You have to go in the Arithmetic.

Arithmetic =>

Value 1 = Custom value of (Triggering unit)
Sign = +
Value 2 = 1

The result is ((Custom value of (Triggering unit))+1).
 
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