Slow down platform max speed?

0 favourites
  • 8 posts
From the Asset Store
Support AdType ( AppOpenAd, Banner Ad, Interstitial Ad Rewarded Ad, MREC Ad) support c3 build service
  • Hi,I am a beginner in C2 and this is an awesome game engine <img src="smileys/smiley1.gif" border="0" align="middle" /> <img src="smileys/smiley1.gif" border="0" align="middle" /> 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 <img src="smileys/smiley1.gif" border="0" align="middle" /> <img src="smileys/smiley1.gif" border="0" align="middle" /> Thank you

  • 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

  • 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. <img src="smileys/smiley5.gif" border="0" align="middle" /> <img src="smileys/smiley5.gif" border="0" align="middle" />

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • does anyone have an example? <img src="smileys/smiley1.gif" border="0" align="middle" /> <img src="smileys/smiley1.gif" border="0" align="middle" />

  • 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.

  • Thanks for the example.I have tried it more than two days.I was stuck there.That is why i asked for help <img src="smileys/smiley1.gif" border="0" align="middle" /> I am going to download newest version of C2 to check your example....Thank you very much <img src="smileys/smiley1.gif" border="0" align="middle" /> <img src="smileys/smiley1.gif" border="0" align="middle" />

  • 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.

  • Colludium

    I have downloaded the beta version and your example works great <img src="smileys/smiley1.gif" border="0" align="middle" /> <img src="smileys/smiley1.gif" border="0" align="middle" /> 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 <img src="smileys/smiley1.gif" border="0" align="middle" /> <img src="smileys/smiley1.gif" border="0" align="middle" />

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)