Creep Revive?

Calibrator

New Member
Reaction score
1
Hi, is there a way to make a unit revive without doing one for each unit? I made a trigger for reviving, but it revives the unit where it died, not where it started at. Can you post the WHOLE trigger for me to see? Just tell me what to edit =D
 

CAPSLOCKFTW

Member
Reaction score
5
Sry can't use a world edit right now but I'll describe it as good as i can :p

Event - A unit dies
Condition - Unit type of "Event response - Dying unit" equal to "describe your unit if you want"
Action - Create a "unit type of (Event response - Dying unit)" at "your region"

You can narrow the revival by adding conditions of units u don't want to be revived.

Hope this works!:rolleyes:
 

Komaqtion

You can change this now in User CP.
Reaction score
469
He already has a revival system, but he needs them the revive at the "exact" same point where they were first spawned...
 

N582114

New Member
Reaction score
2
If they are already spawned at the beginning of the game, create a trigger at map initialization to set the creep's coordinates onto variables.

If they spawn after some time, you could add 'Set 'positionvariable = position of (last created unit)' so you can have those variables stored for later.
 

CAPSLOCKFTW

Member
Reaction score
5
If they are already spawned at the beginning of the game, create a trigger at map initialization to set the creep's coordinates onto variables.

If they spawn after some time, you could add 'Set 'positionvariable = position of (last created unit)' so you can have those variables stored for later.

That wouldn't be a very good solution as the more creeps there are the more variables u need, and usually there is quite a big amount of creeps. But still, this is the only solution right now :rolleyes:

Just how much creeps are there?
 

eric92

New Member
Reaction score
3
Yo check this out son, its what i us on my map.

Trigger:
  • Spawns Hostile
    • Events
      • Unit - A unit owned by Neutral Hostile Dies
    • Conditions
    • Actions
      • Wait 75.00 seconds
      • Unit - Create 1 (Unit-type of (Dying unit)) for Neutral Hostile at (Position of (Dying unit)) facing Default building facing degrees


Ok, if u wana do where it started at, then u must set each unit on your map to a point variable, then make a trigger for each unit on you map and have it revive at the set point. it is not hard, just takes a long time thats why i use the one above.
 

shadowmapper

New Member
Reaction score
0
From Ryoko Heroes, Creeps, and Items 2 tutorial map...

Trigger 1

Trigger:
  • INIT Store Creeps
    • Events
      • Time - Elapsed game time is 2.00 seconds
    • Conditions
    • Actions
      • Set Loop = 0
      • Unit Group - Pick every unit in (Units owned by Neutral Hostile) and do (Actions)
        • Loop - Actions
          • Set Creep_Type[Loop] = (Unit-type of (Picked unit))
          • Set Creep_Position[Loop] = (Position of (Picked unit))
          • Unit - Set the custom value of (Picked unit) to Loop
          • Set Loop = (Loop + 1)


Trigger 2


JASS:
function Trig_Revive_Creeps_Actions takes nothing returns nothing
    local integer CUSTOM
    set CUSTOM = GetUnitUserData(GetDyingUnit())
    call TriggerSleepAction( 60.00 )
    call CreateNUnitsAtLoc( 1, udg_Creep_Type[CUSTOM], Player(PLAYER_NEUTRAL_AGGRESSIVE), udg_Creep_Position[CUSTOM], bj_UNIT_FACING )
    call SetUnitUserData( GetLastCreatedUnit(), CUSTOM )
endfunction

//===========================================================================
function InitTrig_Revive_Creeps takes nothing returns nothing
    set gg_trg_Revive_Creeps = CreateTrigger(  )
    call TriggerRegisterPlayerUnitEventSimple( gg_trg_Revive_Creeps, Player(PLAYER_NEUTRAL_AGGRESSIVE), EVENT_PLAYER_UNIT_DEATH )
    call TriggerAddAction( gg_trg_Revive_Creeps, function Trig_Revive_Creeps_Actions )
endfunction


Again, credit to Ryoko, these are not my scripts.
 

Sui-cookie

You can change this now in User CP.
Reaction score
49
yeah, i was just going to post something like that, and remember : o that only works for neutral hostile, so make one for each player that you have units that need to respawn for.
 
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