User Tag List

Results 1 to 9 of 9

Thread: Random Animation Issue

  1. #1
    Clicker

    Fusion 2.5 DeveloperFusion 2.5 DeveloperFusion 2.5+ DLCiOS Export ModuleSWF Export Module
    xhedgehogx's Avatar
    Join Date
    Nov 2007
    Location
    NY, USA
    Posts
    743
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Random Animation Issue

    The way I have common enemies in my game is they are all just one object, each 'flavor' of the enemy has a different animation specifying what it is.


    This image could probably demonstrate what I just said a little better. Each one of those nine things on the right side is actually one object.

    I have an event so, when they're created, along with being randomly placed on the Y axis off the screen, they're randomly assigned a number 1-9 - which will be the VirusType (alt value). If the random number event happens to land on 0, it will choose a different number. For example, that number is 4, it will change the animation to that star guy in the middle, and have events specific to this character. Should the number happen to be 0 anyway, it becomes this MissingNO creature (Yes, I took that name from classic PokÚmon, because that's exactly what it reminds me of). Doing some trial & error, I don't think this is where the problem is stemming from.

    Rather, I think it might be a problem in the animations. How I have the animation event set up is:
    VirusType (an alt value)=4;Only one action while event loops > Change Animation Sequence to 'Star'
    ^ This is the same for 1-9.
    As I mentioned before, if it equals 0, it'll just be thrown back into that random pool.

    Two of these characters have specific traits so far - to differentiate from the rest. One of them charges at the player when attacked. The other one launches an object (supposed to be directly at another enemy, right now it's only down), once they're hit, they'll go charge at the player.

    So MissingNO, when it appears, it's just a pink ball. I've noticed that randomly it does have the two specific traits I've listed above. Which has me thinking that it still is being randomly assigned that number. So I guess my problem is... Why isn't the animation changing like it is supposed to? Each animation in the object's animation list is set to loop. I even tried events like, when animation stopped (the pink ball) is playing, that it would either be destroyed or back into the random pool.

    Here's a video showing what is happening.

    ---

    Before I set it to 1-9, it was 0-8. 0 was the water guy. The same thing was happening, there was a lot of "water" guys appearing on the frame. Thinking it would have been a little easier to troubleshoot like this. This bug was actually in my first CyberPigeon game too, but MissingNO was the standard enemy (you'd notice a lot more of them than any other type), but with every enemy acting pretty much the same, it really didn't matter. I'm more than happy to send the .mfa to anyone if you want to look at it. Just excuse some of the sloppy code.

    But, if anyone can explain why the animation is defaulting back to the... Default animation, or if there is a work around of sorts, that'd be great. Thanks for the help.
    Brian

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleMac Export ModuleUnicode Add-on
    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)
    AyreGuitar's Avatar
    Join Date
    Jan 2011
    Location
    Wales, UK
    Posts
    1,113
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not sure, but I've always found the standard animations (Stopped, Walking, Appearing, Disappearing, etc) have special behaviours that it will change to automatically. So I always avoid them and start with the custom animations (from animation 12 or 13 onwards). I usually forget to loop the animation, but you say you've done that.

  3. #3
    Clicker

    Fusion 2.5 DeveloperFusion 2.5 DeveloperFusion 2.5+ DLCiOS Export ModuleSWF Export Module
    xhedgehogx's Avatar
    Join Date
    Nov 2007
    Location
    NY, USA
    Posts
    743
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh yeah, I guess I forgot to mention it in my original post. Well I kinda did with that default animation sentence at the end, but it was pretty subtle.

    I did completely remove the stopped animation. So it defaulted to the fire guy. The same exact issue was happening, but it was the fire guy rather than the pink ball. I thought the exact thing, maybe the animation thought the sinewave movement was it being stopped?

  4. #4
    Clicker

    Fusion 2.5 DeveloperFusion 2.5 DeveloperFusion 2.5+ DLCiOS Export ModuleSWF Export Module
    xhedgehogx's Avatar
    Join Date
    Nov 2007
    Location
    NY, USA
    Posts
    743
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I changed only one action when event loops into repeat 3 times. In case maybe it just missed the event for whatever reason. There is a lot going on at once anyway. Had no effect.

    In the end, if there is no way to fix this issue. I might just make a new bad guy that has the powers of everyone else or something.

  5. #5
    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)
    I'll take a look at the mfa if you'd like me to. I don't think I can help just going by the description provided.

  6. #6
    Clicker

    Fusion 2.5 DeveloperFusion 2.5 DeveloperFusion 2.5+ DLCiOS Export ModuleSWF Export Module
    xhedgehogx's Avatar
    Join Date
    Nov 2007
    Location
    NY, USA
    Posts
    743
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sure, I'll DM you. Thank you.

  7. #7
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is how i think you have the Events set up:

    FOR ZERO

    Only one action while event loops
    + VirusType = 0
    --> VirusType = random( 10 )

    FOR ALL NUMBERS EXCEPT ZERO

    Only one action while event loops
    + VirusType = 4
    --> Change Animation Sequence to 'Star'

    ans so on

    ...
    This is what i think is happening:

    Only one action while event loops
    + VirusType = 0
    --> VirusType = random( 10 )

    Lets say the number becomes 0
    You would expect it to choose a new random number because of the Event above
    But because you have 'Only one action while event loops' the Event only runs the first time and the Animation is set to the default ( first available one in the animation list )

    You can fix this by removing 'Only one action while event loops' from the Event above
    Hope this helps

  8. #8
    Clicker

    Fusion 2.5 DeveloperFusion 2.5 DeveloperFusion 2.5+ DLCiOS Export ModuleSWF Export Module
    xhedgehogx's Avatar
    Join Date
    Nov 2007
    Location
    NY, USA
    Posts
    743
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It was set up a little bit differently, but you were pretty close. Konidias was kind of enough to help me out and fix my errors (which I'm very grateful for!). One major thing that probably fixed it, was he eliminated the zero from the random number pool. So it was only 1-9. Kept it in the same event as the enemy spawning and animation changing. Which, I had probably 11 different events for, for each character.

    I have a habit of being pretty messy with my code. I'm trying to get better at it. Konidias really taught me a few things that I'm definitely going to hold on to for future projects and so on.

    But, I do see what you're saying King_Cool, that only one action while event loops seems to be trickier than it should be sometimes I guess the reason I used it was so it didn't keep updating the animation, for when it is actually animated. I think it stays right on the first frame, plus using a lot more resources. I could be wrong though.

  9. #9
    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)
    Glad I could help. Message me any time if you get stuck with anything.

Similar Threads

  1. Random Animation not working?
    By XStar in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 30th May 2017, 01:46 PM
  2. String Tokenizer and Random Pool issue
    By ratty in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 14th March 2013, 09:59 PM
  3. A very random issue...
    By sumgai in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 14th July 2012, 05:03 AM
  4. Objects in multimediafusion 2 random spawn issue
    By Krippa in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 15th March 2010, 01:55 PM
  5. Playing Random Animation
    By mussashimits in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 19th July 2007, 10:00 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
  •