var jumped;
# script 1 is executed when the world is loaded
script 1
{
setSectorEffect(40, 0); # stop fan from rotating
createEntityPhysicsObject(10); # add a physics object for the gargoyle
jumped = 0;
}
# script 2 is triggered from the sector 35
script 2
{
setSectorEffect(40, 5); # start the fan
setSectorShade(39, 0); # make the fan's exterior bright
# the gargoyle will jump only once
if (jumped == 0) {
applyEntityForce(10, fixed(1), fixed(-10), fixed(20));
jumped = 1;
}
}
|