Event Sheet is freaking out.

This forum is currently in read-only mode.
From the Asset Store
Very simple code without excess options (15 events for server and 11 events for client)
  • Not sure why, but my event sheet is starting to show indexes for things with drop down boxes...and it's doing it at a very bad time - when I'm trying to replace all mention of my globals with private variables. It's making it nearly impossible to do this.

    I'll describe the problem a little better: If something has a drop down box, like say, which global I want to set, or private variable, instead of saying "North, South, East, or West" it'll say "0, 1, 2, 3". It also does this in things like comparisons, Instead of If RandInt is equal to 2, it'll instead say something cryptic along the lines of "If 7 0 2".

    Is this a bug or did I hit a button or something?

  • Have you tried restarting Construct? If it still does it, can you upload a .cap somewhere which is doing that?

  • I'll PM it to you. Since I don't know how to recreate it I'll just send you my project. The problem is on line 28 - the program won't even run, there's a runaway loop on line 28. Since I just restarted Construct all of the affected events show up properly, but as you mess with events they mess up. This happens if you restart Construct or not. Line 28 however is messed up right after you load the save.

    This is what I'm talking about: "ChosenDirection" 0 "None" - where 0 means "is equal to" since "is equal to" is the first thing on the list, and I guess the list is 0 indexed. It happens more and more as you mess with the program.

    What I just did, and you'll notice this if you check out the MacroGenerator Object and the list of Globals...is create all the Globals as private variables on that object, and through a lot of Find and Replace and manual editing, replace any instance of a global, with a reference to this object and it's private variables. Globals aren't necessary for the generation process since I only do it once. The problem is I guess I messed up somewhere cause line 28 is a runaway loop. While I was replacing, all these numbers started popping up and since I understood the problem I could check the index of what variable I wanted and replace it, but I guess I messed up at some point.

    Anyway long story short - it'd be easier to identify where I messed up if it wasn't doing that. Sending you the link Ash.

    EDIT: Line 81 also results in a runaway loop, if I toggle events 28 and 81 the program runs, but those events are really important. Line 81 is also messed up. It looks like this:

    Comparison: (Abs(MacroGenerator('ResidentialX') - MacroGenerator('IndustrialX')) + Abs(MacroGenerator('ResidentialY')-MacroGenerator('IndustrialY'))) / 2 3 (Abs(MacroGenerator('CommercialX') - MacroGenerator('ResidentialX')) + Abs(MacroGenerator('CommercialY')-MacroGenerator('ResidentialY'))) / 2

    That's two distance calculations - distance on an array - being compared. (I generally want residential to be further from industrial than it is to commercial.) The 3 is the comparison, I made it red to be easier to see.

  • I was wondering if the replace problem mentioned here was resolved. The same things happens to me whenever I try to replace a variable name in an action. All private variables used by objects in that condition and action are replaced by numbers and restarting construct doesn't resolve the problem.

    Having mentioned that I was wondering what the specific capabilities and deficiencies that find and replace option in the event sheet manager has. I look on the wiki and through the forums, but couldn't manage to find out (I'm also wondering, if maybe it's just me who has these problems).

    I also managed to find out how change object names in event sheets (which works by opening the file changing the object name in the layout manager and saving the cap under a new name. Then reopening the cap file I can copy and past the event sheet from the new cap file to the old and it works if there's an object which fulfills with the changed name in the old cap file... This method doesn't change object strings contained in actions.

    Sorry description might be a bit cryptic)

    So what should find and replace be capable of doing and what not? It would be nice to be able to easily rename certain instances (for example when I want to use similar codes for different objects and don't want to manually rename everything.)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Don't use find and replace, it doesn't work, and makes those bugged numbers. If the number bug ever happens to you when your manually placing or replacing a variable, reopen the event wizard for that event and click finish again, that always fixes it for me.

  • Davioware - THAT should be in the FAQ.

    I ended up manually tracking and replacing an entire set of (lots) of globals when I had the number bug. Gagh.

  • Davioware - THAT should be in the FAQ.

    It wouldn't need to be in the faq - if it would be fixed someday (it's on the bug tracker anyway)

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