Any ways to set an action for Wait a certain time?

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • ------------------------------------- EN FRANCAIS:

    Ok, j'explique mon souhait, actuellement j'écris une simple application dans MMF2 qui est basée sur une action chronométrée quand une image est prise par l'objet de l'extension Surface qui la sauvegardera alors.

    Je veux que MMF2 fasse une pause (PAS vraiment une pause, mais une fausse-pause) avant l'action de SAUVEGARDE. (et dans la même condition).

    Donc, je veux que MMF2 attende disons.. 10 secondes

    Imaginez ce comportement:

    + Quand l'Objet est Cliqué
    - MET EN PAUSE L'APPLICATION POUR 10 SECONDES <---- c'est là que je ne peux pas faire en sorte que les choses fonctionnent sans geler toutes les animations des objets actifs.
    - SURFACE SAUVEGARDE L'IMAGE (capture de zone).

    Merci!


    ------------------------------------- IN ENGLISH:

    Ok, I explain my wish, actually I wrote in MMF2 a simple application which is time action related when a picture taken by the Surface object is saved.

    I want MMF2 take a pause (NOT really a pause, but a fake-pause) before the SAVING action. (in same conditions).

    So, I want MMF2 wait for a ... 10 seconds

    Imagine that behavior:

    + When Object is Clicked
    - PAUSE THE APP FOR 10 SECONDS <---- it's here I can't do the things work without freeze all active objets which is animated.
    - SURFACE SAVE THE PICTURE (zone-based)

    Thanks!

    Hey I'm French, Hi!

    MMF2 SoundScape Engine (Moteur d'environnement) :
    FR: Please login to see this link.
    EN: Please login to see this link.

    May the .NET be with you (Star Wars .NET©)

  • Not sure what your layout look like, but:

    Put everything in a group, ( ill call it 'runtime' ) and create an empty group (ill call it 'resume')

    'Inside Runtime'
    + When Object is Clicked
    - Set timer to 0
    - Activate 'Resume'
    - Deactive 'Runtime'

    'Inside Resume'
    + If timer equals 10
    - SURFACE SAVE THE PICTURE (zone-based)
    - Activate Runtime
    - Deactivate Resume

  • Interesting way HadHaw, thanks ;) I will perhaps use your trick!

    Zem: what is it ? An extension ? Where I can find it? Thanks too :)

    Hey I'm French, Hi!

    MMF2 SoundScape Engine (Moteur d'environnement) :
    FR: Please login to see this link.
    EN: Please login to see this link.

    May the .NET be with you (Star Wars .NET©)

  • Hi BackStaged i'm at work so i can't check at the moment but i think its part of the object that you create fastloops from, i think it is actualy called "restrict actions..." and is on the menu with other functions such as 'repeat x times', 'only one action when event loops' and another function i can't remember right now.

    Hope this helps :)

  • If you're wanting to basically pause your app, the best available method is the group enable/disable method as describe above. Just remember that this doesn't disable animations, looping sounds, or movements.

    You'll need to also stop the animations, sounds and movements separately.

    Please login to see this link.

    My examples:
    Please login to see this link.
    Please login to see this link.
    Please login to see this link.

  • Zem: Hey, thanks for the tips, I now managed to make a true fonctionnal method like yours!


    I manage to make a functionnal method like that one given by Zem: It is the use of an extension named Function EggTimer, which permit delayed event !
    Greatly working like that!

    500 event loops is: 10 seconds (BECAUSE my APP run at 50 Frame Per Seconds, and in Function EggTimer, a stack of FPS is 1 second in reality).


    Workflow like that:


    + When Object is Clicked
    - *** My events here...
    - Call "waitSaving" after 500 event loops


    and in an another Condition-based event

    + On function "waitSaving"
    - SURFACE SAVE THE PICTURE (zone-based)

    Hey I'm French, Hi!

    MMF2 SoundScape Engine (Moteur d'environnement) :
    FR: Please login to see this link.
    EN: Please login to see this link.

    May the .NET be with you (Star Wars .NET©)

  • Oh... well heck, you don't need to have an extension for that.

    Just do

    + Some value < 500
    - Add 1 to some Value

    + Value = 500
    - do actions

    Please login to see this link.

    My examples:
    Please login to see this link.
    Please login to see this link.
    Please login to see this link.

  • Hmm, interesting way aswell, perhaps change my mind about my method, so.. If it is so easy as hell, why MMF2 don't have a Built-In action like that ^^ ? Thanks :)

    Hey I'm French, Hi!

    MMF2 SoundScape Engine (Moteur d'environnement) :
    FR: Please login to see this link.
    EN: Please login to see this link.

    May the .NET be with you (Star Wars .NET©)

  • Hmm, interesting way aswell, perhaps change my mind about my method, so.. If it is so easy as hell, why MMF2 don't have a Built-In action like that ^^ ? Thanks :)

    it does under the Special object ^^, that is the object i was referring to earlier

    Please login to see this attachment. which then leads to Please login to see this attachment.

    Edited 2 times, last by Zem (June 12, 2013 at 9:00 PM).

  • Ah yes Zem, but it is not an Action, it is a Condition finally, it's always same problem: Unable to make a pause (which not freeze the app) as an action line :/
    Actually only methods with Function EggTimer extension's object do the trick (perhaps the solution of Konidias too)

    Hey I'm French, Hi!

    MMF2 SoundScape Engine (Moteur d'environnement) :
    FR: Please login to see this link.
    EN: Please login to see this link.

    May the .NET be with you (Star Wars .NET©)

  • Yeah my method works fine and it's the typical solution in game programming to just have a value count up or down per game tick and then just check that value at a certain point. Essentially it's:

    1. Value starts at 0
    2. Set a flag
    3. If flag is set and Value is less than some number, add 1 to value.
    4. If flag is set and Value reaches certain number, do action, turn off flag that was set and then set Value back to 0. Now you're back at step 1.

    Please login to see this link.

    My examples:
    Please login to see this link.
    Please login to see this link.
    Please login to see this link.

  • Yes Konidias, agree totally ;)

    Hey I'm French, Hi!

    MMF2 SoundScape Engine (Moteur d'environnement) :
    FR: Please login to see this link.
    EN: Please login to see this link.

    May the .NET be with you (Star Wars .NET©)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!