AI Movement

Get help using Construct 2

Post » Wed Oct 03, 2012 6:37 pm

How do I make the computer control a platformer or 8 direction types of enemies.

By defult, your keyboard/mouse is controlling them, and if you disable "Defult controlles" the enemy just can't move.

How can I make the computer control enemy movement?????





PLEASE DON'T TELL ME TO READ THE TUTORIAL, I ALREADY READ IT AND COULD NOT UNDERSTAND THIS PART, THAT IS WHY I'M ASKING FOR HELP!
B
4
Posts: 22
Reputation: 351

Post » Wed Oct 03, 2012 8:21 pm

You want 8 direction types of enemies for AI movement, there an example is Ghost Shooter and you may modify the event while you are learning.
B
96
S
34
G
29
Posts: 3,139
Reputation: 28,236

Post » Wed Oct 03, 2012 8:41 pm

You use the action "8 direction: Simulate control" on a condition of your choice ("On every X seconds" for example, or "On every tick", depending on what you're wanting to do exactly).

Be sure also to check the "How do I FAQ" (link in my signature) in the section "Moving object" and "Platformer". There are several example of patrolling/moving enemies.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
276
S
103
G
84
Posts: 7,289
Reputation: 83,098

Post » Thu Oct 04, 2012 3:54 am

Something that will be helpful is the distance(1.x,1.y,2.x,2.y) function.
You can do stuff like check if the distance between the AI Object and the player is less than 100, if it is, then increase it's max speed to make a charge for example.
B
37
S
11
G
6
Posts: 962
Reputation: 11,254


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 10 guests