I will assume you are trying to make the player move to a different map (since it would cause the player to fall down). I have developed temporary self-switches (with the script that gratheo gave) that are reset as soon as the player leaves the map. It would consist of two event pages:
Event Page 1
Condition: (none)
Trigger: Player Touch
Options: Through
Graphic: (normal floor)
Event Page 2
Condition: Switch
tsOn?("A") is ON
Trigger: Player Touch
Options: Through
Graphic: (cracked floor)
<<Change graphic to broken floor>>
Wait: 10 frame(s)
Transfer Player:[000: ???], (???,???)
(Note that one of the conditions checks the temporary self switch.)
If, however, you want the player to stay on the same map, then a different approach, like the one below, is needed. In addition to my
temporary self switch script above, you can add the following script section:
class Interpreter
def resetSwitches(eventname)
for event in $game_map.events.values
if event.name==eventname
event.setTempSwitchOff("A")
event.setTempSwitchOff("B")
end
end
end
end
The script resetSwitches will reset temporary self-switches A and B of all events with a specified name; for example, all events named "BreakableIce" on the map. To use it, add a Script event command consisting of, for example:
resetSwitches("BreakableIce")
(My script defines a _name_ method on Game_Event, which is not present by default.)
The second event page's command list could then be changed to:
<<Change graphic to broken floor>>
Wait: 10 frame(s)
Script: resetSwitches("BreakableIce")
Transfer Player:[000: ???], (???,???)
I hope this helps.