R102 - Checking the instance variable is passing

Bugs will be moved here once resolved.

Post » Sun Sep 09, 2012 11:35 pm

Checking the instance variable is passing through the code.

https://dl.dropbox.com/u/47035927/temp/instances.capx

It's an propositional issue, but I was using it to check opened doors and the collision masks behind it, when the door with ID 1 is open, the mask with ID 1 is smaller, allowing the player pass through.

Here's a video explaining the issue:
[tube]http://www.youtube.com/watch?v=quFDfT8WMSM[/tube]

I know, my English is terrible, but I'm working on it too xDTELLES08082012-09-09 23:43:38
ImageImageImageImageImageImage
B
92
S
19
G
12
Posts: 1,192
Reputation: 18,276

Post » Mon Sep 10, 2012 5:02 pm

What exactly is wrong with the .capx you linked to? It appears to be working fine.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,508

Post » Mon Sep 10, 2012 11:12 pm

@Ashley

What I can't understand is why the code is deleting the sprite3 instances with different IDs with only one trigger.

Ops, there was a mistake on the code, my bad.

Here is what is happening:
The first code is working fine;


The second code is setting the Scenario Mask with ID = 4 to be with the height = 225 when you press the Button with ID = 1, but how it's happening if it's inside a code where is checking the Button ID = 4 and not ID = 1? It's wrong? I'm misunderstanding the event system?


Sample file is on the same link, updated: https://dl.dropbox.com/u/47035927/temp/instances.capx
ImageImageImageImageImageImage
B
92
S
19
G
12
Posts: 1,192
Reputation: 18,276

Post » Tue Sep 11, 2012 12:27 am

You're right, there appears to be a problem with triggers in subevents. In your example you can code like Door 0 and Door 1 to work around the problem, but Door 2 and Door 3 show the bug and I'll try to fix it in C2 soon. However it does change a fairly important aspect of how triggers work. We've got a stable build coming up so I think it would be risky to change the code before that is released, so I'll wait until the next beta release and try to fix it for that.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,508

Post » Tue Sep 11, 2012 12:28 am

@Ashley

Thank you very much.
ImageImageImageImageImageImage
B
92
S
19
G
12
Posts: 1,192
Reputation: 18,276


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 1 guest