Difference between revisions of "Resurrect"
Jump to navigation
Jump to search
imported>Mundane |
imported>DragoonWraith (CS 1.0) |
||
Line 46: | Line 46: | ||
[[Category: Functions]] | [[Category: Functions]] | ||
[[Category: Functions (CS 1.0)]] | |||
[[Category: Actor Functions]] | |||
[[Category: Actor Functions (CS 1.0)]] | |||
[[Category: Actor Value Functions]] | |||
[[Category: Actor Value Functions (CS 1.0)]] | |||
[[Category: Statistics Functions]] | [[Category: Statistics Functions]] | ||
[[Category: | [[Category: Statistics Functions (CS 1.0)]] |
Revision as of 21:46, 20 July 2007
Syntax:
Resurrect AnimateFlag (optional)
Resurrects the calling actor.
AnimateFlag = 1: The actor will animate getting up (as if from a knockdown). For the animation to complete, make sure no script commands or AI packages affects the actor, otherwise the animation will not complete.
example: short FlagDead ;Set to 1 when actor is dead and to 0 when resurection anim is ;complete short ResurrectAminTimer ;Counts frames since resurrection begin gamemode ;Set actor's Death Flag to 1 on death,(Note:You might have to interupt the current ;AI package here) if (Actor.GetDead==1) set FlagDead to 1 endif ;Timer that prevents the script from running before resurrection animation is ;finished(including AI packages). Starts when actor is resurrected. if (FlagDead==1) && (Actor.GetDead ==0) set ResurrectAminTimer to ResurrectAminTimer+1 endif ;After 200 frames (enough for resurrection animation to complete), resume script if ResurrectAminTimer>200 set FlagDead to 0 set ResurrectAminTimer to 0 Actor.resurrect 1 endif ;when actor is alive and resurrect anim complete, Run main script if FlagDead == 0 ;Do stuff on actor endif
AnimateFlag = Nothing or 0: the actor will simply reset and snap back to its alive state.
Note: In some situations the flag is required to prevent a crash.