Copy link to clipboard
Copied
I'm making a Minecraft-Terraria style mining game, and I have a pickaxe tool. I want to make it so it can only be triggered over a certain area or position. How would I do this?
PS. If it uses coordinates, how would I find those?
Copy link to clipboard
Copied
you can use a hitTest with a shape that you place on the stage or using coordinates. if you use coordinates, you would use the pickaxe._x and pickaxe._y values.
Copy link to clipboard
Copied
Sounds good, do you have any idea how I would do that? 😕 I'm a bit confused.
Copy link to clipboard
Copied
which one?
there are 2 different suggestions. using coordinates is easiest to use but only works well if the area is rectangular.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now