"power" launch bar

Get help using Construct 2

Post » Sat Sep 14, 2013 11:45 pm

This section has been phenomenally useful, thank you. But i have been unable to find the answer to something ive been working on.

I am attempting to make a launcher game such as kitten cannon or toss the turtle. i have been able to make a "power bar" that will expand its width from 0 to 100 but then i am unable to make it go from 100 to 0. i have been making it restart the timer that allowed it to go from 0 to 100 back to 0 which i think players will find annoying.

Any help or suggestions on how to make my "power bar" go from 0 to 100 and then when it reaches 100 to shrink back to 0 and then back to 100....etc would be greatly appreciated.
B
7
S
1
G
1
Posts: 13
Reputation: 492

Post » Sat Sep 14, 2013 11:56 pm

B
101
S
32
G
12
Posts: 1,549
Reputation: 21,993

Post » Sun Sep 15, 2013 12:05 am

@ArcadEd

You sir are a gentleman and a scholar. I thank you.
B
7
S
1
G
1
Posts: 13
Reputation: 492

Post » Sun Sep 15, 2013 12:18 am

No problem. Changing the dt * 100 will make the meter go faster (larger number) or slower (smaller number).

Good luck.
B
101
S
32
G
12
Posts: 1,549
Reputation: 21,993

Post » Sun Sep 15, 2013 1:40 am

Yes i have been fooling around with it, works perfect.

perhaps you or another patron could help me with the compliment problem i appear to be having. it coincides with the power bar in a way.

I am having trouble getting the "angle meter" to move like the power bar. I need the meter to go between 90 and 180 degrees. I can get the bar to bounce back and forth smoothly using the code you provided me with for the power bar, but it refuses to work in between the 90 to 180 degree area.


to be more specific, the angle bar would start at 180 degrees and move up to 90 then back down etcHITmen2013-09-15 01:41:42
B
7
S
1
G
1
Posts: 13
Reputation: 492

Post » Sun Sep 15, 2013 3:54 am

B
101
S
32
G
12
Posts: 1,549
Reputation: 21,993

Post » Sun Sep 15, 2013 3:55 am

Remember angles go like this:
East = 0
South = 90
West = 180
North = 270

So if it starts at 180, it can't move "Up" to 90.ArcadEd2013-09-15 03:55:58
B
101
S
32
G
12
Posts: 1,549
Reputation: 21,993

Post » Sun Sep 15, 2013 4:13 am

Thanks again, i came to that solution as well when i was experimenting, sadly no that does not fix my problem.

the actor in the game is going to be running from the left side of the screen to the right, when he hits an edge the angle meter will appear, so this solution will not work.

do you have any ideas on how to make the angle meter work in this way?

as in going from north to east or east to north, 270 to 0 or 0 to 270HITmen2013-09-15 04:16:53
B
7
S
1
G
1
Posts: 13
Reputation: 492

Post » Sun Sep 15, 2013 5:15 am

Like this?

https://www.dropbox.com/s/sr0ip6y8y4qbru5/meter-angle.capx

The trick is not using 270, but -90ArcadEd2013-09-15 05:15:29
B
101
S
32
G
12
Posts: 1,549
Reputation: 21,993

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

Next

Return to How do I....?

Who is online

Users browsing this forum: LunaticCat and 6 guests