User Tag List

Results 1 to 3 of 3

Thread: Self Reference?

  1. #1
    Clicker Fusion 2.5
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)

    Join Date
    Jan 2014
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Self Reference?

    I could not find this specific question so i am going to ask it. if you have an object with tons of events attached to it, and you are going to have multiple instances of this object at runtime, is there a way to refer to the "owner" or "self" when creating events? Sure my the object itself it's on the list, but what will happen when there are multiple copies of it at runtime, is there any way to point an action to the "Owner" of the event? Might be a dumb question, but i am learning people.

  2. #2
    Clickteam Clickteam
    Danny's Avatar
    Join Date
    Aug 2007
    Location
    United Kingdom
    Posts
    3,010
    Mentioned
    21 Post(s)
    Tagged
    2 Thread(s)
    Welcome to the forums, don't be afraid to ask questions. It's a helpful community

    There are two methods, first off you can code your events in behaviours, reference the manual on behaviours. The behaviour set will scope down to reference only itself in there then.

    Secondly, you can learn about parent-child workings and how Fusion can reference objects by parent-child. I know you want individual referencing, but this is handy for future reference. You can scope down your events a little later and not have to use Behaviours. For now though, behaviours are the way to go with you being relatively new.

    http://community.clickteam.com/forums/358-Clickteam-Guides-Tutorials-and-Examples
    Want to learn Clickteam Fusion 2.5?




  3. #3
    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)
    If you are referring to how to work with a specific instance of an object, you can either use For Each and this will loop through all instances so you can deal with each one individually. (it's now built in to Fusion 2.5, you just go to the object in the event editor and look in the "Count" menu category)

    The other method is to use Spread Value by always spreading a value through one of the object's alterable values. This can be found in the Alterable Values menu category of an object's actions.

    Then you'd run a fastloop for the number of those objects, and then you can check the fastloop index to the object's alterable value. What spread value is doing is just assigning a value to each object instance (by default it's from 0 on up)

    So say you have 5 instances of the same object and you spread value through alterable value A of the object. Then it will go through and assign values 0-4 to those instances.

    Then with the fastloop you are looping through 5 times (so the fastloop index will count from 0 to 4)

    Each fast loop will compare the index to the value of the object instance, so if the fastloop is at 0 and the object's alterable value A is 0, then it will reference that specific object. Likewise, if the fast loop is currently at the third iteration, then an object instance with alterable value of 3 would match that and be referenced for that event.

    You can look up "for each" or "spread value" in the forum search for a lot of information on these 2 methods.

Similar Threads

  1. Deleting item using fixed value reference
    By AliciaSAvril in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 19th August 2012, 01:55 PM
  2. FlashFX example file or reference document?
    By King_Cool in forum SWF/Flash Export Module Version 2.0
    Replies: 3
    Last Post: 2nd June 2012, 12:44 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. reference for arrays and database objects
    By jonboy7039 in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 6th July 2008, 07:13 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
  •