Slow down platform max speed?

Get help using Construct 2

Post » Sun Feb 09, 2014 8:16 am

Hi,I am a beginner in C2 and this is an awesome game engine in my game i have few enemies.I have added platform behaviors to them and disabled the default controls. Enemies are moving fine on the platform. Now i want to slow down the enemy speed when i press some key. I added an event to set platform maximum speed to -50. But when that event raised all the enemies stop their movements. It will not slow down the enemy. Need help Thank you
B
4
Posts: 18
Reputation: 286

Post » Sun Feb 09, 2014 8:29 am

Create a Global variable "PlatmaxSpeed"
Use this to assign your max speed(s)in the event sheets
To slow down System => Subtract (50) from PlatMaxSpeed
To return System => Add (50) to PlatMaxSpeed


There are 10 types of people in the World, those that understand binary and those who don't.
B
7
S
2
Posts: 93
Reputation: 797

Post » Sun Feb 09, 2014 9:09 am

i have tried it.But it didn't work.It will stop the enemy movement.So i set initial state Disabled and added a global variable and set platform maximum speed to that variable when "On start of layout". But enemy is not moving. But when i set initial state enabled and run the game then enemy moves.
B
4
Posts: 18
Reputation: 286

Post » Sun Feb 09, 2014 1:53 pm

does anyone have an example?
B
4
Posts: 18
Reputation: 286

Post » Sun Feb 09, 2014 2:24 pm

I put this example together then re-read your question, so you actually might not need it to solve your problem. It contains 2 methods of how to limit the enemy max speed - one that uses a global variable and one that doesn't (there are probably others, like object variables, but the forum has plenty of other chat about this sort of thing):

capx

If you set enemy max speed to "Enemy.Platform.MaxSpeed - 50" then the platform max speed will reduce by 50 every tick. I think this is what caused your problem.Colludium2014-02-09 14:26:05
A big fan of JavaScript.
B
74
S
20
G
69
Posts: 2,205
Reputation: 43,832

Post » Sun Feb 09, 2014 2:56 pm

Thanks for the example.I have tried it more than two days.I was stuck there.That is why i asked for help I am going to download newest version of C2 to check your example....Thank you very much
B
4
Posts: 18
Reputation: 286

Post » Sun Feb 09, 2014 3:12 pm

@hardrockz,

I'll edit the capx so it works with r158 - no need for you to run a beta version if you don't want to. Give me 5 mins.

The great thing about C2 isn't just that it's the easiest editing environment I've come across, it's the community that really makes it great.
A big fan of JavaScript.
B
74
S
20
G
69
Posts: 2,205
Reputation: 43,832

Post » Sun Feb 09, 2014 3:47 pm

@Colludium
I have downloaded the beta version and your example works great Yes, I totally agree with you...The community of C2 is awesome. It gives great help to beginners like me..Thank you very very much
B
4
Posts: 18
Reputation: 286


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 6 guests