adjusting bullets velocity with keypad

Get help using Construct 2

Post » Tue Dec 24, 2013 2:55 pm

how would i go about adjusting a projectiles velocity by pressing a key

quick example

click a

add 1 to bullets velocity
minimum 200 maximum 400

in my game im trying to set it up so you have to determine the angle and velocity of a sniper rifle in order to reach your target im fairly new to this program and have little skills on mathmatic equations ive searched all examples i just cant seem to find any forum post with the anser to my question PLEASE HELP
B
11
S
3
Posts: 25
Reputation: 1,306

Post » Tue Dec 24, 2013 8:41 pm

Use the keyboard object, or touch object if you have onscreen keys. With those you can change what get's plugged into your formula by assigning the number pushed to a variable and using that variable in your formula. For math on doing that you may need to either check with google or Wikipedia for equations for calculating bullet velocity, drop off, etc... or hopefully one of the folks here that may have done this before may have an idea.
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,583


Return to How do I....?

Who is online

Users browsing this forum: datiel12, Google [Bot] and 51 guests