User Tag List

Results 1 to 9 of 9

Thread: Attaching multiple active objects

  1. #1
    No Products Registered

    Join Date
    May 2008
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Attaching multiple active objects

    Hi all,

    I'm developing an action RPG where the player character can equip different items into each hand (and this is reflected visually). Normally, you would combine two active objects by telling one to follow the others hotspot (so the animation would line up correctly).
    However since I need two equipped items to follow the animation of my player sprite, I'm not certain how to approach this.

    Is there any way to get a second hotspot for an active object?

    I know I could create whole other animations for the secondary items, and have them overlap the player sprite completely, but this is too costly.

    Thanks in advance for any assistance.

  2. #2
    Forum Moderator

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,773
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)

    Re: Attaching multiple active objects

    Maybe use a 2x2 active and set this to the hot spot of the character, then set your equipped item to the hot spot of your 2x2.
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  3. #3
    Clicker Install Creator Pro
    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)
    Darkhog's Avatar
    Join Date
    Jan 2009
    Location
    /dev/null
    Posts
    417
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)

    Re: Attaching multiple active objects

    Hey!
    And I have similar question. I know how to link objects when I have 1 instance of each object. I need it for something like "view range" for my platform game. I have multiple enemies and creating copies of it AND linked view range and programming each enemy X times even with copy-paste method instead of creating instances of these objects isn't good, right? Later I will give an example.
    And for artician's question, because I linked as a parasite to his topic, you should combine with adding, substracting pixels to/from your hotspot, e.g. Set x position of active 2 to XHotspot("active")+23

    //EDIT: nivram's method is too complicated.

  4. #4
    No Products Registered

    Join Date
    Feb 2009
    Posts
    52
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Attaching multiple active objects

    Try setting the hero's action point to be the other hand, and then set weapon 2's X to XActionPoint("Hero") and Y to YActionPoint("Hero").

    Also, if you're using the hot spot of the hero for weapon 1's position, and the hero has platform movement, you may run into bugs with regard to platform detection (at least this happened in MMF 1.x). There was a complicated workaround that we can dig up if you need it.

    Hope this helps!

  5. #5
    Clicker Fusion 2.5 DeveloperHTML5 Export ModuleSWF Export ModuleInstall Creator Pro
    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)

    Join Date
    Jul 2006
    Location
    USA
    Posts
    2,982
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: Attaching multiple active objects

    I'd be curious what the best way to do more than just weapons. Like say you want to have armor, head, chest, legs, etc.

    I guess you could make actives for each and combine them somehow? I'm not sure.

    In 3d games, you can do texture swapping for new armor and stuff. Not really sure how you'd achieve something similar in a 2d sprite game.

  6. #6
    No Products Registered

    Join Date
    May 2008
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Attaching multiple active objects

    All -
    Thanks! I will try the "set weapon 1 to hotspot. set weapon 2 to hotspot + XY offset" That sounds like it should work okay.

    Shawn -
    For armor: My characters are 96x128 pixels. I just made the armor/helmet/etc sprites fill up a 96x128 pixel area, so when I add them to my character they automatically line up. It's a bit more memory intensive, but the animation is smoother and it's very easy to implement.

    Thank you all again! If anyone has any other suggestions I'm all ears for other methods.

  7. #7
    No Products Registered

    Join Date
    Dec 2008
    Location
    U.S.
    Posts
    133
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Attaching multiple active objects

    You can use the action point. Set the weapons to 0,0 from the action point. But between the hotspot and action point, you can only equip two weapons.

  8. #8
    No Products Registered

    Join Date
    Feb 2009
    Posts
    52
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Attaching multiple active objects

    If you find you need to attach more than 2 objects to the hero, here is a complete tutorial.

    Happy coding!

  9. #9
    No Products Registered

    Join Date
    Mar 2007
    Location
    Sydney, Australia
    Posts
    1,369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Attaching multiple active objects

    why dont u test the 'sticky object' extension? I beleive this does what you want..

Similar Threads

  1. Attaching several objects to several objects?
    By Outcast in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 17th March 2012, 03:37 PM
  2. Attaching shadows to active objects
    By Cybert9 in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 22nd January 2012, 07:08 PM
  3. Active Objects in Multiple Frames Copied?
    By BeowulfKaine in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 23rd December 2009, 09:30 AM
  4. Multiple Angles in Active Objects?
    By Stephen in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 5th October 2008, 03:38 PM
  5. attaching objects
    By dub in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 6th December 2006, 11:02 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
  •