HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

I need serious help please. trigger/variables

10-14-2003, 02:30 AM#1
Arsen
I asked this question at Warcraftiii.net but got poor response. So here I will post my replies from the thread I started over there.

"I don't know what triggers to use so that when a hero dies he respawns with same properties prior to death, in a certain amount of time, and dependant on his level . As of now I'm using altars to work around this problem but the heroes come out too slow and having 5 altars for each Force looks ugly."

"Alright I have two separate forces in the map, hence there are 2 spawning points.

Is there a condition that does the ownership comparison by forces instead of players?
I am asking so that I can avoid making a trigger for each player's hero.


EDIT:

Oh boy, I would have to create even more triggers since the wait time depends on the level of hero.
Example:
------------------------------------------------
Conditions-
trigering unit = to hero
triggering unit = to player 1
triggering unit = to level 1
Action -
wait 10 seconds
revive triggering unit at center of Spawn1
------------------------------------------------
Conditions-
trigering unit = to hero
triggering unit = to player 1
triggering unit = to level 2
Action -
wait 15 seconds
revive triggering unit at center of Spawn1
-----------------------------------------------

and so forth."


I received this response but I figure it has something to do with variable and I am completely new to variables. Perhaps one of you can give me a more detailed response.

"Event - A unit owned by (Allies of player 1) Dies

Condition - Triggering unit equal to hero equal to true

Action - Wait (Interger (Level of (Triggering Unit) times (however long you want it to be))

Action - Revive (Triggering Unit)"
10-14-2003, 02:55 AM#2
Dragon
Change "Triggering Unit" to "Dieing Unit"
10-14-2003, 03:30 AM#3
Illithid
the trigger listed is slightly wrong, correct would be

Event
A unit dies {unit - generic unit Event}
Condition
dying unit equal to hero equal to true {boolean, unit classification check}
Action
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Dying unit) belongs to an ally of Player 1 (Red)) Equal to True
Then - Actions
Wait (8.00 x (Real((Hero level of (Dying unit))))) game-time seconds
Hero - Instantly revive (Dying unit) at (Center of Region 000 <gen>), Hide revival graphics
Else - Actions
Wait (8.00 x (Real((Hero level of (Dying unit))))) game-time seconds
Hero - Instantly revive (Dying unit) at (Center of Region 001 <gen>), Hide revival graphics

No variables are needed to reserrect heroes, the regions are just what ever location you want each side to spawn at. To get hero level of the hero, for multiplying by the time you use convert - integer to real. checking if a player is an ally of something is a boolean check - unit belongs to ally of player. Player 1 was chosen assuming that it was computer player for one team, and that you have it set in scenario/ force properties, that you have 2 forces that have all players in each force allied.
10-14-2003, 03:46 AM#4
Arsen
:ggani: Thank you very much.
10-14-2003, 03:54 AM#5
SpectreReturns
And if you want the time inbetween revives to change per level, as the ones you have listed, its like this.

Wait (Arithmitic(Arithmitic((Hero level of (Dying Unit) x (5.00)) + (5))