Shooting Directions

For questions about using Classic.

Post » Wed Apr 13, 2011 2:22 pm

So, this is probably easy for most of you guys but im new to Construct so would appriciate som help.

Im currently working on a 2D game and i want my character to have a shoot ability, in the ghost shooter tutorial you learn how to aim with your mouse, i want my character to shoot in the direction its turned to, how can i do this.
B
2
G
1
Posts: 16
Reputation: 507

Post » Wed Apr 13, 2011 3:41 pm

There are many ways to do this, but the easiest is perhaps using the angle of your character (platform behavior)

Using 0 for right and 180 for left, no bullet counter, timer or animation in this example though. Well at least they guy has a top hat :D

Sample:
http://dl.dropbox.com/u/17105373/Constu ... ng-guy.cap
B
6
S
3
G
1
Posts: 76
Reputation: 1,002

Post » Wed Apr 13, 2011 5:19 pm

Actually, you don't have to manually set bullet angle while spawning. Bullet will automaticaly get parent object's angle.
B
2
S
2
G
2
Posts: 158
Reputation: 1,366

Post » Wed Apr 13, 2011 8:15 pm

[quote="DtrQ":1cqdlr4j]Actually, you don't have to manually set bullet angle while spawning. Bullet will automaticaly get parent object's angle.[/quote:1cqdlr4j]
Heh, I thought it was supposed to be set. See this is why I like this here forums, you never stop learning and there is just so much info in here!

Simplifies this by a WHOLE bunch!

Just remove all the angle stuff and only have that "On Left mouse button Clicked" in there spawning a bullet at the "gunbarrel" image point... Awesome!
B
6
S
3
G
1
Posts: 76
Reputation: 1,002

Post » Thu Apr 14, 2011 8:07 am

Thanks for reply :)
B
2
G
1
Posts: 16
Reputation: 507


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests