top down artillery

Post your own tutorials, guides and demos.

Post » Sun Oct 19, 2008 1:26 am

I bet theres a better way of doing this... but it works.

click to shoot.
don't move the mouse after shooting otherwise it tweaks out.

i could have spent a lot more time and figured out how to make actual cannon physics.. but this was all I needed. :)
B
6
S
2
G
5
Posts: 249
Reputation: 2,323

Post » Sun Oct 19, 2008 1:42 am

Pretty good. :) But you definitely need to fix the thing where the balls always aim for the mouse, even after firing, which you mentioned. Otherwise, it seems to work well.
Moderator
B
97
S
36
G
19
Posts: 1,584
Reputation: 17,692

Post » Sun Oct 19, 2008 2:02 am

You could store the angle fired at in one of the fired sprites so moving the mouse wouldn't affect it. Also, 'Every 1 ticks' means the same as 'Always'.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,468

Post » Sun Oct 19, 2008 2:14 am

yeah i was messing with having another object act as a marker, but it ended up kinda buggy, the variable idea will probably work much better.
B
6
S
2
G
5
Posts: 249
Reputation: 2,323


Return to Your tutorials & example files

Who is online

Users browsing this forum: No registered users and 0 guests