• 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✓] applymovement permissions problem

ASDBUDDY

The Derp
347
Posts
7
Years
  • hi, so I was making this script and no surprise at all it didn't work exactly how i wanted it to
    the flag and all work fine but its the movement that doesn't occur, can anybody help me with that?
    Code:
    Spoiler:
     
    Last edited:

    DrFuji

    [I]Heiki Hecchara‌‌[/I]
    1,691
    Posts
    14
    Years
  • You've added some commands to your movements that don't need to be there. By putting the 'end' command after your movements it is prematurely finishing your script before the waitmovement command can take place. Here's a revised script with a few other changes to make it run better/ more efficiently. Changes are in red:

    Code:
    #dynamic 0x800000
    
    #org @start
    lock
    faceplayer
    [COLOR="Red"]checkflag 0x204
    if 0x1 goto @done[/COLOR] // This should be ahead of your 'checkflag 0x203' command. You are setting flag 0x204 in this script but it would never proceed to @done since you're checking 0x203 first which is still set
    checkflag 0x203
    if 0x1 goto @rib
    msgbox @tl 0x6
    release
    end
    
    #org @tl
    = There are lots of Rebels and kids\nlike you are joining them.\pWhy don't you go to the \nPolice Academy to get some sense of\lJustice.
    
    #org @rib
    msgbox @prib 0x6
    [COLOR="red"]closeonkeypress[/COLOR] // This can be deleted as msgbox type 0x6 already incorporates the effects of closeonkeypress. This separate command is mainly used for msgbox 0x4
    [COLOR="red"]lock[/COLOR] // This can be deleted as you already locked the NPC at the start of the script 
    applymovement 0x3 @m1
    waitmovement 0x0
    setflag 0x204
    release
    end
    
    #org @m1
    #raw 0x01
    [COLOR="red"]#raw 0x05[/COLOR] // #raw 0x1 and 0x5 are the same movement except 0x5 is (slightly?) faster so you can delete one of them. I'd also suggest adding a delay between the NPC looking up and down as in this script it will take place over a single frame which is way to quick 
    #raw 0x00
    #raw 0xFE
    [COLOR="red"]release
    end[/COLOR] // Delete these to have your movements play out properly
    
    #org @prib
    = Ah! The Police Aspirant Ribbon.\pGood, now don't cause any trouble!
    
    #org @done
    msgbox @tld 0x6
    release
    end
    
    #org @tld
    = I want to see Kanto Crime free!\pThats why I encourage youngsters\non the right path.

    In addition, when you're making a character talk ensure that there you're not leaving a space between '\n' and the next letter. It makes the text become unaligned and a bit weird :D
     

    ASDBUDDY

    The Derp
    347
    Posts
    7
    Years
  • You've added some commands to your movements that don't need to be there. By putting the 'end' command after your movements it is prematurely finishing your script before the waitmovement command can take place. Here's a revised script with a few other changes to make it run better/ more efficiently. Changes are in red:

    Code:
    #dynamic 0x800000
    
    #org @start
    lock
    faceplayer
    [COLOR="Red"]checkflag 0x204
    if 0x1 goto @done[/COLOR] // This should be ahead of your 'checkflag 0x203' command. You are setting flag 0x204 in this script but it would never proceed to @done since you're checking 0x203 first which is still set
    checkflag 0x203
    if 0x1 goto @rib
    msgbox @tl 0x6
    release
    end
    
    #org @tl
    = There are lots of Rebels and kids\nlike you are joining them.\pWhy don't you go to the \nPolice Academy to get some sense of\lJustice.
    
    #org @rib
    msgbox @prib 0x6
    [COLOR="red"]closeonkeypress[/COLOR] // This can be deleted as msgbox type 0x6 already incorporates the effects of closeonkeypress. This separate command is mainly used for msgbox 0x4
    [COLOR="red"]lock[/COLOR] // This can be deleted as you already locked the NPC at the start of the script 
    applymovement 0x3 @m1
    waitmovement 0x0
    setflag 0x204
    release
    end
    
    #org @m1
    #raw 0x01
    [COLOR="red"]#raw 0x05[/COLOR] // #raw 0x1 and 0x5 are the same movement except 0x5 is (slightly?) faster so you can delete one of them. I'd also suggest adding a delay between the NPC looking up and down as in this script it will take place over a single frame which is way to quick 
    #raw 0x00
    #raw 0xFE
    [COLOR="red"]release
    end[/COLOR] // Delete these to have your movements play out properly
    
    #org @prib
    = Ah! The Police Aspirant Ribbon.\pGood, now don't cause any trouble!
    
    #org @done
    msgbox @tld 0x6
    release
    end
    
    #org @tld
    = I want to see Kanto Crime free!\pThats why I encourage youngsters\non the right path.

    In addition, when you're making a character talk ensure that there you're not leaving a space between '\n' and the next letter. It makes the text become unaligned and a bit weird :D

    Oh ok got it, Thanks a lot this has really helped me and yeah i'll keep the\n in mind XD
    uh quick question if the person event no is say 3 (if the first is 0) do i type applymovement 0x3 or 0x4 ?
     
    Last edited:

    DrFuji

    [I]Heiki Hecchara‌‌[/I]
    1,691
    Posts
    14
    Years
  • Oh ok got it, Thanks a lot this has really helped me and yeah i'll keep the\n in mind XD
    uh quick question if the person event no is say 3 (if the first is 0) do i type applymovement 0x3 or 0x4 ?

    No worries.

    0x3 sounds right in that case. Be sure to use the 'Person Event no' under the 'Delete Event' button to determine which NPCs you're moving in your scripts.
     

    ASDBUDDY

    The Derp
    347
    Posts
    7
    Years
  • No worries.

    0x3 sounds right in that case. Be sure to use the 'Person Event no' under the 'Delete Event' button to determine which NPCs you're moving in your scripts.

    um sorry to disturb you but can I post another code it's the same one but im having problems since I added some more code?
     
    Back
    Top