- Joined
- Dec 30, 2006
- Messages
- 93
Introduction
Welcome to Billy2's Hero Revival Tutorial,
In this tutorial we shall be continuing on from my other tutorial http://www.hiveworkshop.com/forums/f283/tutorial-hero-selections-84923/, may i suggest that you complete that tutorial first before starting this one, just so you have something to work on.
Lets get started.
This is effective to use in a Hero Arena map.
You will firstly want to place a region in the Map Interface like this .
Open up the Trigger Editor and make a variable with the variable name as Hero_Revival, the variable type as Unit and the array of 2. (It should look like this ). As you see i have made mine with a Array of 2, all this means is that it has two of same variable type under the same name except for a different index. After it matches what i have click ok. Then make another variable with the name Revival_Point, the variable type as Point and the array of 2. (It should look like this ). Again i have put a array of two but this time is jugdeing that we have 2 teams 1 array for 1 team 1 and 1 array for team 2, you see?
Simple triggers here, ill tell and teach you how to clear up these leaks
Make a New Category by clicking the icon or hold Ctrl+G then a new trigger or hold Ctrl+T and name the trigger Set Player 1 Revival.
Okay, now make another trigger called Player 1 Hero Killed.
Well thats all there is too it, so congratulations you have just made a Hero Revival System which revives two teams, but remember if you want to revive more heros which are owned by more players just change the index of the variable called Hero_Revival to the number of players you want, then just make another trigger like you did but instead change the conditions of the unit being set to the player you want and change Set Hero_Revival[1] = (Entering unit) or Set Hero_Revival[2] = (Entering unit) the index of the player you want, keep it so Red is [1], blue is [2], teal is [3] etc... and just change the trigger where the unit dies to... i think you will know what to do for that.
Well this has been another successful tutorial by Billy2 here at the Hiveworkshop.com.
Feel free to add me if you are unsure of anything my email is [email protected].
All the best,
Billy2
Welcome to Billy2's Hero Revival Tutorial,
In this tutorial we shall be continuing on from my other tutorial http://www.hiveworkshop.com/forums/f283/tutorial-hero-selections-84923/, may i suggest that you complete that tutorial first before starting this one, just so you have something to work on.
Lets get started.
This is effective to use in a Hero Arena map.
Regions
You will firstly want to place a region in the Map Interface like this .
Variables
Open up the Trigger Editor and make a variable with the variable name as Hero_Revival, the variable type as Unit and the array of 2. (It should look like this ). As you see i have made mine with a Array of 2, all this means is that it has two of same variable type under the same name except for a different index. After it matches what i have click ok. Then make another variable with the name Revival_Point, the variable type as Point and the array of 2. (It should look like this ). Again i have put a array of two but this time is jugdeing that we have 2 teams 1 array for 1 team 1 and 1 array for team 2, you see?
Triggers
Simple triggers here, ill tell and teach you how to clear up these leaks
Make a New Category by clicking the icon or hold Ctrl+G then a new trigger or hold Ctrl+T and name the trigger Set Player 1 Revival.
-
Events
- Unit - A unit enters Hero Arena Team 1 Enter <gen>
-
Conditions
- (Owner of (Entering unit)) Equal to Player 1 (Red)
-
Actions
- Set Hero_Revival[1] = (Entering unit)
- Trigger - Turn off (This trigger)
-
Events
- Unit - A unit enters Hero Arena Team 1 Enter <gen>
-
Conditions
- (Owner of (Entering unit)) Equal to Player 2 (Blue)
-
Actions
- Set Hero_Revival[2] = (Entering unit)
- Trigger - Turn off (This trigger)
Okay, now make another trigger called Player 1 Hero Killed.
-
Events
- Unit - A unit Dies
-
Conditions
- (Dying unit) Equal to Hero_Revival[1]
-
Actions
- Wait 10.00 seconds
- Set Revival_Point[1] = (Center of Hero Arena Team 1 Enter <gen>)
- Hero - Instantly revive Hero_Revival[1] at Revival_Point[1], Hide revival graphics
- Custom script: call RemoveLocation(udg_Revival_Point[1])
-
Events
- Unit - A unit Dies
-
Conditions
- (Dying unit) Equal to Hero_Revival[2]
-
Actions
- Wait 10.00 seconds
- Set Revival_Point[2] = (Center of Hero Arena Team 2 Enter <gen>)
- Hero - Instantly revive Hero_Revival[2] at Revival_Point[2], Hide revival graphics
- Custom script: call RemoveLocation(udg_Revival_Point[2])
Well thats all there is too it, so congratulations you have just made a Hero Revival System which revives two teams, but remember if you want to revive more heros which are owned by more players just change the index of the variable called Hero_Revival to the number of players you want, then just make another trigger like you did but instead change the conditions of the unit being set to the player you want and change Set Hero_Revival[1] = (Entering unit) or Set Hero_Revival[2] = (Entering unit) the index of the player you want, keep it so Red is [1], blue is [2], teal is [3] etc... and just change the trigger where the unit dies to... i think you will know what to do for that.
Well this has been another successful tutorial by Billy2 here at the Hiveworkshop.com.
Feel free to add me if you are unsure of anything my email is [email protected].
All the best,
Billy2