View Single Post
  #7782    
Old February 2nd, 2013 (09:39 AM).
FBI agent's Avatar
FBI agent FBI agent is offline
If my PM box is full, VM instead :x
 
Join Date: Jan 2013
Location: Unknown Island
Gender: Male
Posts: 820
Quote originally posted by thetripplenine:
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:
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.
__________________
...

My name forum name is FBI Agent, though you can call me FBI because it's shorter.

Some of my stuff:
ASM request/resource thread
ASM tutorials thread
ASM Workshop