The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script the variable is not readable after the event

Notices
For all updates, view the main page.

Binary ROM Hacking Need a helping hand or just want to talk about binary ROM hacks? Get comments and answers to any ROM Hacking-related problems, questions or thoughts you have here.

Ad Content
Reply
 
Thread Tools
  #1   Link to this post, but load the entire thread.  
Old November 15th, 2018 (9:21 AM).
Dinisk's Avatar
Dinisk Dinisk is offline
DinisK
 
Join Date: Jan 2017
Gender: Male
Posts: 89
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
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old November 16th, 2018 (6:15 AM).
Dinisk's Avatar
Dinisk Dinisk is offline
DinisK
 
Join Date: Jan 2017
Gender: Male
Posts: 89
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
Reply With Quote
Reply

Quick Reply

Join the conversation!

Create an account to post a reply in this thread, participate in other discussions, and more!

Create a PokéCommunity Account
Ad Content

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 9:18 AM.