User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11

Thread: Object Selection (Create and Reference)

  1. #1
    Clickteam Clickteam
    Danny's Avatar
    Join Date
    Aug 2007
    Location
    United Kingdom
    Posts
    3,008
    Mentioned
    21 Post(s)
    Tagged
    2 Thread(s)

    Cool Object Selection (Create and Reference)

    This example will show you how to create goblins based on the max number of lines available in the list object. The list object is a list of names to give the goblins when they're created. This is convenient because if you want more goblins available all you have to do is add a line to the list object with a new name and it will increase the amount available you can spawn.

    This example also shows you random positions set when spawning goblins.

    Covered:
    + Fast Loop
    + Assigning Unique Values to Actives (Spread Value)
    + Assigning Unique Names to Actives (via Spread Value)


    I don't claim this to be the 'best' or even the most 'efficient', however it will give you an overview of how MMF2 works with object selection.

    Points I would recommend if you wish to develop on this system:
    + Use invisible list object (It's faster than the Windows List Object)
    + Use a custom movement


    This could have been done in less events however I wanted to ensure the groups and each condition was specified individually so it was more clear to you what happens.

    MMF2 Reads events from TOP-to-BOTTOM. This means 'The Only One Action When Event Loops' and it's actions will ONLY be executed AFTER the fast loop which is ordered before it.

    Enjoy

    Danny

    goblins.mfa
    Want to learn Clickteam Fusion 2.5?




  2. #2
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Events 21 and 23 scared me for a while until I realized there was only ever one checker and I realized that it was just being used in place of having frame values
    Nice example
    Working as fast as I can on Fusion 3

  3. #3
    Clickteam Clickteam
    Danny's Avatar
    Join Date
    Aug 2007
    Location
    United Kingdom
    Posts
    3,008
    Mentioned
    21 Post(s)
    Tagged
    2 Thread(s)
    Thanks LB. There was a whole host of other features I wanted to include, but I thought this would be ample for beginners of MMF to understand. I could've done it in a lot less (event-wise) and maybe a bit more efficient, but at least by doing it line by line they can see more easily what's going on.
    Want to learn Clickteam Fusion 2.5?




  4. #4
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleInstall Creator Pro

    Join Date
    Aug 2006
    Posts
    540
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Hello Dany ,
    thanks a lot for this example!
    Now as a teacher , I was thinking of a way to tweak this into becoming a simple learning activity ( for my pupils who learn English as a foreign language ): for example, ask pupils to click on all boxes that refer to, say, "food".
    To achieve that , it would be necessary to display the actual names of the instances ( names from the list ) within the boxes themselves, instead of having "goblin" written all over them.
    I would add some incorrect words in the list ( not related to food) and only by clicking "food-related words" would the students get points, for instance...
    I need to brush up my mmf skills before I actually achieve to do this, but I'll try
    Now I'm going to take some time studying your example in detail !!
    Thanks again,
    eric

  5. #5
    Clickteam Clickteam
    Danny's Avatar
    Join Date
    Aug 2007
    Location
    United Kingdom
    Posts
    3,008
    Mentioned
    21 Post(s)
    Tagged
    2 Thread(s)
    Hi Eric,

    Thanks. This should be easy to implement, please feel free to remix, adapt or mash up the example MFA to suit your needs.

    The best way with MMF is trial and error, which is why some events which could be coupled together I made individually so you could see what was happening and why it was happening. In your scenario what I would do is, use a flag for each active object that IS food, and a flag for those that are not. So if user clicks on food it would be; User Clicks on "Block""+"Block" Flag 0 = on: Do something.

    For items that are not food just turn their flag off.

    To display a dynamic string along with the boxes, I would just create a new string object where the active is created and MMF will auto-pair them up. You could then Always > set position of string to 0,0 of Block. Then Set Alterable String to "Block" "Name".

    Let me know how you get on or if you need a bit more detail but I think if you study the inner workings of this example you'll be cooking on gas in no time!

    All the best,
    Danny
    Want to learn Clickteam Fusion 2.5?




  6. #6
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleInstall Creator Pro

    Join Date
    Aug 2006
    Posts
    540
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Hi,
    thanks Danny for the advice ! i'll experiment and let you know.
    Now I didn't know about this :

    Quote Originally Posted by Danny View Post

    ... create a new string object where the active is created and MMF will auto-pair them up.
    I'll need to try and see how I can make use of that feature.
    Thanks,
    eric

  7. #7
    Clickteam Clickteam
    Danny's Avatar
    Join Date
    Aug 2007
    Location
    United Kingdom
    Posts
    3,008
    Mentioned
    21 Post(s)
    Tagged
    2 Thread(s)
    Eric,

    If you create two objects in the same action then reference those together in future events it will pair them up automatically. It's a 'not-so-much talked about' MMF trick, it works brilliantly. Example:

    User Presses Space: Create "Block" at 0,0 + Create "String" at 0,0
    Always: Set "String" Position to Position of "Block"

    If you have 3 blocks, because you created the new block and new string in the same action the block will be kinda classed as the 'parent' object and the string the 'child' object so to speak, when you set position in the next even it will auto-pair it up to the one it was created with.

    Neat trick. Let me know how you get on.
    Want to learn Clickteam Fusion 2.5?




  8. #8
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Posts
    1,305
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    You don't actually need to create both objects in the same action. MMF2 will always pair objects according to the order in which they were created, but the precise time at which they were created doesn't matter.
    http://www.create-games.com/article.asp?id=2248
    http://www.diybandits.com.au/MMF/art...icpairing.html

  9. #9
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleInstall Creator Pro

    Join Date
    Aug 2006
    Posts
    540
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Muddymole ,
    your website diybandits.com.au is very nice , and the illustrated article on object pairing really helps !
    Thanks a lot for sharing ,
    eric

  10. #10
    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)
    That is Chris Burrows' site, and it's wrong. Monkey #1 should get Banana #5.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. How to create a self organized itens selection?
    By Decoamorim in forum Multimedia Fusion 2 - Technical Support
    Replies: 15
    Last Post: 17th October 2013, 01:30 AM
  2. How do you reference multiple instances of the same active object?
    By Cybert9 in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 3rd February 2012, 02:33 AM
  3. change the reference name of an object at runtime?
    By felinex in forum Multimedia Fusion 2 - Technical Support
    Replies: 14
    Last Post: 14th June 2011, 11:10 PM
  4. Create Object + Object Selection Revisited
    By Crash86 in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 22nd February 2011, 05:33 PM
  5. Create Object + Object Selection
    By Crash86 in forum Multimedia Fusion 2 - Technical Support
    Replies: 12
    Last Post: 13th October 2009, 05:56 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
  •