So I've read the forums all day and watched a bunch of tutorials and gone about doing this several different ways, but I cannot get my map to respawn heroes.
The basic idea of the map is that you choose a hero and then fight with the hero; if hero dies, he respawns at a specific point. For some reason I cannot get the respawn to work. I've even directly copied triggers from the tutorials I've used to no avail.
You can look at what I've gotten so far in the map file:
I also am having a strange problem. I made some copies of behaviors and ever since then whenever I add an action or anything it has duplicates of every label. Like if you add an action it has all the labels on the left and each label is duplicated for how many things I copied. I don't know if that is normal or not..
Also, I'm a noob when it comes to the editor but I do know C + +
Anyway, I appreciate the help guys.
EDIT: Debugging errors:
00:00:47.13 Trigger Error in 'gt_HeroDeath_Func': Parameter out of bounds in 'CameraPan' (value: 16, min: 0, max: 15)
00:00:47.13 Trigger Error in 'gt_HeroDeath_Func': Parameter out of bounds in 'UnitSelect' (value: 16, min: 0, max: 15)
It seems like you are accessing values of arrays that don't exist. Are there arrays in these tutorials that you didn't update to suit your needs? (a.k.a the tutorial is working with 15 heroes, but your map calls for 20. If you copied the trigger directly, then when your trigger accesses a value over 15, it freaks out.)
There's a neat immortality behavior in the wurm mission (the second to last one where raynor goes underground). You can copy this into your map and assign it to heroes. Then you can have a trigger that "revives" heroes when they take what would normally be lethal damage.
I'm a bit baffled because I have no arrays of that size. My biggest array goes to size 4, but I never try to access an out of bound value. I have no idea what the deal is with that error.
The biggest possibility then is some function is being called that will only accept values within a certain range and you are passing a variable that exceeds that range. Find the HeroDeath function (since that is apparently where the problem is occurring) and see if you can trace where the problem is coming from.
I'm in a class right now, so if you still need help by tonight I will look at your map and see if I can find anything.
Hero Death isn't a function though, it's a trigger. And there's nothing in the trigger that I can see which corresponds to anything in the error message.
EDIT: Also note that VA Hero Death Prevention (Or whatever its exactly called) doesn't seem to work. You just those the character when it dies, even though I definitely set the behaviors in the data portion for each hero.
EDIT2: I reset the Va Hero Death Prevention behavior to its parent and now the hero does indeed go incapacitated, but does not revive properly still, checking into it.
FINAL EDIT:
After I did that I just had to change a little thing in my trigger and it worked. I have no idea what I messed with in the Hero Death Prevention Trigger but once I reset it it was all good.
The only good way to revive hero is by using banks. Create a trigger that will store unit in banks when he takes critical damage. Also edit data value for the unit, there are 2 fields that have something to do with death, something about how long the game will store the unit after death before removing all data from the game. Set those values to at least 1 sec.
Use bank function 'restore unit' to revive. Dont forget to set units health to >1 after he dies and before he revives or he will be restored with 0 health and die instantly.
well honestly, the data editor is the only 100% foolproof no foul up way of reviving heroes. However in my map i use both methods , cause the triggered one doesnt like to fire all the time.
-For the data editor method all you need to do is make sure heroes death time is Infinte (lasts forever), and create an ability based on Revive. then give that to the unit you want to do the reviving for.
-For the triggered method, Its usually involves using a Wait , Then use a custom script = General - Custom Script: UnitRevive (lv_dieingHero);
Dieing hero is a local variable for "triggering unit" (likewise, hero death time has to be set to infinite)
So I've read the forums all day and watched a bunch of tutorials and gone about doing this several different ways, but I cannot get my map to respawn heroes.
The basic idea of the map is that you choose a hero and then fight with the hero; if hero dies, he respawns at a specific point. For some reason I cannot get the respawn to work. I've even directly copied triggers from the tutorials I've used to no avail.
You can look at what I've gotten so far in the map file:
http://www.megaupload.com/?d=BB956BUV
I also am having a strange problem. I made some copies of behaviors and ever since then whenever I add an action or anything it has duplicates of every label. Like if you add an action it has all the labels on the left and each label is duplicated for how many things I copied. I don't know if that is normal or not..
Also, I'm a noob when it comes to the editor but I do know C + +
Anyway, I appreciate the help guys.
EDIT: Debugging errors:
00:00:47.13 Trigger Error in 'gt_HeroDeath_Func': Parameter out of bounds in 'CameraPan' (value: 16, min: 0, max: 15)
00:00:47.13 Trigger Error in 'gt_HeroDeath_Func': Parameter out of bounds in 'UnitSelect' (value: 16, min: 0, max: 15)
@Slims20: Go
It seems like you are accessing values of arrays that don't exist. Are there arrays in these tutorials that you didn't update to suit your needs? (a.k.a the tutorial is working with 15 heroes, but your map calls for 20. If you copied the trigger directly, then when your trigger accesses a value over 15, it freaks out.)
There's a neat immortality behavior in the wurm mission (the second to last one where raynor goes underground). You can copy this into your map and assign it to heroes. Then you can have a trigger that "revives" heroes when they take what would normally be lethal damage.
About to head to sleep, but I appreciate the reply. I will investigate tomorrow morning and provide an update to the situation.
I'm a bit baffled because I have no arrays of that size. My biggest array goes to size 4, but I never try to access an out of bound value. I have no idea what the deal is with that error.
@Slims20: Go
The biggest possibility then is some function is being called that will only accept values within a certain range and you are passing a variable that exceeds that range. Find the HeroDeath function (since that is apparently where the problem is occurring) and see if you can trace where the problem is coming from.
I'm in a class right now, so if you still need help by tonight I will look at your map and see if I can find anything.
@Abion47: Go
Hero Death isn't a function though, it's a trigger. And there's nothing in the trigger that I can see which corresponds to anything in the error message.
EDIT: Also note that VA Hero Death Prevention (Or whatever its exactly called) doesn't seem to work. You just those the character when it dies, even though I definitely set the behaviors in the data portion for each hero.
EDIT2: I reset the Va Hero Death Prevention behavior to its parent and now the hero does indeed go incapacitated, but does not revive properly still, checking into it.
FINAL EDIT:
After I did that I just had to change a little thing in my trigger and it worked. I have no idea what I messed with in the Hero Death Prevention Trigger but once I reset it it was all good.
I appreciate you taking some time to help!
well honestly, the data editor is the only 100% foolproof no foul up way of reviving heroes. However in my map i use both methods , cause the triggered one doesnt like to fire all the time.
-For the data editor method all you need to do is make sure heroes death time is Infinte (lasts forever), and create an ability based on Revive. then give that to the unit you want to do the reviving for.
-For the triggered method, Its usually involves using a Wait , Then use a custom script = General - Custom Script: UnitRevive (lv_dieingHero);
Dieing hero is a local variable for "triggering unit" (likewise, hero death time has to be set to infinite)