Hit boxes and AI

Get help using Construct 2

Post » Thu Sep 26, 2013 4:06 pm

This tutorial is too advanced for me at this point
https://www.scirra.com/tutorials/468/part3-basic-fighting-game-tutorial-video-series

Can anyone explain to me the steps to it?

I made a new "AttackCLSN" object
I made a new image point called "Attack" in "Combo1" frame 2
I made a new action "spawn AttackCLSN object at image point 1 on layer 0" when Combo1 is at frame 2.

Problem:
- when I am inputting the image point, C2 does not accept it when I input "Attack", so I typed 1 instead. It stated there I can input the name or number, so I have no idea why it doesn't accept "Attack"?

then, since my AttackCLSN is just a small square, how can I resize it to fit the size of the attack (like size of whole punching arm for example) since the player in the layout view shows the Idle pose animation.


-----------AI-------------

I have a type of enemy with Idle, walk, punch, hurt

What's a good logic to use for its AI?

and how do I compare the distance between 2 different objects?

Please help. Thanks.
B
16
S
7
Posts: 301
Reputation: 2,726

Post » Thu Sep 26, 2013 5:32 pm

For AI, look at Pathfinding in the manual. To compare distance you want to use the system expression distance(x1, y1, x2, y2) where 1 is object 1 and 2 is object 2.
B
46
S
16
G
77
Posts: 2,155
Reputation: 45,823

Post » Fri Sep 27, 2013 4:05 am

@plinkie
thanks for the help. I used ctrl+F "Path" in the manual to find "Pathfinding" but I can't find it.

I found distance though. that's useful. thanks.

Can anyone help me on hitboxes?

edit:
why does C2 asking me for a string parameter on the y1 (and possibly y2) parameter?

This is what I put in the "For" loop
distance (Luffy.X, Luffy.Y, PirateSwordstand.X, PirateSwordstand.Y)sgn152013-09-27 04:14:50
B
16
S
7
Posts: 301
Reputation: 2,726


Return to How do I....?

Who is online

Users browsing this forum: Artcadev, brunopalermo, Lancifer and 22 guests