returns 1 if ANY Actor (including PC) is standing on it.
If ( Object_Id->GetStandingPC == 1)
[… trigger horrible trap]
endif
These are great functions to trigger events, especially for interior cells. It is also an excellent function to build traps. You can make an "activator" object using the nif files of any static object (hallway, carpets etc.), and trigger certain events once the player (or another Actor) steps on that object.
My sample script is used to light fires in a hall on as soon as the player steps on a particular piece of floor:
Begin HBHallLighting
if ( GetStandingPC == 1 )
set HB_hallfire to 1
endif
end
HB_hallfire is a global variable, used to turn on the fire. This is the script for the fire:
Begin HBHallfireon
if ( HB_hallfire == 1 )
if ( GetPos, z, < -736 )
MoveWorld, z, 3 ; fire rises, until its reached full height