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
25
G
20
Posts: 3,053
Reputation: 22,640

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
247
S
85
G
40
Posts: 6,999
Reputation: 57,793

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
36
S
10
G
6
Posts: 948
Reputation: 11,101


Return to How do I....?

Who is online

Users browsing this forum: Artpunk, Braus, GenkiGenga, Kagubro, Mirlas, zeneizel and 25 guests