Advertisement
Guest User

Shorter Revival Script, ARMA 2 bleedout timer version

a guest
Sep 6th, 2015
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.10 KB | None | 0 0
  1. ;Sonne 2 Start at die_with_blood, this entire code will overwrite die_with_blood and die_without_blood
  2. {on "die_with_blood"
  3. {if not senseless
  4. {spawn "blood"}
  5. }
  6. {call "main_menu"} {able select 0}
  7.  
  8.  
  9. {if "revival_script_enabled" {call "die_without_blood"} }
  10. {if not "revival_script_enabled" {call "die_without_blood_vanilla"} }
  11.  
  12.  
  13. }
  14. {on "die_without_blood_vanilla"
  15. ; {con "die"}
  16. {view pause "swim"}
  17. {call "die_scream"}
  18. {if not kill_flags blast
  19. {kill_flags piercing}
  20. }
  21. {die}
  22. ; {able collect 1}
  23. {delay 3
  24. {volumes enable contact}
  25. }
  26. ; {delay 30 {delete}}
  27. }
  28. {on "main_menu"
  29. {if rand 1.0 ;100% chance if revival_script_enabled is enabled lol.
  30. {set "revival_script_enabled" 1} ; 1 Enables, 0 Disables the ENTIRE Revival Script giving units the vanilla default death.
  31. }
  32.  
  33. }
  34.  
  35.  
  36. {on "die_without_blood"
  37. {view pause "swim"}
  38. {call "die_scream"}
  39.  
  40. {tags remove "revived"}
  41.  
  42. {delay 0.2
  43.  
  44. {if rand 0.8
  45. {if tagged "die_processset"
  46. {able select 0} ;unit cant be selected
  47. {tags add "shot_death"} ;nvm it is needed.
  48. {call "death_wait"} }} }
  49.  
  50.  
  51. {able personage 0}
  52.  
  53.  
  54. ;Ensures at the very beginning that heroes will not enter death sequence.
  55. {if not able "personage" ;if personage was enabled beforehand, then it is a hero.
  56. {if not tagged "dead"
  57. {call "randomgenerator"}}} ;calls on random death
  58. ; {con "die"}
  59. {if not kill_flags blast
  60. {kill_flags piercing}
  61. }
  62.  
  63. {die}
  64. {delay 3
  65. {volumes enable contact}
  66. }
  67. }
  68. {on "randomgenerator"
  69. ;NON HERO CHECK
  70. {if rand 0.75 {ani_play "lie_sleep_idle_2" 1.0 loop} else {ani_play "lie_sleep_idle_1" 1.0 loop}}
  71.  
  72. ;stops the non-hero unit from dying indefinitely
  73.  
  74. {if not able "personage"
  75. {able personage 1}
  76.  
  77. {able select 0} ;stops the unit from being selected
  78. } ;calc_die is re-enabled if it has been called again, for calc_die relies on revived tag not being enabled
  79.  
  80.  
  81. ;if shot for the first time, they will go into death process
  82.  
  83. {if not tagged "dead"
  84. {delay 1.0
  85. {tags add "die_processset"}
  86. {if rand 0.7
  87. {call "cdie_calc"} ;Very Long Death 10% chance 139 seconds
  88. else
  89.  
  90. {able select 0}{call "death_wait"} ;Instant Pwnage X_x if all else fails% chance :\ 0 seconds XD
  91.  
  92. } } };disablerandom check end
  93.  
  94. } ;end of randomgenerator
  95. ;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.
  96. {on "cdie_calc" ;call on die_calc
  97. {if not dead
  98. {if not able "select" {delay 0.2{call "cdie_calc"}}}
  99. {if not able "select" {delay 0.2{call "die_calc"}}}
  100.  
  101. {delay 0.2 {if dead {delay 0.2{tags add "dead"} {delay 0.21 {tags remove "die_processset"}{delay 0.5{tags remove "dead"}}}
  102. {delay 0.05 {ani_stop "lie_sleep_idle_2"}}
  103. {delay 0.06 {ani_stop "lie_sleep_idle_1"}}
  104. {delay 0.07 {ani_play "lie_die"}} }}}}}
  105.  
  106. {on "wake_up" ;if the time for knockdown ends, units will wake up(optional) reminds me of the arma series without dragging
  107. {if senseless {delay 0.2{call "wake_up"}}}
  108. {if not senseless {delay 0.2
  109. {delay 0.1 {chassis_work 1}} ;for_Ty
  110. {delay 0.2 {able "talk" 1}} ;for_Ty
  111. {delay 0.3
  112. {ani_stop "lie_sleep_idle_2"}
  113. {ani_stop "lie_sleep_idle_1"}
  114. } ;for_Ty
  115. {delay 0.4 {weapon_work "hand_right" 1}} ;for_Ty
  116. }}}
  117.  
  118.  
  119.  
  120. ;TIMER OF LIFE ;The Saviour lol
  121. {on "die_calc" ;Calculates whether or not the unit has been morphined or not.
  122. {if not able "select" {if not senseless ;senseless means knocked out(just not to confuse it with orders senseless)
  123. {if not dead
  124. {tags remove "die_processset"}
  125. {able select 1}
  126. {delay 0.001 {ani_stop "lie_sleep_idle_2"}{ani_stop "lie_sleep_idle_1"}}
  127.  
  128. {delay 0.10
  129. {tags remove "death_wait"}
  130. {tags remove "randomdisabled"}
  131.  
  132. }
  133. ;pt2
  134. {delay 0.105
  135. {if not tagged "revived"
  136. {if not senseless {if not dead
  137.  
  138. {delay 0.1 {chassis_work 0}} ;for_Ty
  139. {delay 0.12 {knockdown 90000 900001}} ;for_Ty
  140. {delay 0.2 {able "talk" 0}} ;for_Ty
  141. {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
  142. {delay 0.4 {weapon_work "hand_right" 0}} ;for_Ty
  143.  
  144. {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
  145.  
  146. {start_sound "human/heal"}
  147. {able personage 0}
  148. }}}}
  149.  
  150. }}
  151. }}
  152.  
  153.  
  154.  
  155. ;TIMER OF DEATH
  156. {on "death_wait"
  157. {delay 0.05 {ani_stop "lie_sleep_idle_2"}}
  158. {delay 0.06 {ani_stop "lie_sleep_idle_1"}}
  159. {delay 0.07 {ani_play "lie_die"}}
  160. {delay 0.1
  161. {if not tagged "shot_death" {if not tagged "revived" {able personage 0}} ;Gets rid of personage protection
  162. {if not able "select" ;TIMER OF DEATH
  163. {if senseless
  164.  
  165. {if not tagged "revived" {able personage 0}} ;Gets rid of personage protection
  166. {tags remove "die_processset"}
  167.  
  168. {die}
  169.  
  170.  
  171. } }}
  172. {if tagged "shot_death"
  173. {call "shot_death"}}
  174.  
  175. {if tagged "dead"
  176. {delay 0.05 {ani_stop "lie_sleep_idle_2"}}
  177. {delay 0.06 {ani_stop "lie_sleep_idle_1"}}
  178. {delay 0.07 {ani_play "lie_die"}}
  179. {delay 0.08 {tags remove "dead"}} }
  180.  
  181. ;{tags add "dead"}
  182. } } ;Ergh
  183. {on "shot_death"
  184. {delay 0.05 {ani_stop "lie_sleep_idle_2"}}
  185. {delay 0.06 {ani_stop "lie_sleep_idle_1"}}
  186. {delay 0.07 {ani_play "lie_die"}}
  187. {delay 0.1
  188. {if not tagged "revived" {able personage 0}} ;Gets rid of personage protection
  189. {if not able "select" ;TIMER OF DEATH
  190. {if senseless
  191.  
  192. {if not tagged "revived" {able personage 0}} ;Gets rid of personage protection
  193. {tags remove "die_processset"}
  194. {if tagged "dead"
  195. {delay 0.05 {ani_stop "lie_sleep_idle_2"}}
  196. {delay 0.06 {ani_stop "lie_sleep_idle_1"}}
  197. {delay 0.07 {ani_play "lie_die"}}
  198. {delay 0.08 {tags remove "dead"}} }
  199. {die}
  200.  
  201. } {die}
  202. ;{tags add "dead"}
  203. } }} ;Ergh
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement