• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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.

Script Help Thread (DO NOT REQUEST SCRIPTS)

Status
Not open for further replies.

Collen

I have returned.
71
Posts
14
Years
  • Seen Jan 1, 2015
Ok... I need help with a trainer.
When I talk to him from the side it works...
But if I go in front of him, he walks up to me and the screen turns red and freezes.

I checked "Trainer", wrote veiw radius "0003" made Unknown "0003", everythioing, but it still freezes!
Also, after I beat him he sees me again and it freezes.

Here is my script:
Spoiler:
 

locoroco

Ginga Densetsu Weed ANIME PWNS
251
Posts
14
Years
well i think your problem is the unknown value set it back to 0000 and the text color thing dont use it i pretty much copied/pasted your script the only difference is that i dint put the unknown value and the text color try it and tell me oh and it work flawlessly
 
202
Posts
14
Years
  • Seen Jan 6, 2017
I think my head is going to explode! I've been trying to get this ONE script to work for hours now. Little help please?

First here is the script:

-----------------------------
'---------------
#org 0x8001FD
lock
faceplayer
msgbox 0x880021E MSG_KEEPOPEN '"My name is Red. Let's battle[.]"
trainerbattle 0x3 0x1 0x0 0x880023E
fadescreen 0x1
fadescreen 0x0
hidesprite LASTTALKED
setflag 0x2000
release
end


'---------
' Strings
'---------
#org 0x80021E
= My name is Red. Let's battle[.]

#org 0x80023E
= [.]

------------------------------


Now the problem:

What I want to happen is: Battle the trainer, trainer disappears, jobs a good 'un.
Here's what happens: Battle the trainer, trainer disappears, leave area, come back and he's there again.

Also, sometimes he doesn't even show up first time. Sometimes I can enter where he is (viridian forest) and he's not there (on a new game), then I can leave and come back and he's there. Strange...

Person event number 12 and Person ID 2000, if that helps...
 
Last edited:

locoroco

Ginga Densetsu Weed ANIME PWNS
251
Posts
14
Years
i think you forgot checkflag
checkflag 0x2000
if 0x1 goto @battled or watever pointer u wanna use
And in @battled or watever you just do this
#org @????
release
end

and find something to clear the sprite not hide it and that should help you a bit also that person id 2000 is kind of freaky but i dont know im not a expert scripter butttt i hope i helped a bit
 

Xela

Do you believe in yourself?
349
Posts
16
Years
  • Age 27
  • Seen Feb 18, 2024
I think my head is going to explode! I've been trying to get this ONE script to work for hours now. Little help please?
Spoiler:


Now the problem:

What I want to happen is: Battle the trainer, trainer disappears, jobs a good 'un.
Here's what happens: Battle the trainer, trainer disappears, leave area, come back and he's there again.

Also, sometimes he doesn't even show up first time. Sometimes I can enter where he is (viridian forest) and he's not there (on a new game), then I can leave and come back and he's there. Strange...

Person event number 12 and Person ID 2000, if that helps...

You need to add this after faceplayer or at the start of the script
Code:
checkflag 0x2000
if 0x1 goto @end
Then add this somewhere in the script
Code:
#org @end
release
end
Then it won't repeat itself.

And if you want the trainer to disappear in the fadescreen, you gotta have the hidesprite LASTTALKED between the fadescreen scripts.
 
202
Posts
14
Years
  • Seen Jan 6, 2017
Thanks Alex. It worked perfectly but...Then I left the area, came back, he's still gone. Did the same about 5 more times and he just randomly re-appeared again?

'---------------
#org 0x8001E1
lock
faceplayer
checkflag 0x2000
if 0x1 goto 0x880020B
msgbox 0x880021E MSG_KEEPOPEN '"My name is Red. Battle me[.]"
trainerbattle 0x3 0x1 0x0 0x880023E
fadescreen 0x1
hidesprite LASTTALKED
fadescreen 0x0
setflag 0x2000
release
end

'---------------
#org 0x80020B
release
end


'---------
' Strings
'---------
#org 0x80021E
= My name is Red. Battle me[.]

#org 0x80023E
= [.]


There's the updated script. I've also attached a picture of how the person script is set up in A-Map.
 

Collen

I have returned.
71
Posts
14
Years
  • Seen Jan 1, 2015
well i think your problem is the unknown value set it back to 0000 and the text color thing dont use it i pretty much copied/pasted your script the only difference is that i dint put the unknown value and the text color try it and tell me oh and it work flawlessly
Yeah, that worked.
Thanks!

@Nikolai Fox
After you talked to him, did you talk to anyone else?
You might have cleared the flag.
 
202
Posts
14
Years
  • Seen Jan 6, 2017
I hadn't, and when I tried it does the exact same thing. It's just behaving really strangely, and the same happens when I try to make the script from scratch again. Here's what happens in detail:

I get to the end of Viridian Forest and there's like a 50% he will be there. If I leave and come back in, he will either still be there or have vanished. If I leave then return same again. So sometimes he's there sometimes he's not. I don't get it :S

Edit: I'm uploading a youtube video of it now, it's going to take about an hour though, I have terrible up speed :/
 
Last edited:
10,078
Posts
15
Years
  • Age 32
  • UK
  • Seen Oct 17, 2023
I have no idea Binary. I have it set how it is in that picture I attached, I just named the person ID the same as the setflag. I got the event ID right I know that much :/


flag 0x2000 may be too high, change it to the 1000 region.
 

Ninja Caterpie

AAAAAAAAAAAAA
5,979
Posts
16
Years
You don't need the checkflag stuff, either. It's a waste of space, seeing as after you set the flag to 1000, he's gone forever and you're not talking to him again.
 
202
Posts
14
Years
  • Seen Jan 6, 2017
Quick question: How do you make it so a sprite starts off hidden, and becomes un-hidden when a script is activated? (A perfect example being Gary on S.S. Anne, I've looked at that script thoroughly and can't seem to find it :/)

Thanks.
 
Status
Not open for further replies.
Back
Top