×
Меню
Индекс

MSFD Limiting the use of levitation

 
 
[no fix] EnableLevitation
[no fix] DisableLevitation
 
These functions are used to allow and block Levitation magic effects. When DisableLevitation is called, all existing Levitation effects are canceled. When the player tries to cast a spell with a Levitate effect while Levitation is disabled, a notify message is displayed with the text in the GameSetting sLevitateDisabled. Currently this text reads “Levitation magic does not work here.”
 
 
Sample scripts:
This script is on an object in the room with levitation disabled.
 
Begin clampstone
 
short turnedoff
short gavemessage
 
if ( turnedoff == 0 )
     DisableLevitation
     if ( gavemessage == 0 )
          set gavemessage to 1
          MessageBox "A strange stone in the roof of this room prevents levitation here."
     Endif
else
     EnableLevitation
     if ( gavemessage == 1 )
          set gavemessage to 0
          MessageBox "The stone has been disabled. You can now levitate in this room."
     Endif
endif
 
if ( OnActivate == 1 )
     if ( turnedoff == 0 )
          set turnedoff to 1
     else
          set turnedoff to 0
     endif
endif
 
end
 
This script is on a door leaving the room.
 
Begin enable_lev_on_exit
 
if ( OnActivate == 1 )
     MessageBox "You leave the presence of the stone..."
     EnableLevitation
     Activate
endif
 
end