Jump to content

Recommended Posts

Posted

I'm not looking at any scripts right now, but I'm pretty sure that you need to have a post-battle handler. It ends up being something where if you lose, you go to the pokemon center and whatnot. You probably should take a look to see if you can find another double battle to copy that data. There's a good example in the Dragon's Den with the rival, Claire, and Lance.

  • 6 months later...
Posted

Ok. I can't seem to save my scripts, so I opened it in an older version of PPRE. This is what it looks like in PPRE Beta 10b (It's a backup version in case the newer version freezes on use of movements) :

  Reveal hidden contents

When I save it, I get this in PPRE.log:

Traceback (most recent call last):

File "ppre.pyw", line 2110, in updateMap

UnboundLocalError: local variable 'e' referenced before assignment

When I edit it in the latest version, I put this in:

  Reveal hidden contents

But when I save it, I get this:

Traceback (most recent call last):

File "ppre.pyw", line 2274, in updateMap

File "ascript.pyc", line 484, in writeScript

IndexError: sequence index out of range

And it reverts back my script (Not saving) and deletes my functions. Is there anything wrong with my script?

And if you need it, here are the text strings:

  Reveal hidden contents

I did find this thread after some searching, and I didn't see any thread revival rules, so I am sorry if there are any.

  • 1 year later...
Posted (edited)

I'm sorry about bumping this thread, but I thought it would have been worst if I opened a new topic for this question.

I've got a problem with an event. I use a trigger to start the event.

  Quote

MecScript

SetvarHero 0

Lockall

SwitchMusic 0 3

Callstd 249 7

SetOverworldPosition 4 965 0 267 2

CheckLR 5 func_7

End

  Quote
Applymovement 4 mov_29

Waitmovement

Message 25

WaitButton

CloseMsgOnKeyPress

TrainerBattle 354 0 1

Message 26

WaitButton

CloseMsgOnKeyPress

Applymovement 4 mov_30

Waitmovement

End

If i test it, the game crashes as soon as I step on the trigger. But what's weird is that if i erase the messages commands it works. It happened even with other scripts i made. It looks like if I add a message on a trigger script the game freezes on the applymovement. What can i do about it?

Edited by †Nømura
  • 1 year later...
Posted

Can someone explain why flags doesn't works here?

Map: 34 - Route 30

Script 11

Fanfare 1500

Lockall

Faceplayer

Checkflag 310 -- check flag value and store it in Last Result

CheckLR 1 func_4 -- case be 'false or 1' (I believe) func_4 will be called

Message 4 -- I’m not a Trainer. But if you look one in the eyes, prepare to battle.

WaitButton

CloseMsgOnKeyPress

Releaseall

End

I've changed this script for test, below the func_4

Message 0 -- Go, RATTATA! Tackle!

WaitButton

CloseMsgOnKeyPress

Setflag 310 -- set the flag

Releaseall

End

What I've done here was if flag 310 is not checked or set value 1 the function 4 will be called and the message 0 will be showed.

When the script is runned again, the checkflag must put 0 (or a diferente value I believe) in LR and the function must not be executed, instead the message 4 will appear.

But when I talk to girl, she only says "Go, RATTATA! Tackle!" like if the flag isn't be setted in function 4:

img5.png

Someone here can show me a light how flags works in the right way?

img5.png.498358dcd89017ae8e0af2b4a11af14

  • 3 months later...
Posted

So I'm coming along with my Spirit Silver hack pretty nicely and I have implemented a lot of new content, as well as, many new trainer battles. One such being able to fight a Battle Frontier Brain early on. He blocks the gym from being used and you must battle him before entering as a test (per se). Now I have scripted this whole scenario. He will walk away from the gym and not block your path however when you exit the map and go back in he reappears. Now I know this issue can be solved by using Flags but I am not quite sure how to utilize Flags in this instance. PPRE gets rid of my flag when I add it onto the script. (I would go to another map on PPRE to edit, then come back and it will have been removed). So my question is, How do you use Flags in PPRE correctly for Pokemon Soul Silver?

This is my script.

Lockall

Faceplayer

Message 28

WaitButton

CloseMsgOnKeyPress

TrainerBattle 80 0 1

CheckTrainerLost 0x800c

If 0x800c 0

Message 29

WaitButton

CloseMsgOnKeyPress

Applymovement 13 mov_7

Waitmovement

Removepeople 13

Releaseall

End

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...