Monster AI

Get help using Construct 2

Post » Wed Jul 25, 2012 4:25 pm

Yeah, but you can't compare the sprite's angle like I said above, since that will always be to the right. (since we no longer change it)

You need to use "System: Is between values" and compare 'Enemy.Bullet.AngleOfMotion'.
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Wed Jul 25, 2012 4:35 pm

Okay, il figure out a workaround ....can you give me an example of the distance check?

the player objects is called Player and the enemy is called Ball ...
B
4
Posts: 33
Reputation: 391

Post » Wed Jul 25, 2012 4:52 pm

Bullet_8Animation.capx (r99)

There's probably a better, less event-heavy way of doing the animations, I'll look into it.

Edit: Yup, much better now. Updated the file.Nimtrix2012-07-25 17:02:19
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Wed Jul 25, 2012 4:54 pm

You'd lay it out like this:

distance(Player.x, Player.y, Ball.x, Ball.y)COMPARISON (i.e greater, equal etc.) VALUE (0,1,7 etc.)

Within the compare two values System event.
B
49
S
14
G
3
Posts: 540
Reputation: 5,611

Post » Wed Jul 25, 2012 5:02 pm

Thank you! i will attempt this and upload the game via FTP for testing :D

cheers guys
B
4
Posts: 33
Reputation: 391

Post » Wed Jul 25, 2012 7:03 pm

Having problems with getting the monster using distance...Could someone look at it please?

Download CapX

EDIT: Sorry for double post, i thought it auto merged :Olodose2012-07-25 19:03:48
B
4
Posts: 33
Reputation: 391

Post » Wed Jul 25, 2012 7:34 pm

All the balls will follow when one of the balls are within distance, you need to add a "For each" loop that goes throught the ball instances and checks their distance individually.
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Wed Jul 25, 2012 10:56 pm

I kinda got it now, only thing is making this multiple times as i soon intend to use more armours and a ton more monsters, i already have the images

kinda wish i had a team :P
B
4
Posts: 33
Reputation: 391

Previous

Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, Popcan151, Skebab and 14 guests