What happens when you die.

This forum is currently in read-only mode.
From the Asset Store
Dodge or Die
$1.60 USD
80% off
You are stuck in a room...alone! Gotta survive this space scrape!
  • I'm not talking about the big white light.

    What happens to an object when its destroyed, and does it have any new characteristics, let alone old ones that can still be referenced?

    For example I know that the object can still be referenced in the same event, but can that object be thought of as off-screen, invisible, etc, and can it be used as such in other events?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Are you talking about that middle-frame time period where it's told to be destroyed, but there's still events picking that object type?

    I'm pretty sure once it's destroyed, it can't ever be picked again, even if the event sheet hasn't finished running for that frame.

  • you can usually reference that object, and use that object in certain ways after it is destroyed but before the next tick

    for instance you can destroy a sprite, and then tell the same sprite to spawn another object

    I haven't personally tested all the instances where this works, and what types of actions, conditions, and expressions still work until the end of the tick

    but I believe ashley said that this will not be fixed in Construct 1,

    because it is deeply entrenched in the picking, or event logic

    after the tick, the object is completely destroyed in RAM

    so, it's not invisible or off-screen, it's really gone

  • Just making sure its completely gone. I was having an issue picking in a sub event when I gave an object in the same family the same pv. I was thinking it was still referencing the same object, but it looks like it needs to be within another event or tick to do that.

    Any way I was hoping some call like is destroyed, or is off screen might be useful, but a an additional pv, or perhaps a function could handle that.

  • Objects dont actually disappear until the next frame, so you could for example do this:

    player.destroy

    create explosion at player.x, player.y

    and it would work fine.

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