Do I still need collisions for this?

0 favourites
  • 4 posts
  • Hello World,

    So I have a 2 part question. First of lets say I have an event like this

    every tick if object a is overlapping object b then destroy object b

    do I need collisions to be enabled on those 2 objects for that to work?

    Second part lets say I set an object to have collisions disabled by default, then I have an event

    if object c is on screen then set collisions enabled for object c

    will that permanently enable collisions for the object once it comes into view, or will collisions be set back to disabled after the object leaves the screen?

    Thank you.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yes, and overlapping is already every tick by definition. Collisions are for a single trigger.

    Yes, all objects have collisions enabled by default. If you want to stop them offscreen use else.

    You might also try a different approach of not using collisions at all.

    The array object can mimic a grid of objects, and can simplify comparisons.

    value of arrayAt(1,1) > arrayAt(1,2) etc.

    You just have to worry about picking objects after that. In which case instance variables work well.

  • 1. Yes you need collisions to be enabled (but you don't need the every tick condition).

    2. If you want to disable conditions then make an else statement or something which disables them when the object isn't in view, otherwise it will not switch back on its own.

    EDIT: Curse my slow typing fingers!!!

  • Cool, thats all I needed to know, thanks.

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