User Tag List

Results 1 to 6 of 6

Thread: How can I make a random event?

  1. #1
    No Products Registered

    Join Date
    Dec 2015
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How can I make a random event?

    So I'm wanting to make a platform game where if you hit the enemy it says one of a few different phrases at random. I have the event where the enemy goes down, and I can handle sound samples, but how can I get it to play only one sound clip at random?

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCHTML5 Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    chrilley's Avatar
    Join Date
    Jul 2006
    Posts
    1,013
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    You could randomize a value and when the value becomes a certain number you play the sound you want. Ex:

    - <the hit condition that you normally use here>
    + Set Alterable Value A ("Active") to Random(100)

    - Alterable Value A ("Active") = 1
    + Play sample "Hit 1.wav"
    + Set Alterable Value A ("Active") to 0

    - Alterable Value A ("Active") = 2
    + Play sample "Hit 2.wav"
    + Set Alterable Value A ("Active") to 0

    The Active object can be the enemy or just a separate object that you can use to handle playing sound effects.

  3. #3
    No Products Registered

    Join Date
    Dec 2015
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So I followed your example, although whenever the action is triggered, all of the sounds play at once. Is there a way to fix this?

  4. #4
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    2,560
    Mentioned
    133 Post(s)
    Tagged
    0 Thread(s)
    Add: limit conditions>only one action when event loops

  5. #5
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCHTML5 Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    chrilley's Avatar
    Join Date
    Jul 2006
    Posts
    1,013
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    Yeah, what Volnaiskra said.

    It's rather hard to tell what is going wrong without seeing the .mfa but a random guess is that your event that randomizes the value runs more than once.

  6. #6
    No Products Registered

    Join Date
    Dec 2015
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you guys! This will help me make my game closer to the original vision.

Similar Threads

  1. Create Object causes random event behavior
    By wiggy in forum Fusion 2.5
    Replies: 4
    Last Post: 13th December 2015, 07:19 AM
  2. Set a group change by a random time event?
    By Zallred in forum Fusion 2.5
    Replies: 1
    Last Post: 11th December 2014, 07:17 AM
  3. Replies: 2
    Last Post: 23rd January 2014, 08:22 PM
  4. Make Random Pool not-so-random?
    By UltraHammer in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 4th April 2013, 02:53 PM
  5. Random crashes at Event List Editor
    By Karzon in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 7th May 2008, 09:33 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
  •