KingdomRush-based movement

Get help using Construct 2

Post » Tue Jul 16, 2013 11:44 am

If u want a sprite to follow a winding road like kingdom rush (fantastic game btw) try using both turret and bullet behaviors for that sprite, also you can set a point in the road for it to go to, then once it hits that point state the next point, plus you can add lots of events & actions for the sprite while its on its route around all your points. :)
B
4
S
1
Posts: 51
Reputation: 502

Post » Tue Jul 16, 2013 2:48 pm

Hi GeneratorX. Thank you for answering, You solution seems fairly good, however, would I need to "hardcode" those points?. In the other hand (and because I didnt want to sound rude with GeneratorX), I managed to create the kingdom rush movement using Bezier curves which turned out to be quite easy to implement, if anybody needs it I could create a tutorial, just let me know.
B
10
S
3
Posts: 75
Reputation: 864

Post » Wed Jul 17, 2013 12:31 am

You probably found it already but this topic seeks the same mechanic (if i'm not wrong). there's some capx there:

http://www.scirra.com/forum/collisions-with-multiple-objects-same-spot_topic71607.html

By the way i'm interested in this kind of mechanics, that's way i'm messing around.
B
31
S
4
G
4
Posts: 110
Reputation: 4,593

Post » Wed Jul 17, 2013 1:07 am

Hi Hillstrom. That will definitely come in handy :). If you want I can try and create a Manual :). For now what I did, as I mentionated earier, was to implement a Bzier Curve.

This is my function: 107*((1-EnemyShip.Speed)^2)+2*(1-EnemyShip.Speed)*EnemyShip.Speed*520+(EnemyShip.Speed^2*Sprite3.X)

It is messy so I do not expect you to understand it nor use it, but if you ttake the time to look closer at it, and you look at this link :http://devmag.org.za/2011/04/05/bzier-curves-a-tutorial/, you will understand how you could implement this kind of movement. BTW, I used set X, Y instead of "move to object" or other behaviours actions. Right now my function is cuadratic and so it is not quite a circular movement, I am working on the cubic version of this functions.Jhonathan Ibanez2013-07-17 01:12:56
B
10
S
3
Posts: 75
Reputation: 864

Previous

Return to How do I....?

Who is online

Users browsing this forum: dop2000 and 25 guests