orbital gun movement and control

For questions about using Classic.

Post » Sat Jul 02, 2011 11:01 pm

I'm trying to get an object (that's rotating around another object) to fire in the direction it's facing (ie: at the angle, creating a 360 firing ability). i've set bullet behavior and to create at the center of the orbiting object but it just seems to fire in one direction. any way to get angles and do this?
B
1
G
1
Posts: 5
Reputation: 435

Post » Sun Jul 03, 2011 2:23 am

Check out the 'Ghost Shooter demo game' in the tutorials.

Ghost shooter demochrisbrobs2011-07-03 02:23:51
B
19
S
6
G
7
Posts: 1,205
Reputation: 7,298

Post » Sun Jul 03, 2011 5:52 am

what's kind of behavior/costum movement have your sprite?
ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Post » Sun Jul 03, 2011 1:14 pm

here's an example
space fires, arrow keys move
http://dl.dropbox.com/u/1013446/orbitalturret.cap

the only relevant part is On Space Pressed, and the two actions there (the rest is just there to make it look cooler)

after I spawn an object, it is picked, and so any subsequent actions within that event for that objecttype, will refer to that specific object.

The ghost shooter tutorial really is the best intro to construct imo, because it covers all the basics.
lucid2011-07-03 13:15:35
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Sun Jul 03, 2011 5:56 pm

I ended up finding a plugin called the orbiter plugin, and then using an algorithm to change the direction of movement for the object being fired. it was angle(x1, y1, x2, y2). then with a little bit of tweaking for the physics behavior, i had her up and running!
B
1
G
1
Posts: 5
Reputation: 435


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests