View Single Post
  #7782    
Old February 2nd, 2013, 09:39 AM
FBI agent
Imagine something beautiful
 
Join Date: Jan 2013
Location: Isle 4 - Dairy Products
Gender: Male
Quote:
Originally Posted by thetripplenine View Post
So I have a problem with a script, when i step on the green script tile the game freezes, (of course).

Spoiler:
#dynamic 0x9C0000

#org @start
checkflag 0x860
if 0x1 goto @hey
if 0x1 goto @done
end

#org @hey
msgbox @youcant 0x6
applymovement 0x0 @move
applymovement 0xFF @turn
applymovement 0x0 @moveback
waitmovement 0x0
waitmovement 0x0
end

#org @done
release
end

#org @move
#raw 0x0B
#raw 0x00
#raw 0xFE

#org @moveback
#raw 0x0A
#raw 0x00
#raw 0xFE

#org @turn
#raw 0x56
#raw 0x08
#raw 0x01
#raw 0xFE

#org @youcant
= You cannot enter until you take a\nPokémon.


So I'm basically trying to make a guy block you from entering unless you have the Pokemon menu.
(He lets you pass if you do)
Quote:
Originally Posted by thetripplenine View Post
I think it's the right flag for the Pokemon menu because i'm hacking emerald.

EDIT:
I think the problem is that when you open the emulator you do not see the sprite that's supposed to move..
OK, you're using the right flag, but incorrect logic in your script. Checking a flag then comparing it to 0x1 checks if it is true. So you don't even need the @done. Try this:

#dynamic 0x9C0000

#org @start
checkflag 0x860
if 0x1 goto @hey
release
end

#org @hey
msgbox @youcant 0x6
applymovement 0x0 @move
waitmovement 0x0
applymovement 0xFF @turn
waitmovement 0x0
applymovement 0x0 @moveback
waitmovement 0x0
release
end

#org @done
release
end

#org @move
#raw 0x0B
#raw 0x00
#raw 0xFE

#org @moveback
#raw 0x0A
#raw 0x00
#raw 0xFE

#org @turn
#raw 0x56
#raw 0x08
#raw 0x01
#raw 0xFE

#org @youcant
= You cannot enter until you take a\nPokémon.


As for the sprite that doesn't appear, change it's personID to 0000. I think a level script is keeping the said person form appearing, just change his person id in advance map.
__________________
...

Hacks I support:
http://www.pokecommunity.com/showthread.php?t=297199 --Legend of Anbuja
http://www.pokecommunity.com/showthread.php?t=200227 -- Pokemon Rose version

People whom I thank:
Comrade -- For helping me with my bad hack, and for being a good friend
Darthatron -- Helping me get into basic ASM, even though I'm hopeless. (He is heartless stay away).
Anbuja's_BlooDY -- Graphics help, and being a good friend
FBI -- For having the username I wanted