- Joined
- Apr 17, 2009
- Messages
- 3,572
Hey Guys,
I'm working on the respawn "system" of my Dead Space map.
The idea is simple: Hero gets killed, countdown timer 20 sec appears, 20 sec later hero gets revived at specific position.
My problem is that I don't know how to indicate the expiration of the timer.
I know there is this event. Timer expires.
But it's specific, not general.
I would have to create a trigger for every single player.
There must be another way.
This what I have till now:
It leaks because of Wait.
Can somebody help me with this?
There must be a more comfortable and MUI way.
+rep for every help
chilla_gorilla
I'm working on the respawn "system" of my Dead Space map.
The idea is simple: Hero gets killed, countdown timer 20 sec appears, 20 sec later hero gets revived at specific position.
My problem is that I don't know how to indicate the expiration of the timer.
I know there is this event. Timer expires.
But it's specific, not general.
I would have to create a trigger for every single player.
There must be another way.
This what I have till now:
It leaks because of Wait.
-
RespawnTimerCreation
-
Events
-
Unit - A unit Dies
-
-
Conditions
-
((Triggering unit) is a Hero) Equal to True
-
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
'IF'-Conditions
-
GameMode Equal to 1
-
-
'THEN'-Actions
-
Set TempPosition[1] = HeroStartPosition[(Random integer number between 1 and 11)]
-
-
'ELSE'-Actions
-
-
-------- //////////////////////////////////////////////////////////////// --------
-
Set Deaths[(Player number of (Owner of (Triggering unit)))] = (Deaths[(Player number of (Owner of (Triggering unit)))] + 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
'IF'-Conditions
-
((Killing unit) is a Hero) Equal to True
-
-
'THEN'-Actions
-
Set Kills[(Player number of (Owner of (Killing unit)))] = (Kills[(Player number of (Owner of (Triggering unit)))] + 1)
-
Game - Display to (All players) the text: (PlayerColourName[(Player number of (Owner of (Dying unit)))] + ( has been killed by + PlayerColourName[(Player number of (Owner of (Killing unit)))]))
-
-
'ELSE'-Actions
-
Game - Display to (All players) the text: (PlayerColourName[(Player number of (Owner of (Dying unit)))] + ( has been killed by + creeps!))
-
-
-
-------- //////////////////////////////////////////////////////////////// --------
-
Countdown-Timer - Start RespawnTimer[(Player number of (Owner of (Dying unit)))] as a Einmalig timer that will expire in 20.00 seconds
-
Countdown-Timer - Create a timer window for (Last started timer) with title Respawn in:
-
Set RespawnTimerWindow[(Player number of (Owner of (Dying unit)))] = (Last created timer window)
-
Countdown-Timer - Hide (Last created timer window)
-
Countdown-Timer - Show RespawnTimerWindow[(Player number of (Owner of (Dying unit)))] for (Owner of (Dying unit))
-
Wait 20.00 seconds
-
Countdown-Timer - Destroy RespawnTimerWindow[(Player number of (Owner of (Dying unit)))]
-
Hero - Instantly revive (Dying unit) at TempPosition[1], Hide revival graphics
-
Camera - Pan camera for (Owner of (Dying unit)) to TempPosition[1] over 1.00 seconds
-
Game - Display to (All players matching ((Owner of (Dying unit)) Gleich (Matching player))) the text: |c000080FFY|c000683...
-
-
Can somebody help me with this?
There must be a more comfortable and MUI way.
+rep for every help
chilla_gorilla