I know recently there was a data tutorial on doing revival... well I did the flipside which is the trigger method... heroes will revive with level, items, etc...
Part 1:
Right click the video and click watch on youtube to get widescreen/fullscreen.
Subsequent parts in the descriptions...Map DL link in the descriptions too.
Thanks Vjeux! Are you working on any cool secret maps? I never know what you're up to haha.
During the day i'm mostly at school. And I spend the rest of the time finding great stuff to news, writing the news (this is some work!), harassing people so they promote their work (making videos, description ...), reading the forums and hanging out on irc, organizing contests, (being with my girl friend: really important!) ...
Administrating mapster is a full time job :) I focus on mapster than on a personal project as it will touch a lot more people (there are around 10k people coming on mapster each day).
But one day, I'll make an awesome map. It will blow up your mind! :)
to your question, i think you can remove the items instantly after you added them to your tempgroup. i wasnt sure either but i did a little test that should proove that the unit data can still be read out even after they were removed because they are still saved in the unit group.
i created a map and placed a marine, a marauder and a raven on it.
then i created this trigger:
all three unit names get displayed, even if the marine doesnt exist anymore. so imo you can instantly remove all dropped items after you added them to your group.
you also said that triggering unit looses its referrence after a wait. im not sure about this because as far as i know in wc3 triggering unit did never lose its reference, i dont know how it is in sc2, but your way is the save and cleaner one anyways.
what i found a bit strange was the death time issue. even if the unit is saved into the variable it seems that the variable is empty after the unit dissappiered from the map? i dont really understand why id doesnt work because this actually works:
unitdespawntestEventsTimer-Elapsedtimeis0.0GameTimesecondsLocalVariablestu=Marine[61.64,62.36]<Unit>
Conditions
Actions
Unit - Remove Marine [61.64,62.36] from the game
Unit - Create 1 (Unit type of tu) for player 1 at (Center of (Entire map)) facing 270.0 degrees (No Options)
Also, good to know about removing... but yeah triggering unit has lost its reference for me in one of my published maps which I had to fix by storing it.
To Sublimity: Good to know. Both work... it also demonstrates using Pick each unit, which a lot of people could use some familiarity with.
i have a question about arrays when it comes to the variables "dieing hero" and "temp group" if i make array 12 (going to be 12 players in my map with heroes) do i need to make 12 seperate, identical revive codes with only the indexes changed for each line needed, or will one trigger do this for all players, with somethin special put in the index spaces?
@Mille25: Go
To Sublimity: Good to know. Both work... it also demonstrates using Pick each unit, which a lot of people could use some familiarity with.
You'd have to use Pick Unit anyway, to hide the items.
Like I said... you don't need that unless they're global variables. Since it is a trigger that has local variables, it will be run in "instances" for each player's hero that dies... and thus you don't need 12 sized array.
Does this method still work? I went through this exact tutorial today and my heroes don't seem to want to respawn. I still get the message and the camera moves, but no respawn!
The unit type is a hero, and the death time stat are set to 10.
EDIT: I found that my problem was that I had the Stats - Revive Time and Stats - Revive Delay filled in as well.
Once I got rid of those, it worked like a charm. Thanks again OneTwoSC
Alright, well your trigger works, but only with one hero...
Could you please help me with making my other 11 heroes to work?
Your trigger at the end tells who owns the hero, and one of my heroes says that I own it, while the others say that player 16 owns them...I don't even have a player 16 on my map.
QFT, "Essentially it's trying to create a unit of type PlayerCharacterType[16], which doesn't exist. My only guess as to why your conditions don't stop this is because you have a wait 2 seconds timer; and I think that during those 2 seconds the ownership of said dying unit might somehow switch (to player 16? because unit decays?). What you may want to do is use a local variable int PlayerOwn = 0 then run set PlayerOwn = TriggeringPlayer at the very beginning of the trigger. Then instead of TriggeringPlayer, use the variable PlayerOwn. That way, if the ownership of dying unit somehow switches during those 2 seconds of game-time, it won't matter."
Actually, after playing around with the Trigger Editor and the Data Editor for 4 days, I finally figured out what my problem was. That last link of your Cooltycho didn't apply to me because I was using the custom script to revive the hero, not creating a completely new one.
You have to make sure that the Revive Delay and Revive Time are set to 0 (Mine already were, that wasn't the problem). You have to set a Death Time of at least 1 second, otherwise your hero will not revive, as if it was a one time use kind of unit.
EDIT: THIS METHOD IS OLD NOW... New tutorial at: http://forums.sc2mapster.com/resources/tutorials/13715-video-new-hero-revival-tutorial/
I know recently there was a data tutorial on doing revival... well I did the flipside which is the trigger method... heroes will revive with level, items, etc...
Part 1:
Right click the video and click watch on youtube to get widescreen/fullscreen.
Subsequent parts in the descriptions...Map DL link in the descriptions too.
Really nice tutorial :)
I really like how you explain things.
@vjeux: Go
Thanks Vjeux! Are you working on any cool secret maps? I never know what you're up to haha.
Thanks for making this!
During the day i'm mostly at school. And I spend the rest of the time finding great stuff to news, writing the news (this is some work!), harassing people so they promote their work (making videos, description ...), reading the forums and hanging out on irc, organizing contests, (being with my girl friend: really important!) ...
Administrating mapster is a full time job :) I focus on mapster than on a personal project as it will touch a lot more people (there are around 10k people coming on mapster each day).
But one day, I'll make an awesome map. It will blow up your mind! :)
@vjeux: Go
Ah yeah I totally understand your situation. Sometimes I just want to be free and fly awa- *fell off the cliff*
nice guide.
to your question, i think you can remove the items instantly after you added them to your tempgroup. i wasnt sure either but i did a little test that should proove that the unit data can still be read out even after they were removed because they are still saved in the unit group.
i created a map and placed a marine, a marauder and a raven on it.
then i created this trigger:
all three unit names get displayed, even if the marine doesnt exist anymore. so imo you can instantly remove all dropped items after you added them to your group.
you also said that triggering unit looses its referrence after a wait. im not sure about this because as far as i know in wc3 triggering unit did never lose its reference, i dont know how it is in sc2, but your way is the save and cleaner one anyways.
what i found a bit strange was the death time issue. even if the unit is saved into the variable it seems that the variable is empty after the unit dissappiered from the map? i dont really understand why id doesnt work because this actually works:
greez ;)
Hey. nice tutorial, but I have one comment.
There's no reason to do:
You could just use an assignment statement.
@Mille25: Go
Death time is important. Won't work without it.
Also, good to know about removing... but yeah triggering unit has lost its reference for me in one of my published maps which I had to fix by storing it.
To Sublimity: Good to know. Both work... it also demonstrates using Pick each unit, which a lot of people could use some familiarity with.
i have a question about arrays when it comes to the variables "dieing hero" and "temp group" if i make array 12 (going to be 12 players in my map with heroes) do i need to make 12 seperate, identical revive codes with only the indexes changed for each line needed, or will one trigger do this for all players, with somethin special put in the index spaces?
@MangledMind: Go
the index is the player that owns the triggering unit.
You'd have to use Pick Unit anyway, to hide the items.
@MangledMind: Go
Like I said... you don't need that unless they're global variables. Since it is a trigger that has local variables, it will be run in "instances" for each player's hero that dies... and thus you don't need 12 sized array.
Does this method still work? I went through this exact tutorial today and my heroes don't seem to want to respawn. I still get the message and the camera moves, but no respawn!
The unit type is a hero, and the death time stat are set to 10.
Thanks in advance!
so where exactly is the Death time unit parameter in the current version of the starcraft 2 editor?
your tutorial was made using the beta editor and therefore I can't follow along because everything has changed in the menus/etc.
@lorenzlorenz: Go
Stats - Death Time.
And yes it does still work.
@OneTwoSC: Go
EDIT: I found that my problem was that I had the Stats - Revive Time and Stats - Revive Delay filled in as well. Once I got rid of those, it worked like a charm. Thanks again OneTwoSC
Alright, well your trigger works, but only with one hero...
Could you please help me with making my other 11 heroes to work?
Your trigger at the end tells who owns the hero, and one of my heroes says that I own it, while the others say that player 16 owns them...I don't even have a player 16 on my map.
@deleted_4934777: Go
yo chump, i was having this same problem cuz i'm cool and found the following info helpful [Trigger Help] Getting Error I can't figure out.
QFT, "Essentially it's trying to create a unit of type PlayerCharacterType[16], which doesn't exist. My only guess as to why your conditions don't stop this is because you have a wait 2 seconds timer; and I think that during those 2 seconds the ownership of said dying unit might somehow switch (to player 16? because unit decays?). What you may want to do is use a local variable int PlayerOwn = 0 then run set PlayerOwn = TriggeringPlayer at the very beginning of the trigger. Then instead of TriggeringPlayer, use the variable PlayerOwn. That way, if the ownership of dying unit somehow switches during those 2 seconds of game-time, it won't matter."
Actually, after playing around with the Trigger Editor and the Data Editor for 4 days, I finally figured out what my problem was. That last link of your Cooltycho didn't apply to me because I was using the custom script to revive the hero, not creating a completely new one.
You have to make sure that the Revive Delay and Revive Time are set to 0 (Mine already were, that wasn't the problem). You have to set a Death Time of at least 1 second, otherwise your hero will not revive, as if it was a one time use kind of unit.