User Tag List

Results 1 to 8 of 8

Thread: Possible to pause game until sample finishes playing?

  1. #1
    Clicker Fusion 2.5Android Export Module

    Join Date
    Apr 2014
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Possible to pause game until sample finishes playing?

    I have a game where if a ball goes out of the screen it restarts immediately in another position. What I would like is that, when the ball exits the screen, it plays a sound sample and then restarts the ball but I don't know how to do this. Even just a brief pause between the ball exiting the screen and then restarting would be great.

    Where you have two or more actions taking place for one event (eg When ball exits bottom of screen then....play sample, reposition ball) are they carried out in sequence and if so can that sequence be edited so the events happen in a particular order, for example in the example above could you reorder the actions so the ball was repositioned before the sample plays, or insert an action to be carried out before the other actions?

    Dave

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    KLiK-iT's Avatar
    Join Date
    Sep 2011
    Location
    New Jersey
    Posts
    2,862
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    This is simple to do. You can use values or the timer. When the ball leaves the bottom of the screen stop the ball movement, but make sure the Y position of the ball is out of the screen totally. Then set global value "restart" to say 200 (only one action when event loops),..play sample. Next line if global value is great than 1 subtract one from global value. Next line global is equal to 1 reposition ball to wherever you want and continue to play the game.
    Using the timer: when the ball exits,..do the same thing as above to stop the ball movement, play sample and set the timer to fire event after 3 seconds,...call it restart. Then on the next line,.on timer event restart,..reposition ball to wherever you want and continue to play the game. You can adjust both these up or down to your liking, so they fire faster or slower.

  3. #3
    Clicker Fusion 2.5Android Export Module

    Join Date
    Apr 2014
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Couldn't figure out the timer, I mean I could start one but not name it "restart" or indeed name the timer at all, am a newb to Fusion 2.5, but did achieve what I wanted thanks to your advice about the global value although I couldn't give any variables a name either so left it as global value A.

    Thank you for the help, it solved the problem

    Dave

  4. #4
    Clickteam Clickteam
    Danny's Avatar
    Join Date
    Aug 2007
    Location
    United Kingdom
    Posts
    3,006
    Mentioned
    21 Post(s)
    Tagged
    2 Thread(s)
    misterm,

    Feel free to check out this section of the forum: http://community.clickteam.com/forums/352-Guides-Tutorials-Examples-Widgets

    Lots of useful guides, tutorials, widgets and examples to download to get you on your way!

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    KLiK-iT's Avatar
    Join Date
    Sep 2011
    Location
    New Jersey
    Posts
    2,862
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by misterm View Post
    Couldn't figure out the timer, I mean I could start one but not name it "restart" or indeed name the timer at all, am a newb to Fusion 2.5, but did achieve what I wanted thanks to your advice about the global value although I couldn't give any variables a name either so left it as global value A.

    Thank you for the help, it solved the problem

    Dave
    Hi Dave, If you click on an (active) object, the properties of that object will open in a window on the left hand side of the screen. There you'll see a button that has an AZ on it. Click that and you'll see "New" Click it and you can name alterable values whatever you want. For Global values click on the name of your game and a window will popup and you'll see the same button AZ. There you can change global value names. See picture.
    Images attachées Images attachées

  6. #6
    Clicker Fusion 2.5Android Export Module

    Join Date
    Apr 2014
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you Danny for the link, I will look at some more examples, and thank you KLik-iT for the replies, I didn't even realise, I have seen the AZ but saw it said new and didn't think it would change the name of an existing item so thanks for pointing it out, I feel kind of dumb not knowing all this but I am getting there. Thanks again

    Dave

  7. #7
    Clicker Fusion 2.5
    Warmachine's Avatar
    Join Date
    Nov 2009
    Location
    Charleston, WV
    Posts
    653
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    You could also try (i can't confirm, just throwing ideas out) setting an event like this:

    - ball leaves the play area on the bottom
    + Only one action when event loops

    : Play Sample "Pause" (or what have you)


    That should trigger the sound to play when it leaves. By setting the "only one action when event loops" in the event is so that the sample doesn't play infinitely, but just anytime that event occurs.


    To make it restart after the sample is done, try this:

    - ball is outside of the play area
    + Sample "Pause" is not playing
    +Only one action when event loops

    :Restart Frame

    If that doesnt work let me know and i'll make an example for you, hope it helps! Not to discredit anything that has been mentioned before, everyone has given great input as is!

  8. #8
    Clicker Fusion 2.5Android Export Module

    Join Date
    Apr 2014
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, sorry for delay in replying but been rewriting things and taken ideas on board. Very helpful, and appreciated

    Dave

Similar Threads

  1. Playing a music sample
    By TheGreatSolano in forum The Games Factory 2 - Technical Support
    Replies: 2
    Last Post: 21st June 2011, 11:17 AM
  2. Sample playing on every frame
    By Heclegar in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 8th January 2011, 12:02 PM
  3. Does not know when sample is not playing
    By OldManClayton in forum SWF/Flash Export Module Version 2.0
    Replies: 7
    Last Post: 19th March 2010, 07:49 AM
  4. Random Sample not playing
    By mussashimits in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 1st June 2007, 08:29 PM
  5. playing a Random Sample- possible?
    By mussashimits in forum The Games Factory 2 - Technical Support
    Replies: 12
    Last Post: 15th April 2007, 11:06 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •