Creep revival system, with heros D: !!!

Mezion

New Member
Reaction score
0
Hi fellas, this is the Creep revival system that I'm using right now (Saw it in the sticky, it's pretty nice!!!!!!)
Trigger:
  • Creep Revival System Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area) owned by Neutral Hostile) and do (Actions)
        • Loop - Actions
          • Set Integer = (Integer + 1)
          • Unit - Set the custom value of (Picked unit) to Integer
          • Custom script: set udg_Creep_X[udg_Integer] = GetUnitX(GetEnumUnit())
          • Custom script: set udg_Creep_Y[udg_Integer] = GetUnitY(GetEnumUnit())


it's doing his job perfecly, exept for one thing now...
My map got tons of abilities and heros. You can become those hero so instead of making a regular creep and then the hero version you'll get, once you downed him (so creep-> you a different hero) I tought that it would be more simple and fun if the creeps were heros too. They would be identical to what you could become, that would mean less different units to make, and they could level too so that's nice. Also, making one model for a type balance things out, if you fight with let say hero type V vs the same thing, only the strategy counts :)

But, with this system, when I kill one thing, it revives has a lv 1 hero of his type, and well... they don't know how to spend skills points.....

So:
A) Could this system be easly modified so that each of them remember their original level and abilities ? or
B) Should I just trigger the respawn for each of them <___<

any thoughts? :confused:

p.s - sorry for all those questions lattly, I'm just trying to make my first serious game and want to improve my knowledge ^^ also sorry, for any english mystakes, it's not my first language and feel free to correct me if something bothers you. :D
 

iMephiles

New Member
Reaction score
0
Hey I'm using a hero respawn thing in my current map! How convinient!

Hero Revival Team 1
Events
Unit - A unit Dies
Conditions
((Triggering unit) is A Hero) Equal to True
Or - Any (Conditions) are true
Conditions
Actions
Custom script: local timerdialog WINDOW
Custom script: local integer HEROWAIT
Custom script: local timer OURTIMER
Custom script: local unit OURHERO
Custom script: set OURHERO = GetDyingUnit()
Custom script: set HEROWAIT = ( GetHeroLevel(OURHERO) * 5 )
Custom script: set OURTIMER = CreateTimer()
Custom script: call StartTimerBJ( OURTIMER, false, ( I2R(HEROWAIT) ))
Custom script: call CreateTimerDialogBJ( OURTIMER, GetPlayerName(GetOwningPlayer(OURHERO) ))
Custom script: set WINDOW = GetLastCreatedTimerDialogBJ()
Custom script: call TimerDialogDisplayForPlayerBJ( true, WINDOW, GetOwningPlayer(OURHERO) )
Custom script: call PolledWait( HEROWAIT )
Custom script: call ReviveHeroLoc(OURHERO, GetRectCenter(gg_rct_*Your Region Here*), true )
Custom script: call PanCameraToTimedLocForPlayer( GetOwningPlayer(OURHERO), GetUnitLoc(OURHERO), 0.20 )
Custom script: call DestroyTimerDialog(WINDOW)


That will make it so whenever a hero dies, it will revive in 5 times is level seconds

Edi: fixed mistake in trigger
 

Mezion

New Member
Reaction score
0
wow ty! I'm gonna try that right now.

I suppose if I want an exact number (respawning after 60 sec for example) I change:

Custom script: set HEROWAIT = ( GetHeroLevel(OURHERO) * 5 )

to

Custom script: set HEROWAIT = (60)
right?


edit: and what's the *yourtrigger* part?
 

iMephiles

New Member
Reaction score
0
It says, your trigger?
I meant to type region... my bad...
You put the name of your region there

edit: Yes, that is what you would change it to
 

Mezion

New Member
Reaction score
0
Custom script: call ReviveHeroLoc(OURHERO, GetRectCenter(gg_rct_PlayableMapRect()), true )

says it's not the proper name <_< how would that be typed then? It's for the full map. Ty a lot for the help btw
 

iMephiles

New Member
Reaction score
0
Custom script: call ReviveHeroLoc(OURHERO, GetRectCenter(gg_rct_PlayableMapRect()), true )

says it's not the proper name <_< how would that be typed then? It's for the full map. Ty a lot for the help btw

Do call ReviveHeroLoc(OURHERO, GetRectCenter(GetPlayableMapRect ()), true )
 

Mezion

New Member
Reaction score
0
oooh it's nice but they respawn in the middle of the map. that cause of the region thing. You think it can be mixed with what I was using to make them appear at their initial spot?
 

SwedishChef

New Member
Reaction score
32
Hey I'm using a hero respawn thing in my current map! How convinient!

Trigger:
  • Hero Revival Team 1
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
      • Or - Any (Conditions) are true
        • Conditions
    • Actions
      • Custom script: local timerdialog WINDOW
      • Custom script: local integer HEROWAIT
      • Custom script: local timer OURTIMER
      • Custom script: local unit OURHERO
      • Custom script: set OURHERO = GetDyingUnit()
      • Custom script: set HEROWAIT = ( GetHeroLevel(OURHERO) * 5 )
      • Custom script: set OURTIMER = CreateTimer()
      • Custom script: call StartTimerBJ( OURTIMER, false, ( I2R(HEROWAIT) ))
      • Custom script: call CreateTimerDialogBJ( OURTIMER, GetPlayerName(GetOwningPlayer(OURHERO) ))
      • Custom script: set WINDOW = GetLastCreatedTimerDialogBJ()
      • Custom script: call TimerDialogDisplayForPlayerBJ( true, WINDOW, GetOwningPlayer(OURHERO) )
      • Custom script: call PolledWait( HEROWAIT )
      • Custom script: call ReviveHeroLoc(OURHERO, GetRectCenter(gg_rct_*Your Region Here*), true )
      • Custom script: call PanCameraToTimedLocForPlayer( GetOwningPlayer(OURHERO), GetUnitLoc(OURHERO), 0.20 )
      • Custom script: call DestroyTimerDialog(WINDOW)



