Help wanted for simple enemy A.I

Get help using Construct 2

Post » Fri Feb 14, 2014 12:39 pm

Hello, I'm SMDgamer27 :) Started using Construct 2 for a couple of days and after playing around with all the possibilities, I've begun to create my own game.

In one of the parts, you're suppose to fight a bad guy in a space shooter like style.

Basically, you're the guy at the bottom with the spiky blue hair, and the bad guy is the grey, evil looking one at the top. The thing is, I want to make a simple A.I for that bad guy, but can't figure out how no matter what :(

What I want him to do is move a certain amount of pixels to the left. And once he does that, I want him to move the same amount of pixels to the right, and so on and so on.... What should I do to make that happen? Thanks!

B
6
S
1
Posts: 22
Reputation: 600

Post » Fri Feb 14, 2014 12:57 pm

Use the sine behaviour;
https://www.dropbox.com/s/334dqxxyjvw27nx/sine.capx
Have retro games for sale? Buy & Sell Retro Games UK
B
9
S
2
Posts: 68
Reputation: 768

Post » Fri Feb 14, 2014 1:43 pm

Yes, it works! I can't believe it was really that simple :) Thank you so much, now I have a nice, working enemy in my game!
B
6
S
1
Posts: 22
Reputation: 600

Post » Fri Feb 14, 2014 1:45 pm

Your welcome, good luck with your game.
Have retro games for sale? Buy & Sell Retro Games UK
B
9
S
2
Posts: 68
Reputation: 768


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 32 guests