"One trigger per event branch" problem

0 favourites
  • 4 posts
From the Asset Store
Per Pixel Destruction like in "Worms" (perfect performance, no third party plugins)
  • I wrote a block that involves some collision based events and once I got it completely working correctly, I tried to turn it into a function. However, C2 balks when I try to drag any events into the function that are triggered by collision. This is a real show-stopper. Is there some way to alleviate this? I don't fully understand C2's objections. All I get by way of error messages is "There can only be one trigger per event branch, so some events could not be moved here."

  • you should just import the actions in the function.

    and use.

    on collision - call function.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You can use 'is overlapping' instead.

  • LittleStain

    There is more than one collision being checked for in the function.

    Arima

    I originally had been using overlap, but overlap doesn't pick the colliding objects the way that colliding does, which hoses the rest of the script. It's an 'infection' type of script, similar to the 'evil sprite' demo.

    Thank you both. I may have found a solution, though: Making the function enable or disable a group, and within that group is my script. The function also initializes some variables necessary for the script, and checks to see if the group is still running or not, returning an error if it is. This should get close enough to being able to use the script as if it were a true function. I'm debugging it now.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)