• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

How to build a hero revival system?

Status
Not open for further replies.
Level 15
Joined
Jan 12, 2011
Messages
1,197
Hi everyone,
Would you tell me how do i create a hero revival with triggers? I have a hero callled Demonic wizard and i want it to be revived at Region 001. And if the hero enters an other region then my hero should be revived at regin 003.
So would you tell me how to make this? I would really appreciate your help. :thumbs_up:
 
Here you go :thumbs_up:
  • Revive
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Footman
    • Actions
      • Set Point = (Center of ReviveRegion)
      • Hero - Instantly revive Demonic wizard at Point, Show revival graphics
      • Custom script: call RemoveLocation(udg_Point)
  • Move Revive Point
    • Events
      • Unit - A unit enters Move Region <gen>
    • Conditions
    • Actions
      • Set ReviveRegion = Region 003 <gen>
 
Level 11
Joined
Jul 7, 2010
Messages
709
---> OR
  • Revive Hero
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • 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 = ( 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, GetRandomLocInRect(GetPlayableMapRect()) , true )
      • Custom script: call SelectUnitForPlayerSingle( GetTriggerUnit(), GetOwningPlayer(GetTriggerUnit()) )
      • Custom script: call PanCameraToTimedLocForPlayer( GetOwningPlayer(OURHERO), GetUnitLoc(OURHERO), 0.60 )
      • Custom script: call DestroyTimerDialog(WINDOW)
--->
  • Custom script: set HEROWAIT = ( 5 )
Means how many seconds before hero is re-spawned. In this case 5 seconds.
  • Custom script: call ReviveHeroLoc(OURHERO, GetRandomLocInRect(GetPlayableMapRect()) , true )
Where hero is re-spawned. In this case RandomLocInRect(GetPlayableMapRect()
  • Custom script: call ReviveHeroLoc(OURHERO, udg_HERO_SPAWN , true )
Re-spawn in and set region which is HERO_SPAWN I.E
  • Set HERO_SPAWN = (Center of Region 000 <gen>)
 
Level 9
Joined
Mar 31, 2011
Messages
496
i will suggest you to read tutorials in this site :smile: i learned a lot reading there... hahaha
 
Level 15
Joined
Jan 12, 2011
Messages
1,197
Many thanks.
I tried my trigger and it doesn't work. What is wrong with it?
Is it good that i made 2 variables and the type of point is point and the reviveregion's is region. Please tell me how do i make it to be worked. Please help me.
Here it is:
103851d1310469030-how-build-hero-revival-system-example.jpg
 

Attachments

  • example.JPG
    example.JPG
    59.4 KB · Views: 221
Level 9
Joined
Mar 31, 2011
Messages
496
lol ...that will revive a Demonic Wizard. what is that map? a one hero, one player game?

it must be --
condition
----triggering unit is equal to a hero?
action
----instantly revive the last triggering unit?
----
 
Level 15
Joined
Jan 12, 2011
Messages
1,197
Many thanks Mitzui. Yes, currenty it is only va one player game but i am working on it. But it still doesn't work and there isn't an action called instantly revive the last trigering unit.
Please show me screenshots of the triggers and the variables, too. So please help me about that.
EDIT: I have looked a tutorial and i tried to make if. It is worked! I made the variables and the triggers well so now it is working! :))
 
Last edited:
Status
Not open for further replies.
Top