having something being in range!
digitalzero
Member, BASIC Posts: 639
okay so kinda vague i know, but i would like to have my enemies attack the closer the hero actor is to them with both the x and y positions... picture there being a circle around an enemy actor and when that "circle" is touched thats when the enemy activates and starts attacking... hope that makes sense lol
Comments
Use magnitude to detect the distance between two actors.
Or place a circle actor (invisible with collision set to circle) around the NMEs and use a basic collision rule to detect when the hero has overlapped the circle.
Here is a tutorial on the Magnitude Function if you want to check it out:
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
wow thanks so much you all!!!!! xoxoxoxo! ill check this out Jamie!
@jamie_c Nice video! What happens hen you have 4 actors who are approaching the shooting actor at the same time? Is the shooting actor just going to shoot on the actor that is the closest and is this heavy on performance?