Uszi
New Member
- Reaction score
- 5
Hey all.
I'm using a "Down" system in my map... I've talked about bugs I've had with it before.
Its nearly finished. The problem is that when you go down, I would like to turn collision off for the dead person so you can walk through them. Right now, you could strategically have a teammate die in a choke point, and their corpse will work as an impassable barrier making you immune to damage.
I use "Unit - Turn collision for TempUnit Off" but it doesn't work.
These are my triggers:
I suppose the cheap fix would be to set the unit's collision to 0, or something really small, in the Object Editor. It shouldn't affect my gameplay much.
I'm using a "Down" system in my map... I've talked about bugs I've had with it before.
Its nearly finished. The problem is that when you go down, I would like to turn collision off for the dead person so you can walk through them. Right now, you could strategically have a teammate die in a choke point, and their corpse will work as an impassable barrier making you immune to damage.
I use "Unit - Turn collision for TempUnit Off" but it doesn't work.
These are my triggers:
Code:
Down
Events
Unit - A unit Dies
Conditions
(Dying unit) Equal to PlayerUnit[(Player number of (Owner of (Dying unit)))]
Actions
Set TempUnit = (Dying unit)
Set TempPoint = (Position of (Dying unit))
Set PlayerDead = (PlayerDead + 1)
Set PlayerDeadBool[(Player number of (Owner of (Dying unit)))] = True
Set Downs[(Player number of (Owner of (Dying unit)))] = (Downs[(Player number of (Owner of (Dying unit)))] + 1)
-------- --------------------------------------- --------
Visibility - Create an initially Enabled visibility modifier for (Owner of TempUnit) emitting Visibility from TempPoint to a radius of 400.00
Set Vis[(Player number of (Owner of (Dying unit)))] = (Last created visibility modifier)
Hero - Instantly revive TempUnit at TempPoint, Hide revival graphics
Unit - Turn collision for TempUnit Off
Cinematic - Ping minimap for (All players) at TempPoint for 1.00 seconds
Special Effect - Create a special effect attached to the overhead of (Triggering unit) using Abilities\Spells\Other\TalkToMe\TalkToMe.mdl
Set ExclamationPoint[(Player number of (Owner of TempUnit))] = (Last created special effect)
Game - Display to (All players) for 10.00 seconds the text: (PlayerNames[(Player number of (Owner of TempUnit))] + is down! Someone revive him!)
Game - Display to (Player group((Owner of TempUnit))) for 10.00 seconds the text: You have been incap...
Custom script: call RemoveLocation( udg_TempPoint )
-------- --------------------------------------- --------
Unit - Change ownership of TempUnit to Neutral Passive and Retain color
Hero - Disable experience gain for TempUnit
Unit - Remove All buffs from TempUnit
Unit - Pause TempUnit
Animation - Change TempUnit's vertex coloring to (75.00%, 75.00%, 75.00%) with 15.00% transparency
Unit - Set life of TempUnit to 1.00
Unit - Set mana of TempUnit to 1.00
Unit - Add classification of An Ancient to TempUnit
Animation - Play TempUnit's death animation
Trigger - Run Sort Multiboard <gen> (ignoring conditions)
Code:
Defibulate v2
Events
Time - Every 0.10 seconds of game time
Conditions
Actions
Player Group - Pick every player in Survivors and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
PlayerDeadBool[(Player number of (Picked player))] Equal to False
And - All (Conditions) are true
Conditions
PlayerDeadBool[(Player number of (Picked player))] Equal to True
(PlayerUnit[(Player number of (Picked player))] has buff Defibrillated (Pause)) Equal to False
Then - Actions
Skip remaining actions
Else - Actions
Set TempPoint = (Position of PlayerUnit[(Player number of (Picked player))])
Set TempUnit = PlayerUnit[(Player number of (Picked player))]
Unit - Change ownership of TempUnit to (Picked player) and Retain color
Special Effect - Create a special effect at (Position of TempUnit) using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
Special Effect - Destroy (Last created special effect)
Special Effect - Destroy ExclamationPoint[(Player number of (Picked player))]
Unit - Unpause TempUnit
Selection - Select TempUnit for (Owner of TempUnit)
Unit - Remove All buffs from TempUnit
Animation - Play TempUnit's stand animation
Hero - Enable experience gain for TempUnit
Animation - Change TempUnit's vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
Unit - Set life of TempUnit to 70.00%
Unit - Set mana of TempUnit to 30.00%
Unit - Turn collision for TempUnit On
Unit - Remove classification of An Ancient from (Triggering unit)
Set PlayerDead = (PlayerDead - 1)
Set PlayerDeadBool[(Player number of (Picked player))] = False
Set Defibs[(Player number of (Owner of (Casting unit)))] = (Defibs[(Player number of (Owner of (Casting unit)))] + 1)
Visibility - Destroy Vis[(Player number of (Picked player))]
Custom script: call RemoveLocation( udg_TempPoint )
Trigger - Run Sort Multiboard <gen> (ignoring conditions)
I suppose the cheap fix would be to set the unit's collision to 0, or something really small, in the Object Editor. It shouldn't affect my gameplay much.