Question by
ArmswieldTheHero · Oct 19, 2016 at 03:31 AM ·
2dinput.getaxisteleportingadjacent
How to teleport to an adjacent empty?
How would I make it to where in 2D if I'm standing in a 3x3 grid made of empties with sprites attached to them, I move to the adjacent empty based on which axis I push (for example, if I'm standing on central and I push the Y axis positive, I move to the north position, then if I push x negative move to northwest) I want the movement to be nearly instant, a slight delay for an animation to play but the actual movement instant. So teleporting if you will. I don't think an array will work because the grid is made of rectangles. I'm fairly new to scripting so please include the actual script, preferably with comments in them to tell me what does what.
Comment