Pick All / Create Bug

Bugs will be moved here once resolved.

Post » Sun Jun 26, 2016 6:15 pm

tunepunk wrote:I had a similar problem calling a function which sorts zOrder after an object was created. The function would sort everything except the created sprite, even though the function picked all. Function is top level event, bug or by design?

On colission
-> Create Sprite
-> call function

function picks all. sorts z-order.
did not work. the newly created object is not sorted with the rest.

On created (new top level event)
-> call function

function picks all. sorts z-order.
did not work. the newly created object is not sorted with the rest.

I can't get the created sprite to sort with the rest of the objects, even after calling a function.
wait 0 works but creates ugly unsorted graphics glitch for a fraction of a secondbefore it's sorted correctly.


Can you find the correct z before the creation and place it then?
Image ImageImage
B
168
S
50
G
169
Posts: 8,281
Reputation: 108,191

Post » Sun Jun 26, 2016 6:18 pm

The function is called b4 the merging.

Just use the trigger 'On created'.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Mon Jun 27, 2016 7:55 am

99Instances2Go wrote:The function is called b4 the merging.

Just use the trigger 'On created'.


If i put on created as a new top level event below it still doesn't work. Maybe if i put on created above? Does the merging happen at the end of the event sheet?

On created >

On collision with Sprite2 > Create Sprite
Run through event sheet - back to top.
Follow my progress on Twitter
or in this thread Archer Devlog
B
38
S
15
G
17
Posts: 949
Reputation: 12,320

Post » Mon Jun 27, 2016 1:30 pm

I have no idea what that means. It works this way ....

Some conditon ...
The create action .....

New condition 'on created' ....
Conditions + actions

The 'on created' picks the newly created object, when it is ready to pick. And then you do with it what you like.
The 'on created' is a trigger, it does not matter where in the events you put it, as long as it is a root event.

If this gives you a picking problem (kinda impossible) then you have to be very specific on what you mean with "it still doesn't work". Show the events.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Mon Jun 27, 2016 5:37 pm

99Instances2Go wrote:I have no idea what that means. It works this way ....

Some conditon ...
The create action .....

New condition 'on created' ....
Conditions + actions

The 'on created' picks the newly created object, when it is ready to pick. And then you do with it what you like.
The 'on created' is a trigger, it does not matter where in the events you put it, as long as it is a root event.

If this gives you a picking problem (kinda impossible) then you have to be very specific on what you mean with "it still doesn't work". Show the events.


It most certainly does not work. Everything is picked except the newly created one despite called by a top level event.

Image

Even if i set the opacity directly in the "on created" everything except the created sprite has the opacity set to 50.

It seems like the newly created arrowInGround is not in the family upon creation.
Last edited by tunepunk on Mon Jun 27, 2016 5:51 pm, edited 1 time in total.
Follow my progress on Twitter
or in this thread Archer Devlog
B
38
S
15
G
17
Posts: 949
Reputation: 12,320

Post » Mon Jun 27, 2016 5:48 pm

yea, tunepunk is right- on create doesn't include the new objects in any picking.
in these events for example, nothing gets rotated:
Image
B
43
S
19
G
65
Posts: 1,098
Reputation: 37,933

Post » Mon Jun 27, 2016 6:05 pm

Prominent wrote:yea, tunepunk is right- on create doesn't include the new objects in any picking.
in these events for example, nothing gets rotated:
Image


Can confirm. Did exactly the same test. Pick All doesn't pick any picked objects. Removing Pick all and they will rotate.
Last edited by tunepunk on Mon Jun 27, 2016 6:07 pm, edited 1 time in total.
Follow my progress on Twitter
or in this thread Archer Devlog
B
38
S
15
G
17
Posts: 949
Reputation: 12,320

Post » Mon Jun 27, 2016 6:07 pm

Prominent wrote:yea, tunepunk is right- on create doesn't include the new objects in any picking.
in these events for example, nothing gets rotated:
Image


Might want to recheck that.
As is, any instance in the layout already will be rotated.
Pick all negates the on create pick, and picks everything else.

Remove the pick all, and all instances get rotated when created.
Image ImageImage
B
168
S
50
G
169
Posts: 8,281
Reputation: 108,191

Post » Mon Jun 27, 2016 6:12 pm

newt wrote:
Prominent wrote:yea, tunepunk is right- on create doesn't include the new objects in any picking.
in these events for example, nothing gets rotated:
Image


Might want to recheck that.
As is, any instance in the layout already will be rotated.
Pick all negates the on create pick, and picks everything else.

Remove the pick all, and all instances get rotated when created.


So it's a useless trigger if you want to, upon creation pick anything of the same kind, allready on screen and rotate them together with the new one? any workaround?

Anyway, that does not explain why my function isn't picking the newly created one. The function is clean of any picking at start? and should pick everything right?
Follow my progress on Twitter
or in this thread Archer Devlog
B
38
S
15
G
17
Posts: 949
Reputation: 12,320

Post » Mon Jun 27, 2016 6:27 pm

You have to break picking in the creation event.
A function should suffice.
on function, sprite, do fo0
No pick all.

Edit:
Never mind the function, use a global.
Last edited by newt on Mon Jun 27, 2016 6:33 pm, edited 1 time in total.
Image ImageImage
B
168
S
50
G
169
Posts: 8,281
Reputation: 108,191

PreviousNext

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 3 guests