That will make it so whenever a hero dies, it will revive in 5 times is level seconds

Edi: fixed mistake in trigger

Gui tags please. I also have a revival trigger in my map, maybe I could post that if this didnt work.
 

Mezion

New Member
Reaction score
0
I does work but I'm not sure how to change it so it does the same thing my initial system did: make units reapear where they were first set.
with this, they'll respawn in a region. I'm pretty sure the same could be done (I'm just not that used with custom scrip:p)

maybe the herorevive part shoud look at the udg_Creep_X & udg_Creep_y somehow?
 

iMephiles

New Member
Reaction score
0
Than put in the trigger multiple times for different teams, adding conditions and changing region in which they respawn, I have this trigger twice in my map.
 

Mezion

New Member
Reaction score
0
Hi guys :)
Now this listtle system works, well, alsmot all the time <_<

This:

Trigger:
  • Creep Revival System Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area) owned by Neutral Hostile) and do (Actions)
        • Loop - Actions
          • Set Integer = (Integer + 1)
          • Unit - Set the custom value of (Picked unit) to Integer
          • Custom script: set udg_Creep_X[udg_Integer] = GetUnitX(GetEnumUnit())
          • Custom script: set udg_Creep_Y[udg_Integer] = GetUnitY(GetEnumUnit())


and this:
Trigger:
  • Revive Creeps 1 by 1 hero
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Owner of (Triggering unit)) Equal to Neutral Hostile) and (((Triggering unit) is Summoned) Not equal to True)
    • Actions
      • Wait 60.00 game-time seconds
      • Unit - Create 1 (Unit-type of (Triggering unit)) for Neutral Hostile at ((Center of (Entire map)) offset by (Creep_X[(Custom value of (Triggering unit))], Creep_Y[(Custom value of (Triggering unit))])) facing (Random angle) degrees
      • Unit - Set the custom value of (Last created unit) to (Custom value of (Triggering unit))
      • Hero - Set (Last created unit) Hero-level to ((Level of (Triggering unit)) x 1), Hide level-up graphics


The units do respawn, they become the same level as before. Since in my map, when your reach some levels, you gain additionnals abilities, they do gain those abilities so all is ok there. The only problem I have is this:

Sometimes, and I don't understand why, the units wont respawn. And most of the time, it's not only one but a bunch of them. They can respawn multiple times before that occur, or it could be the first time they respawn, I'm really clueless. I'm not using any skills that remove corpses or things like that, I'm just beating them to death to test.

Anyone got an explanation?


(Edit: anyone got a clue? Every time I go into a rampage with something and kill a bunch of stuff, many dont respsawn :( )
 

bLu3_eYeS

New Member
Reaction score
31
Try this:

Trigger:
  • Revive Hero
    • Events
      • Unit - A unit Dies
    • Conditions
      • (((Dying unit) is A Hero) Equal to True) and ((Owner of (Dying unit)) Not equal to Player 12 (Brown))
      • (Dying unit) Not equal to ApStole_unit
    • Actions
      • Unit Group - Add (Triggering unit) to RevivableHeroes
      • Set TempReal = (10.00 + (0.70 x (Real((Hero level of (Triggering unit))))))
      • Countdown Timer - Start ReviveTimers[(Player number of (Owner of (Dying unit)))] as a One-shot timer that will expire in TempReal seconds
      • Countdown Timer - Create a timer window for (Last started timer) with title Revive in:
      • Set RevivableTimersWindows[(Player number of (Owner of (Triggering unit)))] = (Last created timer window)
      • Countdown Timer - Show (Last created timer window) for (Owner of (Triggering unit))



And:


Trigger:
  • Revive Hero Timer
    • Events
      • Time - ReviveTimers[1] expires
      • Time - ReviveTimers[2] expires
      • Time - ReviveTimers[3] expires
      • Time - ReviveTimers[4] expires
      • Time - ReviveTimers[5] expires
      • Time - ReviveTimers[6] expires
      • Time - ReviveTimers[7] expires
      • Time - ReviveTimers[8] expires
      • Time - ReviveTimers[9] expires
      • Time - ReviveTimers[10] expires
      • Time - ReviveTimers[11] expires
      • Time - ReviveTimers[12] expires
    • Conditions
    • Actions
      • Unit Group - Pick every unit in RevivableHeroes and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Remaining time for ReviveTimers[(Player number of (Owner of (Picked unit)))]) Less than 1.00
            • Then - Actions
              • Set Start_loc = ((Owner of (Picked unit)) start location)
              • Hero - Instantly revive (Picked unit) at Start_loc, Show revival graphics
              • Countdown Timer - Destroy RevivableTimersWindows[(Player number of (Owner of (Picked unit)))]
              • Countdown Timer - Pause (Expiring timer)
              • Custom script: call RemoveLocation(udg_Start_loc)
            • Else - Actions
 
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