Credits: Robot-Dude
Difficulty: Easy
First you'll need to create the variables
Variables
Revival_Index1 Integer 0 (Default)
Revival_Index2 Integer 0 (Default)
Revival_MUI Integer 0 (Default)
Revival_TimeFactor Integer 0
Revival_Timer Real Array (1) 0 (Default)
Revival_Unit Unit Array (1) - None -
Revival_Point Point Array (1) - None -
You can either change the "Revival_TimeFactor" from 0 by either editing it in Variables or doing
Set Revival_TimeFactor = (Your Number) (In Map Initialization)
Now the next step is to create the Triggers
Create a new trigger called whatever, with me i've called mine "Revival System 1"
[gui]Revival System 1
Events
Unit - A unit Dies
Conditions
((Triggering unit) is A Hero) Equal to True
Actions
-------- Setup Indexing --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Revival_Index1 Equal to 0
Then - Actions
Trigger - Turn on Hero Revival <gen>
Else - Actions
-------- Setup Indexing Part2 --------
Set Revival_Index1 = (Revival_Index1 + 1)
Set Revival_Index2 = (Revival_Index2 + 1)
-------- Setup unit and revival --------
Set Revival_Unit[Revival_Index2] = (Triggering Unit)
Set Revival_Timer[Revival_Index2] = (((Real((Level of Revival_Unit[Revival_Index2]))) x (Real(Revival_TimeFactor))) + 5.00)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Owner of Revival_Unit[Revival_Index2]) is in YourPlayerGroup1) Equal to True
Then - Actions
Set Revival_Pont[Revival_Index2] = (Center of (Playable map area))
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Owner of Revival_Unit[Revival_Index2]) is in YourPlayerGroup2) Equal to True
Then - Actions
Set Revival_Pont[Revival_Index2] = (Center of (Playable map area))
Else - Actions
[/gui]
Now to finish it off, create your last trigger. Whatever name you want mines called "Revival System 2" make sure to turn the Initially Off.
[gui]Revival System 2
Events
Time - Every 0.03 seconds of game time
Conditions
Actions
For each (Integer Revival_MUI) from 1 to Revival_Index2, do (Actions)
Loop - Actions
Set Revival_Timer[Revival_MUI] = (Revival_Timer[Revival_MUI] - 0.03)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Revival_Timer[Revival_MUI] Less than or equal to 0.00
Then - Actions
Hero - Instantly revive Revival_Unit[Revival_MUI] at Revival_Pioint(Revival_MUI), Hide revival graphics
Camera - Pan camera for (Owner of Revival_Unit[Revival_MUI]) to (Position of Revival_Unit[Revival_MUI]) over 0.60 seconds
Selection - Select Revival_Unit[Revival_MUI] for (Owner of Revival_Unit[Revival_MUI])
Set Revival_Index2 = (Revival_Index2 - 1)
Custom script: call RemoveLocation (udg_Revival_Pont[udg_Revival_MUI])
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Revival_Index2 Equal to 0
Then - Actions
Set Revival_Index1 = 0
Trigger - Turn off (This trigger)
Else - Actions
[/gui]
Now you have a fully working Hero Revival system.
(GUI/MUI) Hero Revival System
- Enalias
- Site Admin
- Posts: 200
- Joined: Sat Sep 15, 2018 1:57 pm
- Reputation: 9
- Location: Florida, U.S.A.
- Website: http://chaosrealm.co/memberlist.php?mod ... rofile&u=2
- Discord: https://discord.gg/BUEZkef
- Twitch: https://www.twitch.tv/enalias
- Contact:
(GUI/MUI) Hero Revival System
-
0
- Quote
Post by Enalias » Mon Nov 05, 2018 11:37 am
Have you read the Chaos Realm Rules yet?
Click me!
Show
×
- Important message for guests!
- ↳ Guests:
- Stronghold
- ↳ Official Chaos Realm Discord Group
- ↳ Chaos News
- ↳ Chaos Tavern
- ↳ Chaos Contests
- ↳ Triggering Contests
- ↳ Animation Contests
- ↳ Terrain Art Contests
- ↳ Graphic Contests
- ↳ Other Gaming
- WarCraft III Modding
- ↳ Models & Skins
- ↳ Anime & Cartoon
- ↳ Characters
- ↳ Other
- ↳ Black Rock Shooter
- ↳ Bleach
- ↳ D.Gray-man
- ↳ Date A Live
- ↳ Digimon
- ↳ Dragon Ball Z
- ↳ Fairy Tail
- ↳ Fullmetal Alchemist
- ↳ Gintama
- ↳ Gundam
- ↳ Hitman Reborn
- ↳ Inuyasha
- ↳ JoJo's Bizarre Adventure
- ↳ Mahou Shoujo Lyrical Nanoha
- ↳ Marvel & DC
- ↳ Naruto
- ↳ Negima! Magister Negi Magi
- ↳ One Piece
- ↳ Pokémon
- ↳ Puella Magi Madoka Magica
- ↳ Shakugan no Shana
- ↳ Shingeki no Kyojin
- ↳ Slayers
- ↳ Sword Art Online
- ↳ Toaru Majutsu No Index
- ↳ Tokyo Ghoul
- ↳ Typemoon Fate/Stay Night
- ↳ Yu-Gi-Oh
- ↳ Buildings
- ↳ Doodads
- ↳ Items
- ↳ SFX
- ↳ Tilesets
- ↳ Video Games
- ↳ Characters
- ↳ Other
- ↳ Devil May Cry
- ↳ Dota2
- ↳ Dynasty Warriors & Samurai Warriors
- ↳ Final Fantasy
- ↳ Fire Emblem
- ↳ Heroes of the Storm
- ↳ Hyperdimension Neptunia
- ↳ Kantai Collection
- ↳ King of Fighters
- ↳ Kingdom Hearts
- ↳ League Of Legends
- ↳ Lineage
- ↳ Mega Man
- ↳ Mobile Legends
- ↳ Mortal Kombat
- ↳ Plants vs Zombies
- ↳ Sonic Series
- ↳ Star Wars
- ↳ Super Smash Bros.
- ↳ Touhou Project
- ↳ Vocaloid & MikuMikuDance
- ↳ Warcraft
- ↳ Characters
- ↳ Blood Elves
- ↳ Dwarfs
- ↳ Humanoids
- ↳ Night Elves
- ↳ Orcs
- ↳ Taurens
- ↳ Trolls
- ↳ Undead
- ↳ Other
- ↳ Creatures & Mechanicals
- ↳ Critters
- ↳ Demons
- ↳ Dragon
- ↳ Elementals
- ↳ Mechanicals
- ↳ Buildings
- ↳ Doodads
- ↳ Items
- ↳ Special Effects
- ↳ Tilesets
- ↳ Starcraft
- ↳ Terran
- ↳ Zerg
- ↳ Protoss
- ↳ Other
- ↳ Doodads
- ↳ Custom UI
- ↳ Spells & Triggers
- ↳ Spells
- ↳ No Target
- ↳ Target Unit
- ↳ Target Ground
- ↳ Spell Packs
- ↳ Systems
- ↳ Work In Progress
- ↳ Graphics
- ↳ Icons
- ↳ Music & Sounds
- ↳ Terrain
- Other Game Modding
- ↳ Other game stuff, when it comes along.
- Hosted Projects
- ↳ Battlestadium DON
- ↳ Naruto Shippuuden: Akatsuki War
- ↳ Dragonball Budokai / Toshinden
- ↳ Naruto Ninpou
- ↳ Clash of Anime
- ↳ Holy Grail War
- Partners
- ↳ Warcraft 3 Modding Information Center
- ↳ Dragonball Budokai / Toshinden
- ↳ Battlestadium D.O.N.
- ↳ Naruto Ninpou
- ↳ Warcraft 3 Reddit
- ↳ Naruto Shippuuden: Akatsuki War
- ↳ Hero Wars League
- ↳ Holy Grail War
- ↳ WC3 Anime
- Important message for guests!
- ↳ Guests:
- Stronghold
- ↳ Official Chaos Realm Discord Group
- ↳ Chaos News
- ↳ Chaos Tavern
- ↳ Chaos Contests
- ↳ Triggering Contests
- ↳ Animation Contests
- ↳ Terrain Art Contests
- ↳ Graphic Contests
- ↳ Other Gaming
- WarCraft III Modding
- ↳ Models & Skins
- ↳ Anime & Cartoon
- ↳ Characters
- ↳ Other
- ↳ Black Rock Shooter
- ↳ Bleach
- ↳ D.Gray-man
- ↳ Date A Live
- ↳ Digimon
- ↳ Dragon Ball Z
- ↳ Fairy Tail
- ↳ Fullmetal Alchemist
- ↳ Gintama
- ↳ Gundam
- ↳ Hitman Reborn
- ↳ Inuyasha
- ↳ JoJo's Bizarre Adventure
- ↳ Mahou Shoujo Lyrical Nanoha
- ↳ Marvel & DC
- ↳ Naruto
- ↳ Negima! Magister Negi Magi
- ↳ One Piece
- ↳ Pokémon
- ↳ Puella Magi Madoka Magica
- ↳ Shakugan no Shana
- ↳ Shingeki no Kyojin
- ↳ Slayers
- ↳ Sword Art Online
- ↳ Toaru Majutsu No Index
- ↳ Tokyo Ghoul
- ↳ Typemoon Fate/Stay Night
- ↳ Yu-Gi-Oh
- ↳ Buildings
- ↳ Doodads
- ↳ Items
- ↳ SFX
- ↳ Tilesets
- ↳ Video Games
- ↳ Characters
- ↳ Other
- ↳ Devil May Cry
- ↳ Dota2
- ↳ Dynasty Warriors & Samurai Warriors
- ↳ Final Fantasy
- ↳ Fire Emblem
- ↳ Heroes of the Storm
- ↳ Hyperdimension Neptunia
- ↳ Kantai Collection
- ↳ King of Fighters
- ↳ Kingdom Hearts
- ↳ League Of Legends
- ↳ Lineage
- ↳ Mega Man
- ↳ Mobile Legends
- ↳ Mortal Kombat
- ↳ Plants vs Zombies
- ↳ Sonic Series
- ↳ Star Wars
- ↳ Super Smash Bros.
- ↳ Touhou Project
- ↳ Vocaloid & MikuMikuDance
- ↳ Warcraft
- ↳ Characters
- ↳ Blood Elves
- ↳ Dwarfs
- ↳ Humanoids
- ↳ Night Elves
- ↳ Orcs
- ↳ Taurens
- ↳ Trolls
- ↳ Undead
- ↳ Other
- ↳ Creatures & Mechanicals
- ↳ Critters
- ↳ Demons
- ↳ Dragon
- ↳ Elementals
- ↳ Mechanicals
- ↳ Buildings
- ↳ Doodads
- ↳ Items
- ↳ Special Effects
- ↳ Tilesets
- ↳ Starcraft
- ↳ Terran
- ↳ Zerg
- ↳ Protoss
- ↳ Other
- ↳ Doodads
- ↳ Custom UI
- ↳ Spells & Triggers
- ↳ Spells
- ↳ No Target
- ↳ Target Unit
- ↳ Target Ground
- ↳ Spell Packs
- ↳ Systems
- ↳ Work In Progress
- ↳ Graphics
- ↳ Icons
- ↳ Music & Sounds
- ↳ Terrain
- Other Game Modding
- ↳ Other game stuff, when it comes along.
- Hosted Projects
- ↳ Battlestadium DON
- ↳ Naruto Shippuuden: Akatsuki War
- ↳ Dragonball Budokai / Toshinden
- ↳ Naruto Ninpou
- ↳ Clash of Anime
- ↳ Holy Grail War
- Partners
- ↳ Warcraft 3 Modding Information Center
- ↳ Dragonball Budokai / Toshinden
- ↳ Battlestadium D.O.N.
- ↳ Naruto Ninpou
- ↳ Warcraft 3 Reddit
- ↳ Naruto Shippuuden: Akatsuki War
- ↳ Hero Wars League
- ↳ Holy Grail War
- ↳ WC3 Anime