User Tag List

Results 1 to 9 of 9

Thread: Same objects, separate actions

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export Module
    Chrille's Avatar
    Join Date
    Jul 2006
    Posts
    389
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Same objects, separate actions

    There is a solution to events involving two objects of the same type with different actions for each. For example:

    Object1 collides with Object2
    Object1 String A = punch -> Subtract 5 from Object2 Value A
    (Note: Object1 & 2 are different instances of the same object)

    How can I tell them apart? As it is, both objects will have 5 subtracted from their Value A.

    The problem is simply it was a long time since I did this and cannot remember the solution . What do I have to do?

  2. #2
    No Products Registered

    Join Date
    Feb 2007
    Posts
    199
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Same objects, separate actions

    Try adding "pick an object at random" from the object conditions.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Popcorn's Avatar
    Join Date
    Jun 2006
    Location
    Norway, Bergen
    Posts
    2,367
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)

    Re: Same objects, separate actions

    Create a String object, then go to the event editor

    * Object collides with Object
    + Object: alterable string A = "punch"
    - String: set alterable string to "punch"

    * Object collides with Object
    + Object: alterable string A <> "punch"
    + String: string = "punch"
    - sub 5 from Object

    * always
    - String: set alterable string to ""


    I assume that in your game there may be several kind of attacks. That's why we test for type of attack in the first event.
    In the second event we now that one of the objects in the collition is punching. We want to do actions with the object that is not punching.
    In the third event we reset the string so that it's ready for the next frameloop.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export Module
    Chrille's Avatar
    Join Date
    Jul 2006
    Posts
    389
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Same objects, separate actions

    The punch bit was just an example. I need a way of being able to tell two objects apart generally, well, in a loop event actually. But you've pointed me in the right direction I think.

    * on loop
    * object value a = loopindex
    * object collides with object
    - action

    *on loop
    * object value a <> loopindex
    * object collides with object
    - action


    True?

  5. #5
    No Products Registered

    Join Date
    Sep 2006
    Location
    Germany
    Posts
    861
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Same objects, separate actions

    Spread a Value on the beginning of the frame.

    So each object then has some sort of an ID.

    Then compare the loopindex to that alt value.


  6. #6
    No Products Registered

    Join Date
    Jun 2006
    Location
    Land of raging rockets
    Posts
    1,231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Same objects, separate actions

    Quote Originally Posted by Chrille
    * on loop
    * object value a = loopindex
    * object collides with object
    - action

    *on loop
    * object value a <> loopindex
    * object collides with object
    - action

    True?
    Hm. This would only work with "object is overlapping". "Collides" is an immediate condition and does not work on loops.

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export Module
    Chrille's Avatar
    Join Date
    Jul 2006
    Posts
    389
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Same objects, separate actions

    Hmm, I just realised there is a problem to this. The collision code will count twice as it will first check the object matching the loop and then the object not matching. Then it will repeat itself as the second object will eventually match the loop and the first one will end up not matching.

    I'm sure there was a really simple way of separating objects like this but I can't recall if any of these solutions were it.

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export Module
    Chrille's Avatar
    Join Date
    Jul 2006
    Posts
    389
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Same objects, separate actions

    The collision code was just an example as well though. Argh! :grin: But yeah that wouldn't work I guess.

    Are the old MMF 1.5 forums still around somewhere?

  9. #9
    No Products Registered

    Join Date
    Sep 2006
    Location
    Germany
    Posts
    861
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Same objects, separate actions

    http://www.clickteam.com/CTforum/categories.php3?Cat=

Similar Threads

  1. Using Objects from a sub application in a separate frame
    By Lucien in forum Multimedia Fusion 2 - Technical Support
    Replies: 13
    Last Post: 15th March 2012, 08:47 PM
  2. Issue: separate calculations for multiple objects?
    By fandelfinger in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 13th June 2011, 09:04 AM
  3. Copy objects/actions from one frame to another?
    By vertigoelectric in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 29th July 2009, 07:09 PM
  4. Hide objects without actions
    By Blood_Wist in forum Multimedia Fusion 2 - Technical Support
    Replies: 12
    Last Post: 17th May 2009, 05:14 PM
  5. [BUG] Renaming objects messes up global actions
    By Sieg in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 24th January 2008, 12:38 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
  •