How do I stop events automaticly deleting?

0 favourites
  • 15 posts
From the Asset Store
14 amazing sound files of game events like Level Ups, Level Completes, object spawn, object taking etc.
  • Hey,

    How can i stop that my event sheet is automaticly deleting all lines of code when i delete the object that it marked marked on?

    It would be better if i would get red lines or something that would tell me that something is missing or wrong than deleting all my code and let me think again what i have write there. its really annoying.

  • You do get a warning that this will happen. Also, you can click Undo to get your code back. But there's not much point having code that refers to an object that no longer exists

    I hope I've understood you.

  • Read warning when you delete any object. C2 will automatically delete any lines that objects are not present on your layout.

  • You don't.

  • brunopalermo You don't.? meaning plz

  • It would be nice if the warning would somehow reference which stuff will be deleted. I know I've deleted objects in the past which I forgot were actually used. It can be a pain sometimes.

  • Lordshiva1948 Meaning there's no option in Construct 2 for allowing you to keep events/actions related to objects that were deleted. So you don't stop them from being automatically deleted.

  • brunopalermo sorry I cannot answer that but, hey my boy Ashley what do you say? Please answer this question Ahley

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • it would be fine if there would be an option for this, sometimes i delet objects to replace them with something or i delete them but dont want to loose my code.

    I know that i can first replace the object and then delete it, but when i fortgot one object it would be deletet to.

  • EyeForcz read this in manual

    https://www.scirra.com/manual/43/layout-view

  • It actually takes place in the event sheet view - and you are looking to "replace object" first before any deletion.

    In conjunction with event search (Ribbon - Event view), you can find all instances of the use of the object in your event sheet, replace the object, than finally deleting it.

    It's mostly a matter of organisation as well, you shouldn't be going around and having to delete objects all that often.

    It cannot be an option to not delete the code lines, as otherwise it would mess with the current code completion, syntax detector and overall the way Construct 2 works.

  • Ashley, Kyatric,

    I would love to see the relevant events disabled and flagged, rather than deleted.

    the problem arises when you have objects that go across event-sheets. the search tools don't work for that and it's possible to see a forgotten dependency in a large piece of game logic get destroyed because you deleted an object.

    so I understand why it's done the way its done, but it's a huge risk and i'm terrified of deleting objects because of it.

    PS: backups of old versions are essential.

    R

  • always make backup of your capx in other folder.

  • It actually takes place in the event sheet view - and you are looking to "replace object" first before any deletion.

    In conjunction with event search (Ribbon - Event view), you can find all instances of the use of the object in your event sheet, replace the object, than finally deleting it.

    It's mostly a matter of organisation as well, you shouldn't be going around and having to delete objects all that often.

    It cannot be an option to not delete the code lines, as otherwise it would mess with the current code completion, syntax detector and overall the way Construct 2 works.

    Ashley

    But thats not how i work, i like to first delete everything and then replace it, thats how every programming language works too.

    In many situations you are right that it doesnt make sense to keep the code, but in most places it does.

    there should be a something like a short key CTRL+DEL that deletes the object but not the code and everyone would have then flexablity to choose

    how he would like to delete his object.

  • I think a better solution would be improved tools to find all the references to an object, and then the editor can show you what's about to be removed before you remove it. (It's also undoable so if it suddenly breaks your game you can put it back.)

    Allowing events for deleted objects is pretty complicated, since if you try to edit an event for a deleted object then I guess you want to still be able to see all its behaviors, families, container, variables etc. Also if you do actually want all its events removed, then you have another boring manual step of sifting through the project deleting all the missing-object events.

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