• 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!
  • Which Pokémon Masters protagonist do you like most? Let us know by casting a vote in our Masters favorite protagonist poll here!
  • Red, Hilda, Paxton, or Kellyn - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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] Making the Player Move

  • 2
    Posts
    9
    Years
    • Seen Jul 18, 2020
    Hello everyone.

    This is my first post in this forum and since I am a beginner at Rom Hacking and Scripting, I want to try many different ways of making my game more interesting.
    Since I've tried to make a script in which the player is forced to move to a specific location like when he enters Lance's room in the victory road.

    So I've inserted an script - event at AdvanceMap at the location I wanted to the script to start.
    Furthermore, I've written the following text for my script and put the offset to the script event.

    #dynamic 0x800000
    #org @start
    lock
    applymovement 0xFF @1
    waitmovement 0x0
    release
    end

    #org @1
    #raw 0x11
    #raw 0x12
    #raw 0x12
    #raw 0x12
    #raw 0x12
    #raw 0x12
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0xFE


    However, since the player reaches the spot in which the event should begin, the game freezes.
    I was wondering if it's because of the lock command in line 3 of my program text.
    So I removed it and now the event isn't started at all.

    I've tried to look up tutorials on YouTube without any success.

    I really would appreciate your help concerning my problem.

    Thank you very much.
     
    I tried using your script and it worked fine in my game. You might need to set the variable, for that script?

    setvar 0xAAAA 0x01

    where AAAA is the number of the variable for that particular script event. You can find it in Advance map. I would place this line of code just before the release command.

    I don't know enough about scripting to tell you for sure what's up :( I have had trouble using applymovement in more complicated scripts too.
     

    In order for a script to work, the value needs to be 0000, and the var number box should be filled with any number. Though keep in mind to use safe var numbers. For example:

    Var Number: 4011
    Var Value: 0000
     
    Last edited:
    Hey Skypaw101 and PokeChu,

    by including the variable, I made my script work as intended.

    I really appreciate your help.

    Thank you very much.
     
    Back
    Top