Pin Weirdness

Get help using Construct 2

Post » Fri Aug 10, 2012 12:10 pm


Hi,

I have encountered some strange results in my attempts at my 1st game.
I am pinning rocks onto walls. Yet when the spaceship is rotated rapidly they are destroyed, but only yellow rocks (they should not be!)

Hard to describe, but you can take a look at the capx and spin around after some rocks stick to the ship. You will be left with only red rocks.


zing.capx
B
7
S
1
Posts: 74
Reputation: 1,232

Post » Fri Aug 10, 2012 12:55 pm

@mutuware
normally to fix this kind of error you would just rearrange the order of the events so that first the ship is angled, and then the rocks are positioned and angled (due to pinbehaviour), and then at the end of the event sheet check for collision.

However due to these actions being performed by a behaviour, you can't seem to change this order.

One thing you can do though is to add an instance variable for example "Destroyable" to the rocks, and set it's default to 1

When the rock sticks to the opposite coloured wall, set destroyable to 0
and then in the events where the rock collides with the same coloured wall add another condition to check if destroyable= 1 keepee2012-08-10 13:11:20
B
28
S
8
G
1
Posts: 469
Reputation: 4,683

Post » Fri Aug 10, 2012 4:02 pm

Another option is to pin the rocks to the ship instead of to the walls.
B
54
S
28
G
18
Posts: 1,520
Reputation: 25,020

Post » Sat Aug 11, 2012 8:53 am

Thanks Keepee, your solution solved the problem!
B
7
S
1
Posts: 74
Reputation: 1,232


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 19 guests