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
29
S
7
G
3
Posts: 361
Reputation: 6,187

Post » Sat Oct 20, 2012 3:34 pm

Anyone?
B
29
S
7
G
3
Posts: 361
Reputation: 6,187

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
35
S
16
G
16
Posts: 2,222
Reputation: 16,589


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 26 guests