Don't copy that floppy/events.

  • Just to give everybody a heads up in case you want to copy some event sheet code between different projects, it might not show a warning message, BUT trust me, DON'T DO IT.

    If you attempt to copy over an event sheet that contains references to objects which don't exist in the current project, Construct will warn you about that. When that happened, I tried to create the objects which were referenced and give them the same names, and then copy over the event sheet. At that point, Construct didn't throw any warnings or errors, everything looked just fine, the entire sheet copied over, and it looked like I was going to be saving some serious time, since I've got a lot of projects where certain event sheets (which I essentially use as containers for each respective sprite's logic) were nearly identical.

    Fast forward to almost two hours later, where some of my scripts just weren't executing properly, and I finally narrowed it down some pick events were not matching known UID values, meaning that even though they appeared to be doing a pick on the same object as the last project with the same name, they obviously contained some address references that were different. Both the Pick operation code and the Create Object code was stuff I had copied from the aforementioned project's event sheet.

    After re-creating the aforementioned picking and associated create object commands from scratch, the code worked. Anyways, this is just a heads-up to anyone thinking of trying to open up multiple projects in the project tab and trying to copy over event code. As it stands now, unless you really ENJOY putting tons and tons of Append Text statements in your code, I wouldn't recommend trying it.

    -- cacotigon

  • How did you get the UID you were picking with? If you hard code some precise UID before runtime it's definitely not a good practice (:

    Because UID are affected on start of layout and on creation of object. Depending on some orders it might change.

  • Oh I know that, I create objects on layout start and then save there UID values into associated global vars.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I can't think of any reason re-picking the same events would fix anything. When you click export, if it's the same events, you should get exactly the same output. Are you sure you did not change anything else?

    Also, if you can reproduce this in a new project could you post it to the bugs forum?

  • Ashley: I don't think that this is an event code copy problem, I think it's related to my prior misunderstanding of the Construct pick inheritance as in forum post:

    Pick inheritance post


  • I have copied events across a few times, without any trouble...

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