How do I disable behaviors on the fly?

0 favourites
  • 8 posts
From the Asset Store
Full game Construct 2 and Construct 3 to post on Google Play
  • I have a game that I need to use DestroyOutsideLayout or Wrap depending on options selected at the start of the game. Is there a way to add both behaviors to my layout and only enable one of them as needed?

  • I don't think you can toggle those behaviours on and off, and I don't see why you would want to. If you really want an object that can sometimes wrap round and then sometimes is destroyed I would just create two separate object types.

  • Simple, sometimes I want the bullets to bounce off the walls, some times I want them to wrap back around and sometimes I just want them to blow up on the wall. The easiest way to do that would be to take advantage of features that are already built into the software.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Then you probably need three types of bullets. One that collides and bounces off a wall, one that is destroyed when it hits the wall and one that doesn't collide with the wall and has wrap behaviour.

  • Would be so much easier if I could just turn those behaviors off when needed instead of having to use 3 different bullets and coding the differences all through my program.

  • yeah, well. still, you can put em on a family

    ...FOR A PRICE MUAHAHA

  • Whether you are disabling the behaviours, which isn't possible with these ones, or using 3 different bullets, seems like about the same amount of code. i.e. not much

  • Whether you are disabling the behaviours, which isn't possible with these ones, or using 3 different bullets, seems like about the same amount of code. i.e. not much

    Not really, if I use 3 different bullets or 3 different walls then there is a fair amount of extra work involved, including managing all of the assets and making sure all 3 get changed anytime I make one. It would be so much easier make a cleaner program if there was a wall behavior similar to platform where I could make easy changes to the settings on the fly.

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