User Tag List

Results 1 to 6 of 6

Thread: Rope & Chain - element collides instancing issue

  1. #1
    Clicker Multimedia Fusion 2iOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)

    Join Date
    Apr 2013
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Rope & Chain - element collides instancing issue

    I am having a bit of an issue with the rope and chain's conditions.

    I have a little diving game with some tentacles that reach up from the deep to attack the player. When they are reaching up, I want to have them able to grab any fish in the water and drag them away as well, and it ALMOST works
    The way I have it set up is, when an element collides with one of the fish, the fish is switched to a physics-static movement type and then attached using climb>attach at current element. I also need to use a flag or alterable value change on the fish object in order to prevent the action from repeating.

    So the whole event reads something like:

    IF
    "tentacle" element collides with "fish"
    & "fish" alterable value A=0

    THEN
    "fish" set alterable value A=1
    "fish" bring to front
    "fish" set movement to Movement # 1
    "tentacle" attach "fish" to rope at current element, at distance 0


    The problem is that the game seems to have trouble (inconsistently) picking the right instance of the fish, and eventually it will decide to attach every fish of a type on a collision. This effect gets worse when I apply the needed flag or alterable value condition, but it exists even without it.

    I have tried applying various arrangements of either for-each loops on the fish and for-each-element loops on the chains/tentacles, but depending on the order of the conditions they either have no effect or negate the collision entirely.
    I am almost willing to give up on this (relatively minor) feature but it honestly just looks so nice and good the 10% of the time it is working :P

    I can definitely provide a build if anyone wants to check it out, any help would be super very appreciated! Thanks

  2. #2
    Clicker Multimedia Fusion 2iOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)

    Join Date
    Apr 2013
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Scope! I knew there was a term for what I was trying to describe and I think this is a scoping issue!
    I've read a mess of posts on the issue and tried applying some fixes, but nothing seems to work :\
    The most obvious fix seems to be applying a for-each loop event to try to scope the fishes, but that breaks the collision with the tentacle element entirely.
    I'm also confused why the scope is broken, when an alterable value call should not do that? Is this possibly a bug with the rope and chain object?

  3. #3
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    13,444
    Mentioned
    187 Post(s)
    Tagged
    2 Thread(s)
    I can't reproduce the problem in a simple application. I tried this:

    Code:
    * Physics - Rope and Chain: An element collides with Fish
    	Fish : Destroy
    And only the colliding Fish object is deleted, not all objects.

    Can you post a simple MFA that shows the problem?

  4. #4
    Clicker Multimedia Fusion 2iOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)

    Join Date
    Apr 2013
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oof, you're right. I made a simpler project with just the interaction I'm looking for and it seems to work. The scoping issue must be created somewhere else but I can't for the life of me figure out where :\
    I've tried going through and deactivating all the events that involve fastloops, foreach loops, and qualifiers and nothing seems to affect it, I'm not sure what else to look for

    the event still reads more or less the same as written above :\

    I'm linking two builds here, one is the minigame I'm working on with the broken effects, and the other is a quickly made mockup of what I'm going for (which works)
    I'm also going to link the .MFAs in case anyone is so generous they want to go digging for the problem :P
    Thank you so much for looking into this Yves! and Thanks anyone who has any idea what might cause this

    Broken Build

    Working Example

    Broken MFA

    Example MFA

  5. #5
    Clicker Multimedia Fusion 2iOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)

    Join Date
    Apr 2013
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Still struggling with this :\

    I've tried deleting all kinds of events, including every foreach and fastloop in the frame and nothing seems to have any effect :|
    If I add in some "Pick "fishObject" at random" conditions it seems to improve things but they always eventually break.

    I've tried reading through every resource I can find on scoping and none seem to suggest anything that should break it in this case.
    Are there any community resources on this issue I'm missing? Any really good threads with a lot of solutions?

    (So far I think the best I've found is this: https://www.sprykegame.com/volblog/w...team-fusion-25)

  6. #6
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Feb 2017
    Posts
    353
    Mentioned
    18 Post(s)
    Tagged
    0 Thread(s)
    The answer is; you make a collision between clickteams build in collision system and the box2d physics (rope and chain object). This cannot work, dont know why they even allow this!? Replace your 'bouncing ball' with 'physics bouncing ball' and you will see all objects attach always, the chain will break at some point with lot of high density objects but thats another story.
    Attached files Attached files

Similar Threads

  1. rope and chain physic
    By puwsuka in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 19th September 2017, 07:18 PM
  2. Physics Rope & Chain Is there a way to use this?
    By Jusfury in forum Fusion 2.5
    Replies: 6
    Last Post: 31st January 2016, 09:52 AM
  3. Can I use Physics Chain and ROpe with PMO?
    By Emerson3 in forum Fusion 2.5
    Replies: 7
    Last Post: 29th November 2015, 03:54 PM
  4. Physics Rope and Chain attachment issue
    By Bree in forum Fusion 2.5
    Replies: 2
    Last Post: 23rd May 2015, 03:13 AM
  5. Distinguishing rope element instances.
    By Jinxtengu in forum Fusion 2.5
    Replies: 0
    Last Post: 23rd March 2015, 07:31 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •