- 3
- Posts
- 1
- Years
- Seen Apr 15, 2025
Hey gang! I'm looking to make a secret door appear on Devon's First Floor, after a certain flag or variable is set.
Based on looking at similar existing events in the various script.inc files, "SetMetatile" seemed to be the way this is done. I gave it a crack below:
mapscripts DevonFirstLevel_MapScripts {
MAP_SCRIPT_ON_LOAD: RevealSecretDoor
}
script RevealSecretDoor {
if (flag(FLAG_UNUSED_0x034)) {
SetMetatile(1, 4, 0x395, TRUE)
SetMetatile(1, 3, 0x38A, TRUE)
SetMetatile(2, 3, 0x38B, TRUE)
SetMetatile(3, 3, 0x38C, TRUE)
SetMetatile(2, 4, 0x396, TRUE)
SetMetatile(3, 3, 0x38C, TRUE)
special(DrawWholeMapView)
}
}
This doesn't produce any errors when compiling - but it doesn't seem to update the metatiles on the map after the flag is set.
Would appreciate any help at all! Thank you.
Apologies if an explanation for this already exists. I've searched through the wiki, simple mods thread, and Team Aquas Hideout channel but can't seem to find anything. I might be searching for the wrong terms though.
Based on looking at similar existing events in the various script.inc files, "SetMetatile" seemed to be the way this is done. I gave it a crack below:
Spoiler: Script attempt
mapscripts DevonFirstLevel_MapScripts {
MAP_SCRIPT_ON_LOAD: RevealSecretDoor
}
script RevealSecretDoor {
if (flag(FLAG_UNUSED_0x034)) {
SetMetatile(1, 4, 0x395, TRUE)
SetMetatile(1, 3, 0x38A, TRUE)
SetMetatile(2, 3, 0x38B, TRUE)
SetMetatile(3, 3, 0x38C, TRUE)
SetMetatile(2, 4, 0x396, TRUE)
SetMetatile(3, 3, 0x38C, TRUE)
special(DrawWholeMapView)
}
}
This doesn't produce any errors when compiling - but it doesn't seem to update the metatiles on the map after the flag is set.
Would appreciate any help at all! Thank you.
Apologies if an explanation for this already exists. I've searched through the wiki, simple mods thread, and Team Aquas Hideout channel but can't seem to find anything. I might be searching for the wrong terms though.