UID destroying itself... why?

0 favourites
  • 5 posts
From the Asset Store
Act on your instances, get/set their properties and variables only thanks to their UID. No more picking trouble! Plugin
  • I made a topic about my problem earlier, but that wasn't until I figured out what the hell was even going on. Also, no-one responded after I figured it out, so uhhhh... encore.

    Every time I go and talk to the sprite "erin" (the cat lady), according to the debugger, her UID gets destroyed as soon as the player collides with her and I haven't a clue why.

    drive.google.com/file/d/1KsF93Utwa-lKeHtPaVqBnJ67TTCRYhk-/view

    (I forgot to connect the "erin" layout to its respective event sheet "event_erin" when I saved the file. No, the event sheet is not the problem, I've checked.)

  • When you are switching to another layout, all objects from the current layout are destroyed. If the same objects exist on the new layout, their instances will be re-created, possibly with different UIDs.

    You can set an object as Global, it will be transferred to other layouts. But you should be careful, it's very easy to mess things up with global objects. For example, if you switch to "eren" layout and then back to "main", you may end up with two instances of Eren object. In this game I wouldn't recommend it.

  • When you are switching to another layout, all objects from the current layout are destroyed. If the same objects exist on the new layout, their instances will be re-created, possibly with different UIDs.

    You can set an object as Global, it will be transferred to other layouts. But you should be careful, it's very easy to mess things up with global objects. For example, if you switch to "eren" layout and then back to "main", you may end up with two instances of Eren object. In this game I wouldn't recommend it.

    Ah, that makes sense actually. It's probably deleting the previous version of the object and replacing it with a new one, which is... honestly pretty frustrating, but interesting nonetheless.

    Weirdly enough though, it only seems to do it to new objects. The "sling", "bronze" and "dalila" objects work perfectly fine, being Global just like "erin", using almost identical event sheets (only differences being the objects affected and the dialogue shown on screen).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The "sling", "bronze" and "dalila" objects work perfectly fine, being Global just like "erin",

    Those objects are set as global, but erin is not.

  • > The "sling", "bronze" and "dalila" objects work perfectly fine, being Global just like "erin",

    Those objects are set as global, but erin is not.

    OH MY GOD I'M SUCH AN IDIOT HOW DID I NOT NOTICE THAT

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