Can you please help me? I'm new at this, I am trying to write a trainer script, i can do the battle just fine, but i'm wanting to make it a rival so that when i win they say something witty and disappear, i find with this script i have to talk to them after the battle to get them to walk away, and they keep reappearing too..Would you please tell me what i did wrong?
You need to use trainerbattle
0x1 so the script continues straight after winning the battle.
Like in Diego's example script for a Gym Leader:
#dynamic 0x800000
#org @start
lock
faceplayer
checkflag 0x820
if 0x1 goto @done
msgbox @2 0x6
trainerbattle 0x1 0x001 0x0 @before @after @later
end
#org @before
= Show me what ya got!
#org @after
= What the-?
#org @later
msgbox @3 0x6
fanfare 0x13E
msgbox @4 0x4
waitfanfare
closeonkeypress
msgbox @5 0x6
giveitem 0x147 0x1
setflag 0x820
release
end
#org @done
msgbox @1 0x6
release
end
#org @1
= You should travel to Cerulean City\nto get your next badge.
#org @2
= Welcome to Pewter City Gym.\nYou want to challenge me?
#org @3
= Congratulations!\pFor beating me, you get\nthis badge!
#org @4
= \v\h01 recieved a badge!
#org @5
= Oh, and please take this.
Thanks so much for this!
However, I have a problem. I'm not sure if anybody else who has posted above me has posted this question and/or had it answered, but here it is.
It doesn't let me script Warps.
As this is my first post, I can't post links yet, but it is"
i m g u r . c o m / z p m e Y C i
(without any spaces.)
You don't script warps tiles - that part has nothing to do with this tutorial. The warp diego used is as part of a script, whilst you're looking at warp tiles. The [W]s in A-Map simply go on a door (or by stairs, etc.) and will automatically warp you when you move in the correct manner. The warp you have a picture of takes you to Map 3,0 - Warp 0. Which should be Pallet Town. Change the numbers to change where it goes.