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.
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though

      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