How do I add and substract movement speed?

Get help using Construct 2

Post » Sat Apr 19, 2014 11:34 am

No problem, I think we're all constantly learning how to do new stuff in Construct. :)

Okay, change the action to set text: int(player.platform.speed)

int rounds down the number in brackets
B
23
S
4
G
1
Posts: 71
Reputation: 8,346

Post » Sat Apr 19, 2014 11:40 am

awesome :) thank you
B
4
Posts: 12
Reputation: 224

Post » Sat Apr 19, 2014 12:23 pm

is there a way to make a time-based power-up, that gives bonus movement speed for just a few seconds? i'm trying to make it using timer behavior and instance variables but im stuck :( please help
B
4
Posts: 12
Reputation: 224

Post » Sat Apr 19, 2014 12:25 pm

Try this:
On power up used: set max speed to player.platform.maxspeed+50
wait X seconds
set max speed to player.platform.maxspeed-50
B
23
S
4
G
1
Posts: 71
Reputation: 8,346

Post » Sat Apr 19, 2014 12:32 pm

man, you rock :)
B
4
Posts: 12
Reputation: 224

Post » Sat Apr 19, 2014 12:43 pm

Ha, Thanks! If you just make loads of little games as practice (I have like 14) you tend to just pick things up as you go along :)

Oh yeah, and if ever you need any help and don't get an answer here feel free to PM. (I'm not often in this forum)
B
23
S
4
G
1
Posts: 71
Reputation: 8,346

Post » Sat Apr 19, 2014 1:02 pm

thanks mate. ofc i have more questions! how to make power-up that has a cooldown so you can use it every 20 seconds?
B
4
Posts: 12
Reputation: 224

Post » Sat Apr 19, 2014 1:28 pm

Okay, I'd use a variable here, I'll be using "CanUsePowerUp" which starts at 0
X is how long the power should be active

Events: On power up activated
CanUsePowerUp=0

Actions: Set CanUsePowerUp to 1
Set max speed to self.platform.maxspeed+50
Wait X Seconds
Set max speed to self.platform.maxspeed-50
Wait 20-X seconds
Set CanUsePowerUp to 0
B
23
S
4
G
1
Posts: 71
Reputation: 8,346

Previous

Return to How do I....?

Who is online

Users browsing this forum: JayH, newt and 6 guests