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
70
S
21
G
7
Posts: 827
Reputation: 10,052

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
70
S
21
G
7
Posts: 827
Reputation: 10,052

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
55
S
29
G
19
Posts: 1,520
Reputation: 25,670

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 ImageImage
B
171
S
50
G
179
Posts: 8,391
Reputation: 113,476

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
399
S
236
G
89
Posts: 24,530
Reputation: 195,402


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests