User Tag List

Results 1 to 5 of 5

Thread: Creating a temporary event

  1. #1
    No Products Registered

    Join Date
    Feb 2011
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Creating a temporary event

    So I'm making a soccer game. When the ball hits a streaker, I want the player avatar, the keeper, to become twice his sice (changing animation). Now this is easy. But I want it to last for, say, 5 seconds.

    I can do something like, when he ball collides with streaker, change animation, and then using a timer, every 5 seconds, change animation back. But this way, he may be big for 1 second, mabye 5.

    Isn't there a way to make a temprary event?

    Thanks!

  2. #2
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export Module
    Konidias's Avatar
    Join Date
    Aug 2009
    Posts
    1,546
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Re: Creating a temporary event

    Don't use a timer. Just use an alterable value. Set the value high when you change the animation, and then have an event subtract 1 from the value every time it's greater than zero.

    When the timer hits zero, set the animation back to normal size.

    So if you're running at 50 fps, you could most likely set the alterable value to 250 and then have it subtract 1 every game loop. (subtracts 50 from the value every second)

  3. #3
    No Products Registered

    Join Date
    Feb 2011
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Creating a temporary event

    Fantastic, almost works now. However, it seems he won't grow small again!

    This is how it looks (i'm indeed at 50fps):

    Collision ball/streaker = set gloabl value B to 50, change avatar's animation to crouching
    Global value B > 0 = substract 10 from global value B
    Global value B equal 0 = change avatar's animation to standing

    However, he's still not getting small, just staying big it seems!

  4. #4
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export Module
    Konidias's Avatar
    Join Date
    Aug 2009
    Posts
    1,546
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Re: Creating a temporary event

    Should probably do <= for the last event, just in case it's subtracting to -10 or something.

    So:

    Global value B <= 0
    - change avatar's animation to standing

  5. #5
    No Products Registered

    Join Date
    Feb 2011
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Creating a temporary event

    Cool, i'll try that later tonight.

Similar Threads

  1. Creating Event - If Active is in window/screen?
    By WhatPixelYouOn in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 15th March 2013, 01:16 PM
  2. Problem creating event for the DialogBox object...
    By RGBreality in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 2nd September 2011, 11:58 PM
  3. [Bug]Creating object and changing it in same event
    By LB in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 2nd June 2009, 12:45 AM
  4. Temporary Pause?
    By N64Mario in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 6th December 2008, 03:53 AM
  5. creating a temporary dash for the player character
    By dfyb in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 6th May 2008, 06:31 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
  •