How do I disable "set angle" after spawning an object?

0 favourites
  • 5 posts
From the Asset Store
*********** Fidget popper tile sets **************
  • Hi,

    in MoveTo properties there is a "Set angle" property, which is checked by default. If I manually place the object to the layout and uncheck it, it remembers, and all the future instances I spawn have it unchecked. But I don't want to place any instances of the object to the layout when it starts to limit the vram usage at start of the layout to make the layout start faster (the object has a lot of animations). When I spawn the object with an event for the first time during layout runtime, it has the property "Set angle" checked by default and it makes my object turn upside down when it's moving (which I don't want to). I don't seem to find how do I disable "Set angle" with an event after spawning the object (its not in MoveTo: properties). If I create the object manually, uncheck it, then delete it, creating it manually again still have it unchecked, so that it remembers, but spawning it with an event still have it checked again. Any idea how to handle this?

    Thank you,

    Tomas

  • A simple and very common solution is to create a separate layout to store such 'default' instances. They won't be using any RAM until you create a new instance in runtime.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi dop2000, thank you for your reply, I see no issue doing it that way, I'll give it a try. I'm still curious why there is no option to change that behavior from the event sheet, as I can imagine someone would like to be able to turn it on/off based on some events, but for my game, I'm perfectly fine with the solution you proposed, so its just my curiosity now, in case someone who knows stumble upon this thread :) Anyway, thanks!

  • When creating an object at runtime construct copies the properties of the ‘default’ instance of that type. That instance is the first one placed on the lowest layer in the lowest layout with that instance. That’s why dop suggested having a layout with the default instances. It probably should be the first layout though.

    Another option is to use templates instead. Notice when you create an object you can specify a template. As I recall you can create a template in the editor from a selected instance. Do refer to the manual for specifics.

  • Another option is to use templates instead. Notice when you create an object you can specify a template. As I recall you can create a template in the editor from a selected instance.

    Yeah, templates is a great feature. But you still need to store these templates somewhere - on a separate repository layout.

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