Any suggestion why picking is not working?

Discussion and feedback on Construct 2

Post » Sun Nov 08, 2015 7:32 pm

Hi,

I have this set of conditions, but picking doesn't seam to work. The object in question is inside the family that loop runs trough. Any suggestions?
https://drive.google.com/file/d/0B0jUjW ... sp=sharing
Thanks
M
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
89
S
30
G
22
Posts: 1,984
Reputation: 20,097

Post » Sun Nov 08, 2015 7:37 pm

have you try : pick as_traps when as_traps.IsShoting = 1

Edit:
pick as_traps when as_traps.IsShoting = 1
(subevent)for each as_traps
(...)(subevent)pick sprite by UID= as_traps.uid
Last edited by MadSpy on Sun Nov 08, 2015 7:50 pm, edited 1 time in total.
Image Image
B
22
S
13
G
135
Posts: 871
Reputation: 70,320

Post » Sun Nov 08, 2015 7:44 pm

Not really enough details to say why it wouldn't work. Assuming the sprite is in the family like you say and it has that boolean set, it should work.

That said it may not be pickable yet if it was just created and a toplevel event wasn't reached yet. Is it a sub-event of something?
B
92
S
32
G
106
Posts: 5,272
Reputation: 69,455

Post » Sun Nov 08, 2015 7:56 pm

R0J0hound wrote:Not really enough details to say why it wouldn't work. Assuming the sprite is in the family like you say and it has that boolean set, it should work.

That said it may not be pickable yet if it was just created and a toplevel event wasn't reached yet. Is it a sub-event of something?


Yes, it is a subevent of On start of layout. So You must be right. But meanwhile, I've just created one more boo, to specify this particular type... and testing... and it doesn't work too. Here's full view.

https://drive.google.com/file/d/0B0jUjW ... sp=sharing

@MadSpy Why would you pick is_shooting = 1 first and not later as I'm doing? I'm probably missing something: Is there a huge difference?

[email protected], i might be too tired tonight; I forgot that the angles are calculated on start of another sheet and using objects that were absent from the layout. Sorry guys but thanks for your suggestions.
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
89
S
30
G
22
Posts: 1,984
Reputation: 20,097


Return to Construct 2 General

Who is online

Users browsing this forum: Cojoyo, mihirolover and 10 guests