• 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] the variable is not readable after the event

Dinisk

DinisK
89
Posts
7
Years
  • Age 24
  • Seen Apr 27, 2019
for starters, I created a level script 02 var 4050.(and on spawn hero this offset script)

in the start var 0x4050 = 0
....#org @main....
setvar 0x4050 0x1 ->activate one time script(its work) //the script starts the animation of the machine at the beginning
//after clicking on the script, its work does not occur, I specifically went from the beginning of the game

we have 0x4050 0x1 and when i create a script with tiles! var num 4050 var value (can not activate for this first time) unknown put 0000 (3)

#org @start
compare 0x4050 0x1
if 0x3 call @01
compare 0x4050 0x2
if 0x1 call @02
end

#org @ 01
applymovement 0x13 @1
spriteface 0xFF 0x1
waitmovement 0x0
msgbox @tell 0x2
applymovement 0xFF @2
end

#org @02
msgbox @tell2 0x2
applymovement 0x13 @ 3 // leaves the screen
waitmovement 0x0
movesprite2 0x13 0x4 0x14 // teleports to position
setvar 0x4050 0x3 // after it is gone says @ 3 text (the appearance on the map is related to the level of the script 0x3 map)
end

#org @tell
= simple text
#org @tell2
= other text

#org @1&2&3
#org // not important
#org 0xfe

and even when I compile the script it may not work, but if I'm due to the offset again, it will work . advance map 1.95 bug?i pressed ctrl+s and save map script
 

Dinisk

DinisK
89
Posts
7
Years
  • Age 24
  • Seen Apr 27, 2019
it seems I understood. var value checks what value of the variable you have at the moment, and at the beginning of the script put another value so as not to repeat the action of the script
 
Back
Top