• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Trading Card Game 2 protagonist in the poll by clicking here.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Help Thread: Script Help Thread

Status
Not open for further replies.
Does your script-tile have '7000' as the var number in A-Map? Other than your flag and variable numbers being pretty high, the rest looks find. Have a look here for suggested flag/var numbers as well as more information on Script Tiles.

Ok I have lowered the var number to 4050 and I put in in the var value box instead of the number box. Now when i step on it it freezes the game leaving only the music playing. And when i put 4050 in the number box it doesn't execute the script at all same goes for when i put 4050 in both of the boxes.
Here is the updated script.
Spoiler:
 
Ok I have lowered the var number to 4050 and I put in in the var value box instead of the number box. Now when i step on it it freezes the game leaving only the music playing. And when i put 4050 in the number box it doesn't execute the script at all same goes for when i put 4050 in both of the boxes.
Here is the updated script.
Spoiler:

The 0xVARNUMBER (0x4050) should go in the Var Number box. The value is the value at which the script activates - which should be zero.

With 4050 in the number box and 0000 in the value box - what happens? Does it freeze or just not activate? If it's the latter, 4050 is probably being used elsewhere - do you have any other script tiles? Or are you using any original scripts from the Oak scene?
 
The 0xVARNUMBER (0x4050) should go in the Var Number box. The value is the value at which the script activates - which should be zero.

With 4050 in the number box and 0000 in the value box - what happens? Does it freeze or just not activate? If it's the latter, 4050 is probably being used elsewhere - do you have any other script tiles? Or are you using any original scripts from the Oak scene?
Ok so i got it run like its suppost too but it runs every time i step on it.
Here the script its been slightly tweaked.
Spoiler:

Never mind I fixed it. But thanks for the help.
 
Last edited:
Freezes if the flag isn't set, works fine if it is.

Spoiler:


I can't see what's wrong with it.
 
Setvar to 0x0 still makes it zero. Any other value should work.

But I don't want the var to set till after the flag is set.

Nevermind, I just took the lazy way out and used flags with the resettign variables, works fine.
 
Last edited:
But I don't want the var to set till after the flag is set.

Nevermind, I just took the lazy way out and used flags with the resettign variables, works fine.


Wait if that's what you want you're using the level script wrong. To make it activate 'after a flag' you just change the settings so it activates when var = 0x1 rather than 0x0 (with a setvar to 0x2 instead).
 
Wait if that's what you want you're using the level script wrong. To make it activate 'after a flag' you just change the settings so it activates when var = 0x1 rather than 0x0 (with a setvar to 0x2 instead).

I don't get it. Can you give me an example? It happens for another map too.

Last problem hopefully(because I've just finished playing through my hack and everything that can be fixed is fixed).
 
I don't get it. Can you give me an example? It happens for another map too.

Last problem hopefully(because I've just finished playing through my hack and everything that can be fixed is fixed).

Vars work just like flags, so you can use one variable to act as the trigger and stopper on a level script. If you set the var value to 0x1 then the level script will only trigger after the variable has already been set to 1. This could be done in whatever script you currently have your 'setflag' command.

Var = 0, nothing happens (no need for a flag in script)
Var = 1, script activates, sets var to 2.
Var = 2, nothing happens

This is really useful as you can then set up sequential level scripts all using one variable.

Var = 0, first script activates, sets var to 1
Var =1, next script activates, sets var to 2
Etc. etc.

Hope this helps! If you need more help drop me a VM and I'll dig up some pictures.
 
Vars work just like flags, so you can use one variable to act as the trigger and stopper on a level script. If you set the var value to 0x1 then the level script will only trigger after the variable has already been set to 1. This could be done in whatever script you currently have your 'setflag' command.

Var = 0, nothing happens (no need for a flag in script)
Var = 1, script activates, sets var to 2.
Var = 2, nothing happens

This is really useful as you can then set up sequential level scripts all using one variable.

Var = 0, first script activates, sets var to 1
Var =1, next script activates, sets var to 2
Etc. etc.

Hope this helps! If you need more help drop me a VM and I'll dig up some pictures.

I have this thing where if I'm really stuck on something and I ask a question, I end up solving it. It kind of clicked.

BUT, entering the map by a boat event causes the player(the boat I guees?) to freeze on enetering the map. That's the only way way to get to this map. As with everything, it used to work fine but now that I've fixed the level script problems it doesn't. Here's the script.

Spoiler:


(all the movements have #raw 0xFE at the end, so that's not the problem)

I'm going to be heartbroken if anyone finds any game-breaking bugs in my hack, I've tried to make sure everything works fine but you never know.
 
So does the first message box pop up, or nothing happens at all bar freezing?

Your offsets are all really low - are you sure it's free space?
 
So does the first message box pop up, or nothing happens at all bar freezing?

Your offsets are all really low - are you sure it's free space?

It goes past the map it's in, into another map, through that, into another map, through that then freezes as it enters another map. The initial text works, the yes/no but not the post journey text.

The offsets are just tile data, nothing too important...
Spoiler:
 
It goes past the map it's in, into another map, through that, into another map, through that then freezes as it enters another map. The initial text works, the yes/no but not the post journey text.

Is all that map movement controlled by this script?? If so I'm surprised it got so far, I've never considered cross-map scripts because it's completely avoidable aha. You say it used to work conpletely?

Perhaps you could post the entire script, just to see it in its entirety.
 
Is all that map movement controlled by this script?? If so I'm surprised it got so far, I've never considered cross-map scripts because it's completely avoidable aha. You say it used to work conpletely?

Perhaps you could post the entire script, just to see it in its entirety.

That is the entire script except for movements and text but if you want it completely uncut:

Spoiler:


I have another cross map script that goes through 5 maps, 3 fully and that works ok.
Although I can't get it to do something mid journey like how DAD calls you in Emerald on the way to Dewford, it just freezes. It's only after the movement that I can do something else(although in this case I don't need it to happen).
 
That is the entire script except for movements and text but if you want it completely uncut:

Spoiler:


I have another cross map script that goes through 5 maps, 3 fully and that works ok. Although I can't get it to do something mid journey like how DAD calls you in Emerald on the way to Dewford, it just freezes. It's only after the movement that I can do something else(although in this case I don't need it to happen).
The bold/underlined part is where I noticed something. Here's how I would check for no.
Spoiler:

I believe the dad calling you thing is a special, I think I read that somewhere in Research and Development.
You need a new level script in every map by the way. So you might have to cut the giant movement script into different pieces.
 
Status
Not open for further replies.
Back
Top