Drawing A Path That A Moving Sprite Follows

Get help using Construct 2

Post » Thu Aug 22, 2013 4:12 am

I have seen this example, but I am still stumped.
http://www.scirra.com/forum/how-to-make-bullet-follow-the-line-just-drew_topic53718.html

Because I would like to click on a Sprite that is moving.

Then Draw A Path For This Sprite
Then The Sprite Follows The Path

Does anyone have a tutorial on how to do this?

Thanks
B
5
Posts: 11
Reputation: 247

Post » Thu Aug 22, 2013 11:23 am

B
46
S
16
G
74
Posts: 2,096
Reputation: 44,201

Post » Thu Aug 22, 2013 11:52 am

In this capx from the topic you referred to you only have to change very little to get what you want.

only difference is you are not creating the rockets, but just selecting the objects to follow the line..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Fri Aug 23, 2013 2:49 pm

Thanks guys for the feedback, it is much appreciated.

@plinkie I didn't know pathfinding has mechanic to follow your touch path. I thought only it would follow path between objects to get to next waypoint.

@LittleStain - i tried modifying the capx before, but had no luck bc after selecting a moving rocket, the rocket would need to go towards the touch location then follow the path. But that capx the trigger that followed the path was Rocket Speed > 0.... my rocket already was greater then 0.. so wasn't sure what would be good trigger after clicking on rocket to get it to follow path.
B
5
Posts: 11
Reputation: 247

Post » Fri Aug 23, 2013 3:18 pm

If you need a trigger (of which I'm not sure) you could give the rocket an instance variable on touch and check for that?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775


Return to How do I....?

Who is online

Users browsing this forum: Anonnymitet, atmas, gamecorpstudio, tarek2 and 30 guests