Arcade AI

Get help using Construct 2

Post » Fri Oct 19, 2012 11:58 pm

How do I make it so the sprite YetPlayer follows MachoMoosePlayer and fights enemies, and when you switch characters, the other way around?
Here is the CAPX.
B
30
S
7
G
3
Posts: 366
Reputation: 6,242

Post » Sat Oct 20, 2012 3:34 pm

Anyone?
B
30
S
7
G
3
Posts: 366
Reputation: 6,242

Post » Sat Oct 20, 2012 5:18 pm

You could do this ...
---
--- Variable : Fighting , Character ---
   -- Object : Car --

If Character : * Moose *
-EveryTick :
-If Fighting = 0 :
-- Set Position | Lerp : Moose , Player , 0.5*dt

** Do the same thing for the Player **
If Character : * Moose *
|-EveryTick :
|-If Fighting = 1 :
|-- Set Position | Lerp : Moose , Car , 0.5*dt
|
|-If Distance : Moose , Car < * What ever you want *
|-- Set Fighting : 1
|
|-If Distance : Moose , Car > * What ever you want *
|-- Set Fighting : 0
|__

-If Moose is overlapping Car : * Put Attack Script Here *

-If Player is overlapping Car : * Put Attack Script Here *

Cheers !kbdmaster2012-10-20 17:29:28
B
38
S
16
G
17
Posts: 2,230
Reputation: 17,220


Return to How do I....?

Who is online

Users browsing this forum: AmpedRobot, Google [Bot], katito13, oosyrag, RetroSpock, senna68, yme and 10 guests