have a condition after an action

0 favourites
  • 5 posts
From the Asset Store
Alot of High Quality Items sound effects for your game!
  • For example I'd like to do a script like this

    CONDITION: 'Pizza1' on collision with 'flooor'

    ACTION: Wait 5 seconds

    CONDITION: Pizza1 on collision with floor (check if it's been touching the floor for 5 seconds, 5 second rule ya know!)

    ACTION: make 'Game_Over' visible!

    Can I do this in one chain of scripting blocks without using variables?

  • hmm why you don't use variable?? with variable it would be easy...

    anyway i think this work :

    condition 2:pizza1 collision with floor

               -> time >= 5 seconds        : make game_over visible

               -> time < 5 seconds        : make game_over unvisible

  • All "wait" does is pause the system for a given period of time and then go to the next action, whatever it is. Obviously, you want the player to be able to take action, removing the pizza from the floor before the five seconds is up. I think each pizza instance needs an instance variable that increments by one for every second that the instance is touching the floor, and when that variable hits 5 for any pizza instance, the game is over. If the player removes the pizza instance from the floor, the instance variable needs to be reset to zero for that instance. The "wait" action is not needed.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think the OP wants to use sub-events. You can add a whole other event with conditions and actions that runs after the previous event's actions.

  • Thank you Ashley! Perfect!!!! This is a huge breakthrough for me

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