Enemy activation

For questions about using Classic.

Post » Thu Oct 20, 2011 5:13 pm

How can I make something like this?
I have enemy and player.
If distance between player and enemy is less or equal 100, then enemy starts moving towards player (I know how to make enemy move towards player).
B
11
S
3
G
6
Posts: 193
Reputation: 4,234

Post » Thu Oct 20, 2011 5:41 pm

You can use distance(player.x,player.y,enemy.x,enemy.y) to get the distance between your player and the enemy.

http://sourceforge.net/apps/mediawiki/construct/index.php?title=System_Expressions

Image
B
225
S
27
G
13
Posts: 1,774
Reputation: 18,024

Post » Thu Oct 20, 2011 7:34 pm

Thanks.
B
11
S
3
G
6
Posts: 193
Reputation: 4,234


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests