Advertiser Content

DrFuji

Heiki Hecchara‌‌

Age 26
Male
Aussie
Seen 7 Hours Ago
Posted 2 Days Ago
1,603 posts
10 Years
You'll want to use the setmaptile command which can change the tile at a chosen X-Y coordinate on the map. You can change the tile to antyhing in that's map's two tilesets. You can also determine whether the player is able to pass over the tile by placing either 0x0 (passable) or 0x1 (impassable) at the end of the command. For example, 'setmaptile 0x3 0xA 0x10A 0x1' will change the tile at coordinate 0x3, 0xA to tile number 0x10A which is impassable (0x1). Here's a quick and dirty script that utilizes the setmaptile command in a fashion similar to your video:

#dynamic 0x9C0B20

#org @start
checkflag 0x11
if 0x1 goto @RemoveWaterfall
setmaptile 0xXX 0xYY 0xZZZZ 0x1 // Makes tile impassable
special 0x91 // Refreshes map
setflag 0x11
msgbox @Button 0x6
end

#org @RemoveWaterfall
setmaptile 0xXX 0xYY 0xZZZZ 0x0 // Makes tile passable
special 0x91 // Refreshes map
clearflag 0x11
msgbox @Button 0x6
end

#org @Button
= You pressed the button!
The flag used to check whether the waterfall is on or not is temporary, meaning that it will be reset upon leaving the map like Cut trees or Rock Smash boulders so you don't have to do any finagling of flags every time you leave the area.
Advertiser Content