User Tag List

Results 1 to 7 of 7

Thread: help! Sound file activation problem amongst others

  1. #1
    No Products Registered

    Join Date
    Jan 2009
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    help! Sound file activation problem amongst others

    Hey there, am deeply burrowing into Games Factory and absolutely loving it, however there are a couple of problems which I can't seem to get over.

    For this thread it is just a sound issue.

    Basically I have a sample I'd like to play when walking (footseteps) and having evolved the project using David Newton's truly excellent platform tutorial I have this clause...

    repeat while [joystick] moved left
    -play sample [FOOTSTEPS.wav]


    which is playing the sample (of one and a half seconds) but continually starting and playing each iteration one ontop of the other it so it builds up to a cacophany.

    Basically I'm trying to find a way where moving the character begins the sample but wont play it again until it's finished the sample so that it is a continuous loop.

    I've tried 'play and loop sample' but the same thing happens (if not more!).

    I have also tried to put in a negated clause but that mucks the whole thing up.

    Any help would be very much appreciated. I apologies if this is a real noobie question too, I've RTM a fair bit but can't find the answer!


    Very grateful for finding this forum and many many thanks in advance!

    Jim

  2. #2
    Clickteam Clickteam
    Jeff's Avatar
    Join Date
    Jun 2006
    Location
    Battle Ground Washington
    Posts
    11,825
    Mentioned
    8 Post(s)
    Tagged
    2 Thread(s)

    Re: help! Sound file activation problem amongst others

    I once made a bad Donkey Kong clone and used this event

    [NEGATE] mario is stopped
    + every .25 seconds

    Play sample walk.wav

    walk.wav was a .25 second sample of walking.


    In your example above
    adding a third condition to check if the sample is already playing might fix it.

  3. #3
    No Products Registered

    Join Date
    Jan 2009
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: help! Sound file activation problem amongst others

    Thank you!

    Aaaah, interesting, I see where you're coming from.

    I've just put this in there to a certain degree of success. The activation thing works really nicely (the {NEGATE} mario is stopped) although because the footstep loop is a second or so long (and so it's checking + every 1.36 secs) there is a lull before it kicks in. Ideally the effect I'm after is like 'Juni' in Knytt Stories where it's an immediate and clear footstep.

    However it's definitely the closest I've got, thank you!!!

    Even adding the 'check if sample is playing' clause (either in the example I gave as part of a seperate clause) doesn't quite work (same continual playing of loop over and overitself).

    It seems like it should be a common thing, i.e. simply to press (and hold down) a button and the single sound file plays until it's finished. For instance even in a racing game and the engine sound. Might go and find an example that somebody has done with sound like this...



    hmmm!

  4. #4
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: help! Sound file activation problem amongst others

    Hi jim,

    It sounds like "Player is holding left" combined with "Sample 'walking' is not playing" (that is, create a "Sample 'walking' is playing" event and then negate it by right-clicking on it) should work to achieve a loop effect...

    I think that Knytt Stories might do it by having a sound file that's just a single footstep, and playing this when the player's animation frame is at certain points (Animation > Frame number is equal to... under the conditions for an active object).

    Oh, and thanks for the kind words about the tutorial

  5. #5
    No Products Registered

    Join Date
    Jan 2009
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: help! Sound file activation problem amongst others

    Aha... I'm slowly getting there. And hey David!

    Firstly, with a combination of both of your advice and some experimenting I've got to a stage where it works a bit. As I said this is from David's tutorial so if anyone's found this post with a similar problem that's my starting piont. So...



    Horiz <> 0 (Horizontal value of player)
    + 'detector' overlapping a backdrop (so only when player is on the ground)
    + sample 'walking' is not playing

    then

    play sample 'walking' in specific channel (channel 21 if that makes any difference)



    ...And it works in that it's not doubling up the sound although it's a tiny bit 'staggered' and not a true loop. Still it's an absolute improvement on before.

    David, that's really interesting information on Knytt's process, I didn't realise that your could use specific frames. VERY interesting!!!! Athough unfortunately it was still slightly doubling up the footfalls even with the 'check if sample not playing'.

    Thanks so much for both your help though!

    I will most certainly be posting about a couple of other intriguing problems very soon!!!


  6. #6
    No Products Registered

    Join Date
    Jan 2009
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: help! Sound file activation problem amongst others

    Oh, just a quick thing David,

    you mentioned

    ""Sample 'walking' is not playing" (that is, create a "Sample 'walking' is playing" event and then negate it by right-clicking on it)"

    For some reason in my GF2 the only events that are available in the 'sound' menu are all negatives to start with i.e. 'sample "xxx" is not playing'. Or are you referring to another event list?

    I only ask as I thought it a bit odd that the availability of sound events was like that.

  7. #7
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: help! Sound file activation problem amongst others

    That sounds like the one I meant - I don't have it in front of me just now, and I can never remember exactly how each event's written!

Similar Threads

  1. Sound file include into EXE
    By ASD in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 26th August 2011, 04:31 PM
  2. Play Sound from file
    By takki in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 10th April 2011, 10:14 AM
  3. .ogg sound file lag
    By pikzilla in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 4th May 2010, 03:22 AM
  4. Sound file as binary file
    By ASD in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 22nd March 2010, 09:56 PM
  5. How do you get a MIDI sound file?
    By evilpantsmaster in forum The Games Factory 2 - Technical Support
    Replies: 4
    Last Post: 25th February 2008, 10:51 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
  •