Hello everyone. I was wondering if there is anyone that wants to help me with map editing. I know that i may sound outdated , but still i love editing and i need your help, in creating revivable heroes and stuff. I tried myself but my knowledge are not in a strong level. On the contrary, my questions will be easy for you.
Sp i search in the web to find a hero reviving system and a random picking system, for 6 players ( 3 on each team). I tryied almost everything i found, but still none revives. On the other hand i foundd a way to randomize the hero pick, but that goes only for one player.
This is my trigger
Events Game -Map initialization Local Variables Unit Integer = (Random integer between 1 and 3) <Integer[1]> Unit Type = Master Zeratul - Void <Game Link - Unit[1]> Unit Type 2 = Alarak - Void <Game Link - Unit[1]> Unit Type 3 = Jim Raynor (Sniper) <Game Link - Unit[1]> Conditions Actions General -If (Conditions) then do (Actions) else do (Actions) If Unit Integer[0] == 1 Then Unit -Create 1 Master Zeratul - Void for player 1 at Hero Spawn 1 facing 270.0 degrees (No Options) Else General -If (Conditions) then do (Actions) else do (Actions) If Unit Integer[0] == 2 Then Unit -Create 1 Alarak - Void for player 1 at Hero Spawn 1 facing 270.0 degrees (No Options) Else General -If (Conditions) then do (Actions) else do (Actions) If Unit Integer[0] == 3 Then Else Unit -Create 1 Jim Raynor (Sniper) for player 1 at Hero Spawn 1 facing 270.0 degrees (No Options)
I'm having trouble understanding your question with how it's worded... but from what I understand you want to have random heroes created for each player (Zeratul, Raynor, or Alarak) and have them be revivable.
So you want each player to be stuck with the hero they get in the map initialization or constantly receive a random hero whenever their hero dies? I'm going to assume, for now, you want them to keep the Hero they start with.
Here's what I'd do...
Create a variable called "Heroes" and check the box in the right called "array" and change it from "Integer" to "Unit". Keep the dimension at 1 and make the size "6". This is where we'll store each player's Hero.
Make a trigger (I'm gonna call it "Assign Heroes" but you can call it whatever you want). Here is how I'd make it look
Events
-Game-Map Initialization
Local Variables
-PickedHero=0<Integer>
Actions
-Set PickedHero = (Random integer between 1 and 3)
-General-If (Conditions) then do multiple (Actions)
--If Then Else
---General-Else If (Conditions) then do (Actions)
----Else If
-----pickedhero=1
----Then
-----Create 1 Master Zeratul - Void for player 1 at Hero Spawn 1 facing 270.0 degrees (No Options)
---General-Else If (Conditions) then do (Actions)
----Else If
-----pickedhero=2
----Then
-----Create 1 Alarak - Void for player 1 at Hero Spawn 1 facing 270.0 degrees (No Options)
---General-Else If (Conditions) then do (Actions)
----Else If
-----pickedhero=3
----Then
-----Create 1 Jim Raynor (Sniper) for player 1 at Hero Spawn 1 facing 270.0 degrees (No Options)
-Set Heroes[0] = (Last created unit)
-Set PickedHero = (Random integer between 1 and 3)
-General-If (Conditions) then do multiple (Actions)
--If Then Else
---General-Else If (Conditions) then do (Actions)
----Else If
-----pickedhero=1
----Then
-----Create 1 Master Zeratul - Void for player 2 at Hero Spawn 2 facing 270.0 degrees (No Options)
---General-Else If (Conditions) then do (Actions)
----Else If
-----pickedhero=2
----Then
-----Create 1 Alarak - Void for player 2 at Hero Spawn 2 facing 270.0 degrees (No Options)
---General-Else If (Conditions) then do (Actions)
----Else If
-----pickedhero=3
----Then
-----Create 1 Jim Raynor (Sniper) for player 2 at Hero Spawn 2 facing 270.0 degrees (No Options)
-Set Heroes[1] = (Last created unit)
-Set PickedHero = (Random integer between 1 and 3)
-General-If (Conditions) then do multiple (Actions)
--If Then Else
---General-Else If (Conditions) then do (Actions)
----Else If
-----pickedhero=1
----Then
-----Create 1 Master Zeratul - Void for player 3 at Hero Spawn 3 facing 270.0 degrees (No Options)
---General-Else If (Conditions) then do (Actions)
----Else If
-----pickedhero=2
----Then
-----Create 1 Alarak - Void for player 3 at Hero Spawn 3 facing 270.0 degrees (No Options)
---General-Else If (Conditions) then do (Actions)
----Else If
-----pickedhero=3
----Then
-----Create 1 Jim Raynor (Sniper) for player 3 at Hero Spawn 3 facing 270.0 degrees (No Options)
-Set Heroes[2] = (Last created unit)
-Set PickedHero = (Random integer between 1 and 3)
-General-If (Conditions) then do multiple (Actions)
--If Then Else
---General-Else If (Conditions) then do (Actions)
----Else If
-----pickedhero=1
----Then
-----Create 1 Master Zeratul - Void for player 4 at Hero Spawn 4 facing 270.0 degrees (No Options)
---General-Else If (Conditions) then do (Actions)
----Else If
-----pickedhero=2
----Then
-----Create 1 Alarak - Void for player 4 at Hero Spawn 4 facing 270.0 degrees (No Options)
---General-Else If (Conditions) then do (Actions)
----Else If
-----pickedhero=3
----Then
-----Create 1 Jim Raynor (Sniper) for player 4 at Hero Spawn 4 facing 270.0 degrees (No Options)
-Set Heroes[3] = (Last created unit)
-Set PickedHero = (Random integer between 1 and 3)
-General-If (Conditions) then do multiple (Actions)
--If Then Else
---General-Else If (Conditions) then do (Actions)
----Else If
-----pickedhero=1
----Then
-----Create 1 Master Zeratul - Void for player 5 at Hero Spawn 5 facing 270.0 degrees (No Options)
---General-Else If (Conditions) then do (Actions)
----Else If
-----pickedhero=2
----Then
-----Create 1 Alarak - Void for player 5 at Hero Spawn 5 facing 270.0 degrees (No Options)
---General-Else If (Conditions) then do (Actions)
----Else If
-----pickedhero=3
----Then
-----Create 1 Jim Raynor (Sniper) for player 5 at Hero Spawn 5 facing 270.0 degrees (No Options)
-Set Heroes[4] = (Last created unit)
-Set PickedHero = (Random integer between 1 and 3)
-General-If (Conditions) then do multiple (Actions)
--If Then Else
---General-Else If (Conditions) then do (Actions)
----Else If
-----pickedhero=1
----Then
-----Create 1 Master Zeratul - Void for player 6 at Hero Spawn 6 facing 270.0 degrees (No Options)
---General-Else If (Conditions) then do (Actions)
----Else If
-----pickedhero=2
----Then
-----Create 1 Alarak - Void for player 6 at Hero Spawn 6 facing 270.0 degrees (No Options)
---General-Else If (Conditions) then do (Actions)
----Else If
-----pickedhero=3
----Then
-----Create 1 Jim Raynor (Sniper) for player 6 at Hero Spawn 6 facing 270.0 degrees (No Options)
-Set Heroes[5] = (Last created unit)
If you make a trigger like that, it should pick a random hero for each player and create them as well as assign them to a point in the array variable I would have created earlier.
If I was making this map and only had players have literally just their Hero to control, I would make a really simple revival trigger that just detects when a unit dies, then respawns it at the Hero Spawn for the player. Since I'm not sure the scope of the map, I'm going to create a trigger that leaves room for the possibility of controlling more units. I'll just call My Trigger "Revival"
Events
-Any unit dies.
Actions
-If (Conditions) then do multiple (Actions)
--If Then Else
---General-Else if (Conditions) then do (Actions)
-----Else If
------(Triggering unit) == Heroes[0]
-----Then
------Wait 10.0 Game Time Seconds
------Create 1 Heroes[0] for player (Owner of (Triggering Unit)) at Hero Spawn 1
---General-Else if (Conditions) then do (Actions)
-----Else If
------(Triggering unit) == Heroes[1]
-----Then
------Wait 10.0 Game Time Seconds
------Create 1 Heroes[1] for player (Owner of (Triggering Unit)) at Hero Spawn 2
---General-Else if (Conditions) then do (Actions)
-----Else If
------(Triggering unit) == Heroes[2]
-----Then
------Wait 10.0 Game Time Seconds
------Create 1 Heroes[2] for player (Owner of (Triggering Unit)) at Hero Spawn 3
---General-Else if (Conditions) then do (Actions)
-----Else If
------(Triggering unit) == Heroes[3]
-----Then
------Wait 10.0 Game Time Seconds
------Create 1 Heroes[3] for player (Owner of (Triggering Unit)) at Hero Spawn 4
---General-Else if (Conditions) then do (Actions)
-----Else If
------(Triggering unit) == Heroes[4]
-----Then
------Wait 10.0 Game Time Seconds
------Create 1 Heroes[4] for player (Owner of (Triggering Unit)) at Hero Spawn 5
---General-Else if (Conditions) then do (Actions)
-----Else If
------(Triggering unit) == Heroes[5]
-----Then
------Wait 10.0 Game Time Seconds
------Create 1 Heroes[5] for player (Owner of (Triggering Unit)) at Hero Spawn 6
Keep in mind this is not a "true" revival Trigger. It's creating a WHOLE new hero, just the same unit type of hero. You can also change the Wait time to be whatever you want.
This should be able to handle your creation and revival needs at a VERY basic level.
First of all, i cant believe that i had an answer almost immediately. Ty so much my brother for the help, and the good int;ensions.
I am at work now but i am gonna try everything when i go back in home. Let me ask you something more
Is there any possibility the hero that is revived( i know it is a new unit, just saying) to keep a portion or 100% of the exp;erience it had before dieing. I am asking that cause i have a veterancy system (3 levels) and i want to keep it. I dont have items , or abilitiew to be learned, so just keeping the experience is more than enough for me
Revival Events Unit -Any Unit dies Local Variables Heroes = No Unit <Unit[6]> Conditions Actions General -If (Conditions) then do multiple (Actions) If Then Else General -Else if (Conditions) then do (Actions) Else If (Triggering unit) == Heroes[0] Then General -Wait 10.0 Real Time seconds Unit -Create 1 (Unit type of Heroes[0]) for player (Owner of (Triggering unit)) at Hero Spawn 1 facing (Position of (Triggering unit)) (No Options)
I tried this for player 1 to test it and is not working. Did i do something wrong?
Probably will need at least 3 triggers for this. One to create the hero on map initialization, a second trigger on hero death to store exp and a third to make the new one. Alternatively do like coop and use a damage response buff to teleport and disable the hero until regenerated.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
One possibility for hero revival is to set their death time in data to a really long time (longer than the time it takes to revive them). Then use the revive action to bring them back to life when appropriate. This should keep all the experience.
Revival Events Unit -Any Unit dies Local Variables Heroes = No Unit <Unit[6]> Conditions Actions General -If (Conditions) then do multiple (Actions) If Then Else General -Else if (Conditions) then do (Actions) Else If (Triggering unit) == Heroes[0] Then General -Wait 10.0 Real Time seconds Unit -Create 1 (Unit type of Heroes[0]) for player (Owner of (Triggering unit)) at Hero Spawn 1 facing (Position of (Triggering unit)) (No Options)
I tried this for player 1 to test it and is not working. Did i do something wrong?
Well, in this instance, you haven't assigned a unit into the local variable. I would try making the "heroes" variable a global variable by making it in the space where all the triggers are, so you can use the variable in both triggers I put in the spoilers in my first post. Would you like me to provide you with an example map with the triggers I suggested?
Hello everyone. I was wondering if there is anyone that wants to help me with map editing. I know that i may sound outdated , but still i love editing and i need your help, in creating revivable heroes and stuff. I tried myself but my knowledge are not in a strong level. On the contrary, my questions will be easy for you.
Sp i search in the web to find a hero reviving system and a random picking system, for 6 players ( 3 on each team). I tryied almost everything i found, but still none revives. On the other hand i foundd a way to randomize the hero pick, but that goes only for one player.
This is my trigger
Events
Game -Map initialization
Local Variables
Unit Integer = (Random integer between 1 and 3) <Integer[1]>
Unit Type = Master Zeratul - Void <Game Link - Unit[1]>
Unit Type 2 = Alarak - Void <Game Link - Unit[1]>
Unit Type 3 = Jim Raynor (Sniper) <Game Link - Unit[1]>
Conditions
Actions
General -If (Conditions) then do (Actions) else do (Actions)
If
Unit Integer[0] == 1
Then
Unit -Create 1 Master Zeratul - Void for player 1 at Hero Spawn 1 facing 270.0 degrees (No Options)
Else
General -If (Conditions) then do (Actions) else do (Actions)
If
Unit Integer[0] == 2
Then
Unit -Create 1 Alarak - Void for player 1 at Hero Spawn 1 facing 270.0 degrees (No Options)
Else
General -If (Conditions) then do (Actions) else do (Actions)
If
Unit Integer[0] == 3
Then
Else
Unit -Create 1 Jim Raynor (Sniper) for player 1 at Hero Spawn 1 facing 270.0 degrees (No Options)
Have a nice day, and i hope i will find some help
I'm having trouble understanding your question with how it's worded... but from what I understand you want to have random heroes created for each player (Zeratul, Raynor, or Alarak) and have them be revivable.
So you want each player to be stuck with the hero they get in the map initialization or constantly receive a random hero whenever their hero dies? I'm going to assume, for now, you want them to keep the Hero they start with.
Here's what I'd do...
This should be able to handle your creation and revival needs at a VERY basic level.
First of all, i cant believe that i had an answer almost immediately. Ty so much my brother for the help, and the good int;ensions.
I am at work now but i am gonna try everything when i go back in home. Let me ask you something more
Is there any possibility the hero that is revived( i know it is a new unit, just saying) to keep a portion or 100% of the exp;erience it had before dieing. I am asking that cause i have a veterancy system (3 levels) and i want to keep it. I dont have items , or abilitiew to be learned, so just keeping the experience is more than enough for me
Once more, thank you for your help
I tried this for player 1 to test it and is not working. Did i do something wrong?
Probably will need at least 3 triggers for this. One to create the hero on map initialization, a second trigger on hero death to store exp and a third to make the new one. Alternatively do like coop and use a damage response buff to teleport and disable the hero until regenerated.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
One possibility for hero revival is to set their death time in data to a really long time (longer than the time it takes to revive them). Then use the revive action to bring them back to life when appropriate. This should keep all the experience.
In reply to Forge_User_68728548:
Look at the CM_HeroHandleDeath action definition for the allied commanders mod for coop.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg