Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;Sonne 2 Start at die_with_blood, this entire code will overwrite die_with_blood and die_without_blood
- {on "die_with_blood"
- {if not senseless
- {spawn "blood"}
- }
- {call "main_menu"} {able select 0}
- {if "revival_script_enabled" {call "die_without_blood"} }
- {if not "revival_script_enabled" {call "die_without_blood_vanilla"} }
- }
- {on "die_without_blood_vanilla"
- ; {con "die"}
- {view pause "swim"}
- {call "die_scream"}
- {if not kill_flags blast
- {kill_flags piercing}
- }
- {die}
- ; {able collect 1}
- {delay 3
- {volumes enable contact}
- }
- ; {delay 30 {delete}}
- }
- {on "main_menu"
- {if rand 1.0 ;100% chance if revival_script_enabled is enabled lol.
- {set "revival_script_enabled" 1} ; 1 Enables, 0 Disables the ENTIRE Revival Script giving units the vanilla default death.
- }
- }
- {on "die_without_blood"
- {view pause "swim"}
- {call "die_scream"}
- {tags remove "revived"}
- {delay 0.2
- {if rand 0.8
- {if tagged "die_processset"
- {able select 0} ;unit cant be selected
- {tags add "shot_death"} ;nvm it is needed.
- {call "death_wait"} }} }
- {able personage 0}
- ;Ensures at the very beginning that heroes will not enter death sequence.
- {if not able "personage" ;if personage was enabled beforehand, then it is a hero.
- {if not tagged "dead"
- {call "randomgenerator"}}} ;calls on random death
- ; {con "die"}
- {if not kill_flags blast
- {kill_flags piercing}
- }
- {die}
- {delay 3
- {volumes enable contact}
- }
- }
- {on "randomgenerator"
- ;NON HERO CHECK
- {if rand 0.75 {ani_play "lie_sleep_idle_2" 1.0 loop} else {ani_play "lie_sleep_idle_1" 1.0 loop}}
- ;stops the non-hero unit from dying indefinitely
- {if not able "personage"
- {able personage 1}
- {able select 0} ;stops the unit from being selected
- } ;calc_die is re-enabled if it has been called again, for calc_die relies on revived tag not being enabled
- ;if shot for the first time, they will go into death process
- {if not tagged "dead"
- {delay 1.0
- {tags add "die_processset"}
- {if rand 0.7
- {call "cdie_calc"} ;Very Long Death 10% chance 139 seconds
- else
- {able select 0}{call "death_wait"} ;Instant Pwnage X_x if all else fails% chance :\ 0 seconds XD
- } } };disablerandom check end
- } ;end of randomgenerator
- ;Can Unit be revived? Just for revive quotes, I have yet to find the command that wakes the revived and gives them health, its probably hardcoded X_X, then I could be wrong, as two years ago I thought the revival function was hardcoded, look at the situation now :P.
- {on "cdie_calc" ;call on die_calc
- {if not dead
- {if not able "select" {delay 0.2{call "cdie_calc"}}}
- {if not able "select" {delay 0.2{call "die_calc"}}}
- {delay 0.2 {if dead {delay 0.2{tags add "dead"} {delay 0.21 {tags remove "die_processset"}{delay 0.5{tags remove "dead"}}}
- {delay 0.05 {ani_stop "lie_sleep_idle_2"}}
- {delay 0.06 {ani_stop "lie_sleep_idle_1"}}
- {delay 0.07 {ani_play "lie_die"}} }}}}}
- {on "wake_up" ;if the time for knockdown ends, units will wake up(optional) reminds me of the arma series without dragging
- {if senseless {delay 0.2{call "wake_up"}}}
- {if not senseless {delay 0.2
- {delay 0.1 {chassis_work 1}} ;for_Ty
- {delay 0.2 {able "talk" 1}} ;for_Ty
- {delay 0.3
- {ani_stop "lie_sleep_idle_2"}
- {ani_stop "lie_sleep_idle_1"}
- } ;for_Ty
- {delay 0.4 {weapon_work "hand_right" 1}} ;for_Ty
- }}}
- ;TIMER OF LIFE ;The Saviour lol
- {on "die_calc" ;Calculates whether or not the unit has been morphined or not.
- {if not able "select" {if not senseless ;senseless means knocked out(just not to confuse it with orders senseless)
- {if not dead
- {tags remove "die_processset"}
- {able select 1}
- {delay 0.001 {ani_stop "lie_sleep_idle_2"}{ani_stop "lie_sleep_idle_1"}}
- {delay 0.10
- {tags remove "death_wait"}
- {tags remove "randomdisabled"}
- }
- ;pt2
- {delay 0.105
- {if not tagged "revived"
- {if not senseless {if not dead
- {delay 0.1 {chassis_work 0}} ;for_Ty
- {delay 0.12 {knockdown 90000 900001}} ;for_Ty
- {delay 0.2 {able "talk" 0}} ;for_Ty
- {delay 0.3 {if rand 0.75 {ani_play "lie_sleep_idle_2" 1.0 loop} else {ani_play "lie_sleep_idle_1" 1.0 loop}}} ;for_Ty
- {delay 0.4 {weapon_work "hand_right" 0}} ;for_Ty
- {delay 0.5 {call "wake_up"}} ;if the time for knockdown ends, units will wake up(optional) reminds me of the arma series without dragging
- {start_sound "human/heal"}
- {able personage 0}
- }}}}
- }}
- }}
- ;TIMER OF DEATH
- {on "death_wait"
- {delay 0.05 {ani_stop "lie_sleep_idle_2"}}
- {delay 0.06 {ani_stop "lie_sleep_idle_1"}}
- {delay 0.07 {ani_play "lie_die"}}
- {delay 0.1
- {if not tagged "shot_death" {if not tagged "revived" {able personage 0}} ;Gets rid of personage protection
- {if not able "select" ;TIMER OF DEATH
- {if senseless
- {if not tagged "revived" {able personage 0}} ;Gets rid of personage protection
- {tags remove "die_processset"}
- {die}
- } }}
- {if tagged "shot_death"
- {call "shot_death"}}
- {if tagged "dead"
- {delay 0.05 {ani_stop "lie_sleep_idle_2"}}
- {delay 0.06 {ani_stop "lie_sleep_idle_1"}}
- {delay 0.07 {ani_play "lie_die"}}
- {delay 0.08 {tags remove "dead"}} }
- ;{tags add "dead"}
- } } ;Ergh
- {on "shot_death"
- {delay 0.05 {ani_stop "lie_sleep_idle_2"}}
- {delay 0.06 {ani_stop "lie_sleep_idle_1"}}
- {delay 0.07 {ani_play "lie_die"}}
- {delay 0.1
- {if not tagged "revived" {able personage 0}} ;Gets rid of personage protection
- {if not able "select" ;TIMER OF DEATH
- {if senseless
- {if not tagged "revived" {able personage 0}} ;Gets rid of personage protection
- {tags remove "die_processset"}
- {if tagged "dead"
- {delay 0.05 {ani_stop "lie_sleep_idle_2"}}
- {delay 0.06 {ani_stop "lie_sleep_idle_1"}}
- {delay 0.07 {ani_play "lie_die"}}
- {delay 0.08 {tags remove "dead"}} }
- {die}
- } {die}
- ;{tags add "dead"}
- } }} ;Ergh
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement