Making an object not solid at runtime?

This forum is currently in read-only mode.
From the Asset Store
Make your own platformer for both the web and mobile easy with this Santas Platformer Template, FULLY DOCUMENTED
  • I can't seem to find a way for a solid object to become non solid using an event. Is there a way for objects having a "solid" attribute to become "not solid" if a requirement is met? Like a variable or something.

    Like if FloorA is overlapped, ObjectA becomes not solid. Something like that. Is that possible?

  • Sorry you cant. The work around is to destroy the solid object and create an identical one that does not have the attribute.

  • I don't know if it helps but, you can kind of toggle your object's solid behavior by Setting collision mode to None

    + ObjectX: ObjectX overlaps FloorA
    -> ObjectA: Set collision mode to None[/code:22dhig9v]
  • Yeah, it just depends on what behavior your using.

  • Hmm, well I'm using the RTS behavior. I need this because I have a part in my game where objects will spawn or get teleported on 1 square floor tiled background object and from that, they would move around and scatter and once they're not stepping on that square floor anymore, the become solid.

  • You could do some trickery where you have an invisible object like a Tiled Background or whatever that you use for collision purposes on top of your Solid objects. Set your solid objects collision mode to None, then use the invisible object to detect whether or not the space is occupied. When it is no longer occupied you can change the solid objects back to Per Pixel or Bounding Box or whatever.

    I know it's kind of cluttery having extra objects like that but without being able to toggle the attribute it's probably your best bet.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I see. I'll try that thanks.

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