function call in subevent doesnt keep SOL (110.2)

Bugs will be moved here once resolved.

Post » Thu Nov 22, 2012 4:45 pm


i would expect that a function in subevent would keep the selected object

in this example both objects are deleted instead of the one clicked on

(purely as simple example)

https://dl.dropbox.com/u/61666915/functioncall.capx
ImageImage
B
61
S
19
G
6
Posts: 809
Reputation: 9,028

Post » Thu Nov 22, 2012 4:54 pm

i just realise that no matter what, no picked objects are passed thru function, is this wanted? in classic you could keep picked objects...

like when you have a collision with an object you can pass this object to the function
ImageImage
B
61
S
19
G
6
Posts: 809
Reputation: 9,028

Post » Thu Nov 22, 2012 4:56 pm

It's not supposed to. It was one of the bugs fixed in r110 :)
[quote=r110.2 release notes]Bug Fix
Function: in some cases the called function would still reference objects picked from the event calling the function. This was not intended; now function events start picking instances from scratch again.
[/quote]
B
54
S
28
G
18
Posts: 1,520
Reputation: 25,020

Post » Thu Nov 22, 2012 4:58 pm

That's the expected behavior.
If you want to emulate sol selection use the pick nth, or pick by uid conditions using the parameters of the function call.

Also we have on created, and destroyed triggers that do remember picked...
Just so you know.
Image Image
B
161
S
48
G
91
Posts: 7,359
Reputation: 67,273

Post » Fri Nov 23, 2012 1:02 am

Closing since this is currently by design - functions do not use the SOL from the calling event.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,630


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 1 guest