Doors and collisions

For questions about using Classic.

Post » Sat Dec 08, 2007 7:57 am

Hi, got a bit of a problem in my game.
I have door sprites. And I have keys.
What I want is to remove (Destroy) the doors if the player have one, or more, keys and collides with the doors.

Things isn't working as expected. :/

Events:
On collision between Player and Door
(sub event) Player Value 'keys' Greater or equal 1

Actions for the sub event:
Player: Subtract 1 from 'keys'
Door: Destroy

But the thing is, no matter how many keys the player have, the collision between the player and the door doesn't run the actions.
I ran the debugger and saw that the player do have a key, so the sub event should fire, but it's like if the collision event isn't firing.
Just to try things out, I moved the Door: Destroy action to the On collision event, but it still refused to disappear.

How can this be fixed?
Thanks for any help.
B
2
S
1
G
5
Posts: 50
Reputation: 1,500

Post » Sat Dec 08, 2007 8:31 am

Tried it out here and everything worked fine - keycount got reduced, door destroyed. So... I have no idea. Check your objects' collision settings?
B
4
S
2
G
6
Posts: 161
Reputation: 2,597

Post » Sat Dec 08, 2007 4:54 pm

If you have a .cap which isn't working like you expect it, send it over to ashley@scirra.com and I'll take a peek.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,508


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests