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:
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)
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?
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.
QFT, "Essentially it's trying to create a unit of type PlayerCharacterType, 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.