User Tag List

Results 1 to 6 of 6

Thread: Changing Animations - when does it update?

  1. #1
    Clicker Multimedia Fusion 2

    Join Date
    Sep 2006
    Location
    Britain, South Coast
    Posts
    1,030
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Changing Animations - when does it update?

    I'm trying to extend Podunkian's idea for a detectorless movement, but I've run into a problem. Maybe someone here can help.

    I'm trying to make a platform enemy who tests the area in front of him to see if the player is there. He would normally use a detector object for this (i don't care if he can see through walls, lol), but I've tried this instead:

    The detector has been placed as an animation inside the bad guy, rather than a separate object. I've updated the hotspot accordingly.

    In the events, this happens:

    ALWAYS
    --- Set 'CAN SEE PLAYER' to "NO" //The default state
    --- Set Enemy animation to 'DETECTOR'

    Enemy is overlapping Player
    --- Set 'CAN SEE PLAYER' to "YES"

    ALWAYS
    --- Restore Enemy animation


    It SHOULD change his animation to the detector animation. That should overlap the player, setting his 'CAN SEE...' state to YES. Then it should be reverted back to the default animation before the frame is redrawn.

    But the 'CAN SEE' state is never changed. He never sees the player.

    Either:
    - I'm making a stupid mistake, or
    - The Set/Restore Animation actions are just a variable, and only get applied after all the events have been processed. Meaning you can't do a collision detection with them until the next event cycle.

    Which is it?

  2. #2
    Clicker Multimedia Fusion 2

    Join Date
    Sep 2006
    Location
    Britain, South Coast
    Posts
    1,030
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Changing Animations - when does it update?

    Got it. Silly mistake, lol

    Constantly switching the animation obviously loses the progress of the other animations, so all anims start and stay at frame 1. So I added a feature to record the current frame so that it can restore it after the test is done.

  3. #3
    Clicker Multimedia Fusion 2 DeveloperiOS Export Module

    Join Date
    Jun 2006
    Posts
    1,324
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Changing Animations - when does it update?

    Probably a case of grandmother, eggs etc - but do you have the same number of frames in each animation? MMF is a bit clever about changing animations if you do - go from walking to running and it matches the frames up for you so you don't break stride.

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCSWF Export Module
    Alonso's Avatar
    Join Date
    Jul 2006
    Posts
    681
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Changing Animations - when does it update?

    You can just do this by comparing x/y coordinates... Why all the hasssle?
    And don't change the direction of the object, but the direction of the animation (and as Sarah says, have all animations be the same number of frames).

  5. #5
    Clicker Multimedia Fusion 2

    Join Date
    Sep 2006
    Location
    Britain, South Coast
    Posts
    1,030
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Changing Animations - when does it update?

    I'm not convinced that comparing the X/Y coordinates preserves the object selection.

    I find this setup simpler to read in the events, not inefficient, and I know it'll work with object selection.

  6. #6
    Clicker Multimedia Fusion 2iOS Export Module

    Join Date
    Jun 2006
    Posts
    113
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Changing Animations - when does it update?

    It certainly doesn't; you are correct. It is also much more tiring to use coordinates for backgrounds too.

Similar Threads

  1. Need help for Animations
    By K_Tetsu in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 28th December 2010, 06:13 AM
  2. animations
    By Angelfox in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 25th January 2009, 03:33 AM
  3. Animations help please
    By dylan99379 in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 29th September 2007, 09:11 AM
  4. animations
    By will134 in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 6th January 2007, 09:22 PM
  5. Animations - Bug or just me?
    By the_raven in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 13th October 2006, 10:00 AM

Posting Permissions

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