Need new system trigger: On collision Ended

  • Hey everyone,

    The title says it all. It is easy enough to create a workaround to not having this trigger, but it would be faster and more suitable to have it included in construct. As it is, the work around will not work for physics objects without creating an extra sensor object.

  • State variable should do just fine

    X Is on collision

    varState = Colided

    Trigger once - Stuff + set varState to whatever

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • - Either I don't understand what you mean or we are on separate problems. This is how I essentially create an end state for collisions:


    ------------- this.collided = true


    ------------- if (this.collided = true) then this.EndCollision = true

    If EndCollision & triggerOnce

    ------------- // Do Stuff

    ------------- // this.EndCollision = false

    As far as I can tell you need two state tracking variables and the use of IsOverlapping. But as I stated in the OP IsOverlapping doesn't work with physics enabled objects (a separate problem needing addressing). Meaning the workaround now requires sensor objects. potentially doubling the amount of active objects in a scene. Seeing as construct lacks scaleability in the compound object department, I can't see as adding another object to the list as being very desirable.

    Essentially, I said workaround exists but problem with workaround exists... which is why the workaround is not a suitable sub for the existence of a new trigger.

  • I would stay away from negated is overlapping.

    Else should work fine with the trigger conditional this.collided when its true.

  • newt - you can't use else after a trigger

  • On collision, set variable collided=1

    variable collided=1

    ->object is overlapping other object, do foo

    ->else set collided to 0

  • newt - a better implemented work around to be sure but still using overlap... which is part of the problem. It won't work with physics.

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