View Single Post
Old 14th August 2014, 04:48 AM   #12
Sky0fBlades
Emerald Hacker
Moderator
 
Sky0fBlades's Avatar
 
Join Date: Sep 2012
Location: Ice Path
Age: 26
Posts: 128
Sky0fBlades
Default

Quote:
Originally Posted by Dark Sneasel View Post
I no longer have the script, but if I remember correctly, it was someone approaching you, they say something, then this stuff
special 0x3E
playsong 0x??? 0x0
trainerbattle 0x0 0x??? 0x0 @intro @defeated
and then finally a var was set to prevent the things from happening again. I'll try to remake the script later.
Is the trainer battle you made used with there being a checkmark in the box in A-Map that says 'Trainer', and/or has a View Radius? If so, I imagine it may cause some problems with this kind of script. I have no proof of that, though.

From what you're saying about using a variable you seem to know already, but just as a reminder for everyone: since the lines that work with changing the music are supposed to come before the actual 'trainerbattle' command, it requires that you use flags or variables at the start of the whole script to stop the music stuff and default-style battle from happening again (regardless if the actual trainerflag is set or not) so that it will instead go to what the trainer says/does after you've beaten them.

I'd personally recommend you use flags instead of variables in Emerald if you want to stop events from happening again, since there are very few really safe variables in this game at all. I'll be updating it with more later. If you need flags, check out Diegoisawesome's XSE Scripting Guide.

This method was mostly meant for a battle that works in a similar way to the Steven battle in Emerald, where you talk to them (or through a story-like event) and they say their lines and the battle starts. I haven't tested it with the kind of battle you're doing; I haven't worked with those in forever since I'm leaving most trainers as they are in my hack but with stronger teams.

Once you post the remake of the script you were doing, I'll see if I can make it work properly. Let me know what variable you're using if you can.

Last edited by Sky0fBlades; 29th November 2014 at 05:16 AM.
Sky0fBlades is offline   Reply With Quote