User Tag List

Results 1 to 10 of 10

Thread: Create object _____

  1. #1
    No Products Registered

    Join Date
    Dec 2010
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Create object _____

    I was wondering if there was a way to create an object based on a variable, such as the text in a box or something. So basically what I'm trying to get at here is "Create object Alterable String A".

  2. #2
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    Re: Create object _____

    Sure. Just have a condition that says: If text = "blah", then create object A. Are you needing something more complex than that?

  3. #3
    No Products Registered

    Join Date
    Dec 2010
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Create object _____

    I really am surprised you said that.
    You didn't answer my question. I already thought of that, and it will require me to create another event for every item I want created based on a string.

  4. #4
    No Products Registered

    Join Date
    Aug 2007
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Create object _____

    You want to create an object whose name is stored in an alterable string, so that the same event can create different objects depending on what is stored in the variable. I can't find a way to do it as the "create object" action cannot be used in an expression.

  5. #5
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    Re: Create object _____

    Sorry, I guess I wasn't understanding what you wanted to do exactly. You would indeed need to create a new event per object.

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module

    Join Date
    Jun 2006
    Location
    St. Ave France
    Posts
    1,166
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Create object _____

    Depending on the complexity of what you need you could use only one object, but with animations who's names match your string!

    as in:

    Create the active object. (NOT visible at start)
    Set its animation to match the string
    Make visible.

    You can also set it to diferent movements while creating it, also matching the string.

    I've not tried it, but this should work.

    Then you just program the one active to act diferently depending on which animation it's playing etc.

  7. #7
    Clicker Multimedia Fusion 2 DeveloperiOS Export Module
    Nifflas's Avatar
    Join Date
    Jul 2006
    Posts
    2,613
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Create object _____

    VAH: To just be clear about it, you can not pick which object to create from an expression - which indeed is a major problem. This is why people suggest workarounds.

    I usually try to make complicated objects that can serve as many different purposes as possible. In Saira, every background object is an instance of the same animated picture object, that have different graphics a different set of parameters to control how it moves. However, again, workarounds is all I can suggest until MMF gets the feature to pick objects to create from expressions.

  8. #8
    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: Create object _____

    Quote Originally Posted by HolyMonkey
    Depending on the complexity of what you need you could use only one object, but with animations who's names match your string!

    as in:

    Create the active object. (NOT visible at start)
    Set its animation to match the string
    Make visible.

    You can also set it to diferent movements while creating it, also matching the string.

    I've not tried it, but this should work.

    Then you just program the one active to act diferently depending on which animation it's playing etc.
    This is actually what I'm doing with my current game. I have a bunch of different yet similar objects that get generated and I just have it create the one object and then there's a variable that determines what animation/direction to set the object to. Works a charm.

  9. #9
    No Products Registered

    Join Date
    Dec 2010
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Create object _____

    I appreciate all of your comments, although I don't need any other answers or "work-arounds". The complexity of what I need to create will be impossible to use with a single active object, so I guess I will just have to make a compromise. Thanks to everyone for posting.

  10. #10
    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: Create object _____

    How complex are we talking here? Do you have hundreds of unique objects that need to be created?

    I mean, because other than that, it would merely be adding 1 create event for each type of object... which isn't horrible. If you don't like the idea of seeing fifty create events, just group them and minimize the group. =P

    But I really don't see even having 200 "if variable = this" events would cause any major problems. The program should fly through those events in a heartbeat since it's only going to match 1 or none of the values per loop.

Similar Threads

  1. Launch or Create Object actually creates two of the object, not just one.
    By LemonyLime in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 30th June 2017, 09:46 PM
  2. [BUG] Create object if flag is off, and assign something to the created object
    By Popcorn in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 24th January 2013, 11:01 PM
  3. Create Object + Object Selection Revisited
    By Crash86 in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 22nd February 2011, 04:33 PM
  4. Group._____ objects don't have new anims?
    By N64Mario in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 12th January 2009, 01:49 AM
  5. Create object at same position of object destroyed
    By The Thinker in forum Multimedia Fusion 2 - Technical Support
    Replies: 12
    Last Post: 6th November 2006, 12:16 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
  •