How do I prevent ButtonSelect from creating more of itself? I only need 1

0 favourites
  • 5 posts
From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
  • You need to add a trigger once or a variable:

    Example

    Cursor is over "NewGameButton":
    -------Subevent: Trigger once -------------Action: Create Button
    Else: ---------------------------------------Action: Destroy Button
    
  • tarek2 you're the best

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • How do I do this for multiple buttons? When I try the same events with another button, it only appears for one frame?

  • How do I do this for multiple buttons? When I try the same events with another button, it only appears for one frame?

    The trigger once will only work well with just one object.

    You will need to use instead a variable to make it work for each object individually.

    The questions here to solve are:

    1-If you have multiple objects and you stop overlapping just one of them what happens? are you destroying all the buttons? because you are still overlapping the other one.

    2-If each "NewGameButton" spawns a "ButtonSelect" and has to be linked to that specific button so only he can destroy it, then you will need something to link them like a variable or Hierarchy so when you need to destroy it you can easily pick the right one.

    If you give a bit more info of what is your goal it will be easier to give you the correct answer.

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