×
Меню
Индекс

MSFD Hurting an Actor standing on an object

 
HurtStandingActor, float_HP/s
 
HurtStandingActor -3
Object_ID->HurtStandingActor 1
 
Float hurt_variable
HurtStandingActor, hurt_variable
 
This function affects the health of an Actor (including the PC) that stands on the object. Positive values will reduce health, negative values heal (hitpoints per second). Using negative values will modify your health even beyond your normal maximum health, so be careful to test this if you want to use this function this way. This function accepts float variables.
 
Sample script: The effect is probably best known from the lava fields:
begin lava
 
if ( menumode == 1 )
     return
endif
 
if ( CellChanged == 0 )
     if ( GetSoundPlaying "lava layer" == 0 )
          PlayLoopSound3DVP "lava layer", 1.0, 1.0
     endif
endif
 
HurtStandingActor, 20.0          ;20 pts of damage a sec
 
end lava