Event Sheet is freaking out.

For questions about using Classic.

Post » Sat Mar 21, 2009 8:29 am

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?
B
5
S
2
G
5
Posts: 221
Reputation: 2,272

Post » Sat Mar 21, 2009 2:04 pm

Have you tried restarting Construct? If it still does it, can you upload a .cap somewhere which is doing that?
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Sat Mar 21, 2009 5:05 pm

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. :P 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 [color=#FF0000:86rvvszv]3[/color:86rvvszv] (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.
B
5
S
2
G
5
Posts: 221
Reputation: 2,272

Post » Tue Sep 15, 2009 10:25 am

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.)
B
1
G
3
Posts: 5
Reputation: 835

Post » Tue Sep 15, 2009 10:40 am

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.
B
25
S
3
G
6
Posts: 1,197
Reputation: 5,620

Post » Thu Aug 19, 2010 1:22 pm

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.
B
2
G
2
Posts: 42
Reputation: 734

Post » Thu Aug 19, 2010 3:45 pm

[quote="Squish":38drkcjz]Davioware - THAT should be in the FAQ.[/quote:38drkcjz]
It wouldn't need to be in the faq - if it would be fixed someday (it's on the bug tracker anyway) :wink:
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests