View Single Post
  #775    
Old June 3rd, 2012 (10:53 AM).
YogiBerra
 
Join Date: Oct 2010
Gender: Male
Hi. I was hoping that someone could help me with this script. I'm trying to put a script on a tile that I do not want the player to pass until (s)he has beaten the Team Rocket member in the room. So if the player steps on the tile, there are two cases. If the player has not yet picked a Pokemon, then the Rocket member has not picked a Pokemon and is still in his spot next to the tile I have the script on. If the player has picked his Pokemon, then the rocket member is not next to the tile. So in the first case, I want the Rocket member to turn to the player and tell him that he can not pass, and in the second case I want a message to pop up that tells the player he can't go downstairs before beating the Rocket member. With the code I have, the player just freezes when I step on the tile.
Code:
//---------------
#org 0x2D521C
checkflag 0x1001
if 0x1 goto 0x82D5249
checkflag 0x1000
if 0x1 call 0x82D54F4
checkflag 0x1000
if 0x0 call 0x82D5534
end

//---------------
#org 0x2D5249
end

//---------------
#org 0x2D54F4
applymovement 0x1 0x82D55B4
textcolor 0x0
msgbox 0x82D55F4 MSG_KEEPOPEN //"[rival]: Hey! You can't go downsta..."
closeonkeypress
applymovement MOVE_PLAYER 0x834EC0C
return

//---------------
#org 0x2D5534
textcolor 0x0
msgbox 0x834EB8C MSG_KEEPOPEN //"I can't go down there while that\n..."
closeonkeypress
applymovement MOVE_PLAYER 0x834EC0C
return


//---------
// Strings
//---------
#org 0x2D55F4
= [rival]: Hey! You can't go downstairs!\nWe're sacking the place!

#org 0x34EB8C
= I can't go down there while that\nTeam Rocket member is still here!


//-----------
// Movements
//-----------
#org 0x2D55B4
#raw 0x2 //Face Left
#raw 0xFE //End of Movements

#org 0x34EC0C
#raw 0x10 //Step Down (Normal)
#raw 0xFE //End of Movements
Reply With Quote