So I'm trying to set a conditional branch for when the player is at some screen postions (via a variable conversion), but after checking with a text message, it seems like it use decimals wich aren't supported in conditional branchs. Since (atleast in my case) case it usually only have a 0 after either X or Y (i.e 272 32,0) is there a way to round the variable via script call or something to equal 272 32? Thanks.
Player Screen Postion X Y in conditional branch
RPG Maker VXAce SupportAre you trying to check the player's screen position or map position?
I'll assume map position here. Two ways to do this is:
I'll assume map position here. Two ways to do this is:
Code:
//1) Using variables
Control Variables 1 == Player's Map X //located in Game Data
Control Variables 2 == Player's Map Y
Conditional Branch : Script : $game_variables[1] == 272 && $game_variables[2] == 32
//2) Using script calls
Conditional Branch : Script : $game_player.x == 272 && $game_player.y == 32
//In the above examples, the ensuing event will activate precisely at those coordinates.
I was talking bout the player's screen position.
Then use this:
Code:
Control Variables 1 == Player's Screen X //located in Game Data
Control Variables 2 == Player's Screen Y
Conditional Branch : Script : $game_variables[1] == 272 && $game_variables[2] == 32
It works Thanks!
Original thread: https://forums.rpgmakerweb.com/threads/player-screen-postion-x-y-in-conditional-branch.83238/