The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary ROM Hacking (https://www.pokecommunity.com/forumdisplay.php?f=284)
-   -   Script Setmaptile-Level script doesnt activate (https://www.pokecommunity.com/showthread.php?t=457700)

Zarro August 30th, 2021 12:21 PM

Setmaptile-Level script doesnt activate
 
I wanted to insert the below level 1 setmaptile script into the game, where defeating certain trainers and reaching a certain flag spawns warp tiles in the top floor of a cave and also removes one barrier (so you dont have to walk the whole way everytime). While the warps generally work the tiles dont change, so the warps only work on the way out and the removal of the barrier also just doesnt happen. I tested with the compare command and without and with special 0x8E and without. I looked up the level scripts from vanilla firered where the same thing happens and basically copied what they did, but it still doesnt work. Can someone help me with that?

Spoiler:
Code:

'---------------
#org 0x904595
checktrainerflag 0x16D
if 0x1 call 0x89045A5
checktrainerflag 0x16C
if 0x1 call 0x89045C1
checkflag 0x220
if 0x1 call 0x89045D8
checktrainerflag 0x15C
if 0x1 call 0x89045F4
end

'---------------
#org 0x9045A5
setmaptile 0xD 0x11 0x390 0x0
special 0x8E
return

'---------------
#org 0x9045C1
setmaptile 0x1 0x11 0x390 0x0
special 0x8E
return

'---------------
#org 0x9045D8
setmaptile 0x7 0x11 0x390 0x0
special 0x8E
return

'---------------
#org 0x9045F4
setmaptile 0x16 0xC 0x282 0x0
setmaptile 0x17 0xC 0x281 0x0
setmaptile 0x17 0xB 0x281 0x0
setmaptile 0x17 0xA 0x281 0x0
setmaptile 0x16 0xB 0x282 0x0
setmaptile 0x16 0xA 0x281 0x0
setmaptile 0x17 0xD 0x281 0x0
special 0x8E
return



kalarie August 30th, 2021 2:39 PM

@Zarro

A setmaptile levelscript loads once you enter the map. Did you re-enter the map somewhere?

If that is not the case, you need to set-up another type of script than a setmaptile level script.

Zarro August 30th, 2021 3:21 PM

Yes, I did. So having a person event for example in addition to the level script or instead? How does the warp point at Saffron gym at Sabrina spawn when entering her room then? There isnt any script and it works, but maybe I am overseeing things.

Anon822 August 31st, 2021 4:27 AM

Are you sure those flags are actually set? I would try the script without the checktrainerflag and checkflag commands.

kalarie September 1st, 2021 7:33 AM

@Zarro

Quote:

So having a person event for example in addition to the level script or instead?
Yes, in addition. As I said, a setmaptile script only activates once when you enter the map. When you stay on the same map and want tiles to change, you need to use the setmaptile command in combination with special 0x8E in some other script to activate this change of tiles while staying on the same map.

Quote:

How does the warp point at Saffron gym at Sabrina spawn when entering her room then?
As far as I know, there are only regular warp tiles in her gym in Gen III? The destination of those panels doesn't change throughout your gym's progress depending on what trainers you've beat. AKA they're not altered in any way by any kind of script.


All times are GMT -8. The time now is 9:15 AM.


Like our Facebook Page Follow us on Twitter © 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.