Corrupt .cap - Private variables

For questions about using Classic.

Post » Sat Mar 22, 2008 4:35 pm

Okay, I had previously posted a thread here where I got a corrupt .cap back in v0.91 that had to do with global variables in events. Now I have another corrupt .cap that behaves the same way (opens to 90% then crashes Construct), only instead of global variables I was working with private variables in events.

This is what happened leading up to when the crash occured:

I had an event that was set up like so,

[code:3jbg4zcd]
+ Always
- Sprite: Set position to object spriteBody (image point 0)
[/code:3jbg4zcd]

I added the private text variable "status" to the sprite, and set it's default value to "alive."

I went to the event sheet I was working on to control the sprite and changed the "Always" by double-clicking it and backing up to select the sprite instead of the System object. Then I changed the event condition to test the variable "status," like so:

[code:3jbg4zcd]
+ Sprite: Value 'status' Equal to "alive"
- Sprite: Set position to object spriteBody (image point 0)
[/code:3jbg4zcd]

After making the change, I started making a new event:

[code:3jbg4zcd]
+ spriteBody overlaps spriteCollider
-
[/code:3jbg4zcd]

I didn't finish the action in the event because I noticed that the change I made before didn't take. Instead of showing "Sprite: Value 'status'" it said "Sprite: Value 2." So I double-clicked the event and re-set it to "status," and it showed up normally.

That's when I noticed that the icon for the sprite wasn't the sprite's icon, but the system icon instead. I immediately saved a new version and quit Construct. When I tried opening it again, it crashed.

I think that the corruption came from changing the condition from a system trigger to a sprite trigger rather than just creating a new condition from scratch (hence the sprite icon changing to the System icon).

And that's about as specific as I can get. Here's the corrupt .cap:

http://www.mediafire.com/?oruo4ojtoly
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sat Mar 22, 2008 5:39 pm

Hmm, NOT COOL....

Maybe it's got something to do with events and actions...

Ever tried to make an event wich plays a music file at start of layout? When you remove the condition, and leave the action to play the music, and run all layout, construct craches..... sometimes.
B
2
G
4
Posts: 13
Reputation: 1,076

Post » Sat Mar 22, 2008 11:59 pm

Fixed for 0.94, thanks for the report.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,590


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: GameOverBeast and 1 guest