View Single Post
  #7778    
Old February 2nd, 2013 (04:29 AM).
FBI agent's Avatar
FBI agent FBI agent is offline
If my PM box is full, VM instead :x
Team Johto
 
Join Date: Jan 2013
Location: Unknown Island
Gender: Male
Posts: 823
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)
First of all, let me tell you what's wrong with this part:
Quote:
applymovement 0x0 @move
applymovement 0xFF @turn
applymovement 0x0 @moveback
waitmovement 0x0
waitmovement 0x0
There are two things wrong with what you have done here. The first thing is that two wait movement commands should never be together, you only need one. The second thing is that your applymovements will not work as you planned. Something more to this would get the desired effect:

applymovement 0x0 @move
applymovement 0xFF @turn
waitmovement 0x0
applymovement 0x0 @moveback
waitmovement 0x0

That's not why the script isn't running though, you're using the wrong flag (if this is Fire Red). You should be checking flag 0x828.
__________________
...

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