User Tag List

Results 1 to 8 of 8

Thread: Creating an Object via Input

  1. #1
    Clicker Multimedia Fusion 2SWF Export Module

    Join Date
    Sep 2006
    Posts
    1,544
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Creating an Object via Input

    Is there any way to have a create object even that creates a object of type "X".

    Say I had 10 different kinds of active objects, "Active1", "Active2", "Active3", etc. Is there any way I could have an event such as:


    Value A > 0:
    Create Object of type ("Active" + str$(Value A)) at (0,0)


    I mean is there any extension that could do that, or something like that? Because right now, I'd have to go through and hardcode every single object into the game with a different event for creating each one, something extremely arduous.

  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: Creating an Object via Input

    I think you are going to find it arduous, but you could have a setup where you create a object_spawner object and immediately set an alterable variable that defines the type of object. Then on your create action, run a fastloop that check for the object type and creates the correct object at the position of the spawner. Then delete the spawner.

    In your fastloop, you will need to have a list of conditions like this:

    +If object type (object spawner) = 1
    - Create Object A at Pos(object spawner)

    +If object type (object spawner) = 2
    - Create Object B at Pos(object spawner)

    Etc...

    But you can copy paste alot, so it shouldn't be too arduous.

    Mobichan

  3. #3
    Clicker Multimedia Fusion 2SWF Export Module

    Join Date
    Sep 2006
    Posts
    1,544
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: Creating an Object via Input

    Yes that why I can do, but its still an arduous way to do it. It seems like it would be simple to have an extension that could create an object from a line of text, since each object has a unique ID

  4. #4
    Clicker Multimedia Fusion 2SWF Export Module
    Jacob's Avatar
    Join Date
    Jul 2007
    Location
    Second pixel to the right
    Posts
    3,208
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Creating an Object via Input

    Maybe compare by fixed value?

  5. #5
    Clicker Multimedia Fusion 2SWF Export Module

    Join Date
    Sep 2006
    Posts
    1,544
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: Creating an Object via Input

    It would be an incredibly nice feature or extension. I can't be the only one who needs this

  6. #6
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Creating an Object via Input

    I need this too, and it would also be nice to be able to retreive data from an object and it's name be and expression.
    Working as fast as I can on Fusion 3

  7. #7
    Clicker Multimedia Fusion 2SWF Export Module

    Join Date
    Sep 2006
    Posts
    1,544
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: Creating an Object via Input

    Well heres my thing. My games editor saves all 'objects' to the same file for the level, and then its supposed to iterate through the list of objects and create them in the game with those values.

    But I could do this in a single line of code inside the loop. But if I have maybe 150+ object types, then it would require 150 different lines of code.

    And then if I had a level with maybe 400+ objects, running the creation code would make the level process 400 * 150 loop lines at a minimum, because MMF2 will read *all* loop code when executing a fast loop. And 60000 lines of code runs a lot slower than 400 lines of code.

    If I could create my objects all from the same event, it would take O(N) time instead of O(N^2). Its not fun to make a player wait 5 seconds every time he leaves/enters an area.

  8. #8
    Clicker Multimedia Fusion 2SWF Export Module

    Join Date
    Sep 2006
    Posts
    1,544
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: Creating an Object via Input

    I'm looking around and it looks like theres absolutely no feature or extension

Similar Threads

  1. Keyboard input vs player control input
    By ASD in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 22nd August 2013, 09:00 PM
  2. input object
    By videogiochi in forum SWF/Flash Export Module Version 2.0
    Replies: 3
    Last Post: 28th June 2011, 05:57 PM
  3. Input Object Bugs
    By MechatheSlag in forum Extension Development
    Replies: 3
    Last Post: 27th May 2009, 06:10 PM
  4. Input Object Problem
    By droberson in forum Extension Development
    Replies: 0
    Last Post: 6th August 2008, 07:42 PM
  5. Input object and its position
    By Tiny in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 5th September 2007, 01: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
  •