Re-Spawn problem

ianu74

New Member
Reaction score
8
Code:
Point of Creeps
    Events
        Map initialization
    Conditions
    Actions
        Set TmpInteger = 0
        Unit Group - Pick every unit in (Units in (Playable map area) owned by Neutral Hostile) and do (Actions)
            Loop - Actions
                Set CreepPosition[TmpInteger] = (Position of (Picked unit))
                Set graveyardunits[TmpInteger] = (Unit-type of (Picked unit))
                Unit - Set the custom value of (Picked unit) to TmpInteger
                Set TmpInteger = (TmpInteger + 1)
Code:
Respawn initial Copy
    Events
        Unit - A unit owned by Neutral Hostile Dies
    Conditions
        ((Dying unit) is Summoned) Equal to False
    Actions
        Wait (Random real number between 30.00 and 40.00) seconds
        Unit - Create 1 graveyardunits[(Custom value of (Dying unit))] for Neutral Hostile at CreepPosition[(Custom value of (Dying unit))] facing (Random angle) degrees
        Unit - Set the custom value of (Last created unit) to (Custom value of (Dying unit))
Anyone can find any problem with my respawn trigger? none of the other units respawn but the lighting lizard gets more and more
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> but the lighting lizard gets more and more

You mean only those revive? Or it creates those instead?

Those other units are of a type that leaves a corpse, right?
 

ianu74

New Member
Reaction score
8
The Lizards keep getting more and more even though it doesn't die.
No other triggers affect this
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
Replace
Set TmpInteger = 0
with
Set TmpInteger = 1

And add a condition on the reviving:
Custom value of (Dying unit) greater than 0.
 
B

benj_war3

Guest
How about this? When a unit dies, it instantly revives in a region which still look like its start position:

Code:
Unit Spawn
    Events
        Unit - A unit Dies
    Conditions
        ((Dying unit) is A ground unit) Equal to True
        (Owner of (Dying unit)) Equal to Neutral Hostile
    Actions
        Unit - Create 1 (Unit-type of (Dying unit)) for Neutral Hostile at (Center of Spawn Point <gen>) facing Default building facing degrees

Thanks Ace!
 
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