Something I don't understand with an object

0 favourites
  • 5 posts
From the Asset Store
Tap the ball, control it, avoid touching spikes and score higher!
  • Hi everyone,

    I'm experiencing a very weird "bug" (though probably a mistake on my part) with an object. Here is the simplified situation :

    I have a layout1 and a layout2. and I have to pass from one to another. When doing so, one object does not disappear. Always the same object, and only this one.

    Concretely, this object appears on the layout 2, but is never created, spawned or something else on layout 1. Still, when switching from layout 2 to layout 1, the object stays there, at the same size and same position than it was on layout 2. I tried to create multiple instances of this object on layout 2 and they all appear on layout 1.

    Even more surprising, if I destroy this object at the start of layout 1 (which was my only solution), it is also destroyed on layout 2 !

    I already had the same problem with the same object when going from layout 0 to layout 1.

    EDIT : I foud a solution to my problem : I destroy Object 1 at the start of Layout 1, and destroy it also at the start of layout 2, then recreates a new object just afterwards. But this sounds like a workaround. Does someone have an explanation of what's happening?

  • Do you have the layer set to global on which the object resides ?

  • i encountered this kinda bug, when i used the condition On Destroy to switch on different layout, try avoiding the On destroy to change layouts and create objects on it, Ashley explained it here i hope that is the problem you have. if not maybe its something similar... hope it helped you

    the issue above i was having a fast passe game, with a lot of predefined objects( predefined = i mean i built the layout architecture without events, drag and drop mode) in the layout, now when actor was dead, or got destroyed i was using ON destroy to move on menu layout to be able to start again, however when i was switching the layout, some items, and most of time one item specifically was sticking on all layouts, even though there is no event that says to be created.... that kinda sounds as your problem ... but from r206 above should be fixed i think

    does the layout2 have the event sheet included, that says that the object to be destroyed as in layout 1?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Be sure you have "Global" set to off in this object's properties.

  • Problem fixed! Indeed "Global" was set to yes. I've set it to No, and it fixed everything!

    Thanks a lot!

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