"power" launch bar

Get help using Construct 2

Post » Sun Sep 15, 2013 5:27 am



thank you so much for your help ArcadEd.
B
7
S
1
G
1
Posts: 13
Reputation: 492

Post » Sun Sep 15, 2013 5:35 am

No problem and if you need to get a positive value from the meter you can use abs(power) to make it positive and int(abs(power)) to make it a positive int value :).

Good luck.
B
101
S
32
G
11
Posts: 1,546
Reputation: 21,727

Post » Sat Mar 04, 2017 12:54 pm

Sorry to bump an old thread but this is the closest example I could find to what I'm trying to achieve so thank you ArcadEd!

Is there any way I can move the angle bar around and change the angle? I've tried rotating the bar but it still only moves between 0 and -90 when I preview.

Basically, I have a cannon that fires balls into goals, but they have to bounce off of walls and avoid obstacles to hit the goal. In different levels I'd like to reposition the cannon and the angle it points towards. The cannon will rotate and the user needs to touch a button twice, first to stop the cannon moving (so selecting the angle to fire in) and then a power bar will appear moving from 0 - 100, the 2nd touch select the power the ball is fired at.

In some levels the cannon may be at the bottom and the goal at the top with various obstacles in between, in other levels I may put the cannon at the top or middle, or change which way it faces or points towards but it will always only move by 90 degrees. Is it possible to do this in a drag/rotate fashion from a design point of view to make it quicker and easier for me to increase the number of different layouts or levels?
Or would I need to create a different cannon for each level with customised angles that this particular cannon can rotate/fire between?

Hope I've explained myself well! Thanks in advance for any advice.
B
6
S
1
Posts: 1
Reputation: 354

Previous

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 41 guests