The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary ROM Hacking (https://www.pokecommunity.com/forumdisplay.php?f=284)
-   -   Other setvar (https://www.pokecommunity.com/showthread.php?t=354602)

pokemon r August 24th, 2015 11:12 PM

setvar
 
hi guys i have some questions that the script below i show it contain setvar variable and value i want to ask that from where this variable and value come





#org 0x8A0AD7
lock
sound 0x9
showsprite 0x4
applymovement 0x4 0x88A0D0A
waitmovement 0x4
sound 0x9
showsprite 0x5
sound 0x15
applymovement 0x4 0x882052C
applymovement 0x5 0x882052C
waitmovement 0x0
getplayerpos 0x4000 0x4001
compare 0x4000 0x18
if 0x1 call 0x88A0D9A
compare 0x4000 0x19
if 0x1 call 0x88A0D74
compare 0x4000 0x1A
if 0x1 call 0x88A0CBD
compare 0x4000 0x1B
if 0x1 call 0x88A0DCA
sound 0x15
applymovement MOVE_PLAYER 0x882052C
waitmovement 0x0
textcolor 0x0
msgbox 0x88A0B89 MSG_NORMAL '"Oh, look!\nA real live POKéMON!\pI..."
applymovement 0x4 0x88A0D0A
applymovement 0x5 0x88A0D0A
waitmovement 0x0
applymovement 0x5 0x8805F31
waitmovement 0x5
applymovement 0x5 0x8809D03
applymovement 0x4 0x8809D03
waitmovement 0x0
hidesprite 0x4
hidesprite 0x5
setvar 0x7034 0x1
release
end

Joexv August 25th, 2015 4:26 AM

Variable 0x7034 is way too big to be used in your game, please refer to THIS tutorial about what vars are safe.

And if you want to check it in a different script just go a compare command, it appears you've already used one in your script so I'm not really sure what you're even asking.

pokemon r August 25th, 2015 12:30 PM

Quote:

Originally Posted by joexv (Post 8903782)
Variable 0x7034 is way too big to be used in your game, please refer to THIS tutorial about what vars are safe.

And if you want to check it in a different script just go a compare command, it appears you've already used one in your script so I'm not really sure what you're even asking.

I am asking the use of var how it use in different cases and its work

Micael Alighieri August 25th, 2015 1:52 PM

Quote:

Originally Posted by pokemon r (Post 8904242)
I am asking the use of var how it use in different cases and its work

Your question isn't clear yet, my friend. However, if you're asking for the ways you can use the vars, then...
  • Some general info: Common scripts in Advance Map, the green ones with a yellow "S" (I don't know how they're called), have two relevant squares: the one for the Var Number and another for the Var Value.
  • How they're activated: A script of that type will check if a var have a certain value (for example, the value 0001 in var 402A). If the value is set, then the script will activate; if not, it will not work.
It works the same way for some types of level scripts (pro tip: recycle the var).

pokemon r August 25th, 2015 2:01 PM

Quote:

Originally Posted by Micael Alighieri (Post 8904335)
Your question isn't clear yet, my friend. However, if you're asking for the ways you can use the vars, then...
  • Some general info: Common scripts in Advance Map, the green ones with a yellow "S" (I don't know how they're called), have two relevant squares: the one for the Var Number and another for the Var Value.
  • How they're activated: A script of that type will check if a var have a certain value (for example, the value 0001 in var 402A). If the value is set, then the script will activate; if not, it will not work.
It works the same way for some types of level scripts (pro tip: recycle the var).

Thanks I got it


All times are GMT -8. The time now is 2:30 AM.


Like our Facebook Page Follow us on Twitter © 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.