Bullet problem better explained

Get help using Construct 2

Post » Mon Nov 17, 2014 10:41 pm

Hey all. I have bow and arrow. When you aim ,,,,,the bullet for the arrow is disabled, when you release the bowstring , bullet is activated and arrow fly and hit wall , get pinned to the wall. And bullet is disabled again so the arrow doesnt move when pinned to wall. When you wanna shot another arrow , the bullet will get enabled again for the new arrow, but it also enables it for the arrow that is already pinned to the wall, this means that the arrow pinned start moving and creates new colision events which mess up my score which counts colision detection. Hope you understand. So what i need is to enable bullet for each new arrow , but wont let the bullet to be enabled mess with the arrows already pinned to wall. :idea:
B
11
S
3
G
1
Posts: 419
Reputation: 1,782

Post » Mon Nov 17, 2014 11:54 pm

You shouldn't start another thread for the same issue. The first one had the sample on it which is necessary to debug this. You need to keep track of your current arrow. Make a Global variable and set it when you spawn the arrow. Then 'Pick by UID' in the 'On touch end' to pick just that one arrow. The default is to pick all.
You could also give the bow an instance variable instead, if there are multiple bows possible.
ImageImageImage
B
71
S
22
G
241
Posts: 3,734
Reputation: 134,494

Post » Mon Nov 17, 2014 11:59 pm

solved , thanks a lot, :-) ,sorry for making another thread, this was the only thing breaking everything in the game , sorry and thank you
B
11
S
3
G
1
Posts: 419
Reputation: 1,782


Return to How do I....?

Who is online

Users browsing this forum: Armench, brunopalermo, dand and 26 guests