Advanced AI Control

Get help using Construct 2

Post » Thu May 30, 2013 4:04 am

Hey you,

Are there any tutorials out there can cover advance AI control? I am looking to make enemy ships fly in on certain paths. Randomly pick one of those paths. Then when its completed its path, hang around for a bit shooting at the Player. After X amount of time, the AI flies off the screen.

So, yea, do you have any tutorial links or tips for handling this?

Thank you,
Stephen
B
53
S
14
G
13
Posts: 818
Reputation: 17,414

Post » Thu May 30, 2013 4:11 am

It wouldn't be too hard to do with pathfinding. they have conditions for: on path found, on path arrived, on path not found, etc.
You could then put an instance variable on the enemy and call it "State", and use different enemy states to do different things like Flee state, attack state, wait state.

Here's a tutorial on pathfinding:
https://www.scirra.com/tutorials/474/pathfinding-with-line-of-sight#h2a6
B
35
S
5
Posts: 411
Reputation: 3,406

Post » Thu May 30, 2013 5:35 pm

This helped me alot with AI following a path.

http://www.scirra.com/forum/help-creating-ai-path_topic65268.html

Look at the 8th post by zatyka.
B
3
Posts: 8
Reputation: 241

Post » Thu May 30, 2013 5:51 pm

@adc1980 Thank you, your linked helped with the pathing. I still need to figure out how to spawn a group of enemies and make them follow each other. Blarghh....!
B
53
S
14
G
13
Posts: 818
Reputation: 17,414

Post » Thu May 30, 2013 6:05 pm

I've never used any plugins but found this which might help

http://www.scirra.com/forum/behaviour-boids-flocking_topic61864.html

The game I was practicing my development with was a Racing game so needed the Computer AI player to follow a path around the track
B
3
Posts: 8
Reputation: 241


Return to How do I....?

Who is online

Users browsing this forum: Congrats2u, FTGamingco, theinfomaven and 11 guests