Hi there Developer How-To. I'm trying to create some traps that activate if you enter the same x or y plane as them (think these fellows from Zelda). I've surmised I'd need to use a while()> look and check if a player is in the same column or row of turfs as the trap is.
Problem is I'm not entirely sure how to write up such a proc.
|
||||||||
if(player.x == trap.x) // player is lined up vertically
if(player.y == trap.y) // player is lined up horizontally