Physics - variable speed limits

Get help using Construct 2

Post » Mon Jan 07, 2013 8:54 pm

Hi everyone. I hope those of you with a greater understanding of math than I have can help me with this issue.

I have a top-down space shooter type game. I'm using custom physics-based movement to propel the ship. What I'm struggling with is the following:

I have two max speeds set for my ship, VarTotalMaxSpeed and VarAfterburnerMaxSpeed, set to 120 and 240 respectively. I've got all the motion working quite well except for one little snag: While I want to limit the afterburner usage with limited fuel (not implemented in my example file), I want my player to always have the ability to manoeuvre with the basic thrusters, but due to the way I've set up my events, when the player is going between the speeds 120 and 240, they can only use their afterburners.

Essentially what I want is a way for the player to use the regular thrusters at that speed, but only to slow down the ship, by flipping it in the opposite direction of travel and pressing the up button. Activating the regular thrusters would have no effect if the player continued in the same direction.

capx

What I'd like to accomplish:


Thanks in advance!
B
56
S
15
G
10
Posts: 910
Reputation: 11,942

Post » Tue Jan 08, 2013 8:23 pm

Still struggling with this problem. Is there anyone who can help me?
B
56
S
15
G
10
Posts: 910
Reputation: 11,942

Post » Tue Jan 08, 2013 10:21 pm

Yeah ... There's not a lot of people on the forum these days , I struggle too :(

So ... You see the Forward and Reverse events ? Remove the "* dt" ...
I think this makes the acceleration so little thus making it un-noticeable
B
34
S
16
G
16
Posts: 2,222
Reputation: 16,564

Post » Tue Jan 08, 2013 10:42 pm

I don't think they would help you if you installed 3rd party plugins, they prefer to open .capx without third party plugin
B
95
S
25
G
20
Posts: 3,052
Reputation: 22,613

Post » Wed Jan 09, 2013 3:10 pm

Thanks for pointing that out, @Joannesalfa. I forgot that I had any third-party plugins installed, and I didn't realise that a capx requires those plugins even if they're not used.

I've re-uploaded the file to its original location. If anyone has any advice for me, I'd really appreciate it!

@Whiteclaws, thanks, but that has no effect on this problem. Forward isn't activating at all between the speeds of 120-240 because of the conditions I've set up, but that's the only effective way I know to limit the regular forward speed, which I need to do one way or another (hoping the "another" part is what someone can help me with).
B
56
S
15
G
10
Posts: 910
Reputation: 11,942

Post » Wed Jan 09, 2013 3:27 pm

@WhiteClaws
"Yeah ... There's not a lot of people on the forum these days , I struggle too :("
We all benefit from rich forum participation, everyone has something to teach as well as learn. But you dear Whiteclaws have probably ran off more visitors than we will ever know about. So think about your comment above, and think about some of the things you say, and ask yourself "would I like to be treated that way?" I doubt it.
B
20
S
2
Posts: 257
Reputation: 2,431

Post » Wed Jan 09, 2013 4:48 pm

@GeometriX, I did try to help not long after you created this thread, but it required the gravitation plugin, which I couldn't be bothered to search, download and install at the time. So, yeah, Joannesalfa is right, the plugin probably deterred a lot of people from helping out. I did install the plugin last night, but got distracted and forgot to check your capx doh!

When I first ran it, it was stuck in a loop and crashed my browser... you might want to disable that WHILE event first. I'll let you know how I get on now that's fixed ;pprocrastinator2013-01-09 16:55:08
B
15
S
5
G
7
Posts: 877
Reputation: 5,650

Post » Wed Jan 09, 2013 5:05 pm

Ah, damn, I forgot about that plugin, too :/

Sorry @procrastinator, I've removed that as well. The broken while event as well. Must've been left over from some testing I was doing.
B
56
S
15
G
10
Posts: 910
Reputation: 11,942

Post » Wed Jan 09, 2013 5:19 pm

[QUOTE=Auntie Val] @WhiteClaws
"Yeah ... There's not a lot of people on the forum these days , I struggle too :("
We all benefit from rich forum participation, everyone has something to teach as well as learn. But you dear Whiteclaws have probably ran off more visitors than we will ever know about. So think about your comment above, and think about some of the things you say, and ask yourself "would I like to be treated that way?" I doubt it.[/QUOTE]

@Auntie val You noticed too.
B
44
S
15
G
9
Posts: 1,096
Reputation: 11,013

Post » Wed Jan 09, 2013 5:38 pm

@Geometrix, no worries. I recognised the "stuck in a loop" grey box from stuff I was doing last night ;p
B
15
S
5
G
7
Posts: 877
Reputation: 5,650

Next

Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 12 guests