How to give this actions?

0 favourites
  • 8 posts
From the Asset Store
Alot of High Quality Items sound effects for your game!
  • I have an object called void that currently sucks other objects. Now when a button is pressed, The void must push the other objects when the objects come close to it. In other words the void must repel the other objects when pressing a button to the outside screen.

    Then when pressing another button, I want the void to suck objects faster and further than what it currently does. How do I do this?

  • That's simple:

    -if button pushed reverse.

    -if other button pushed increase suck.

    I don't know the events you use to make the void suck, so I can't give you any details. for now you will have to do with this simple explanation.

  • Ok i couldn't find the actions so here's the file. it will work on either of the links.

    2shared.com/file/FzTFm1vs/Space_Munch.html

    mediafire.com/download/bijjcdbqodi6xnc/Space_Munch.capx

  • The actions I said aren't actions.

    Like I said in my post it's only possible to reverse the sucking if you know how the sucking is done.

    The void isn't attracting the objects towards it, the objects are set to move toward the void.

    If you reverse this action you won't even see the objects anymore.

    You should make an event in which if the objects are near the void it starts attracting them.

    I see you haven't used any variables or extra conditions in any of your events. Have you followed enough tutorials to know how to make events?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You could start this way, by just using the bullet behaviour:

    system compare two values - distance(planet.x,planet.y,void.x,void.y) is less than 500

    Planet - set bullet angle - angle(planet.x,planet.y,void.x,void.y)

    Planet - set bullet speed - 200

    Planet - set bullet acceleration - 50

    From this event you can then build.

  • Ok so now how to make it so when a button is pressed, it pushes and the other pulls faster?

  • Try this , you'll need to work on it

    Test.capx

  • Umm...its not working because I have an older version of construct 2 instead. So could you like explain how to do it?

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