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
65
S
19
G
7
Posts: 814
Reputation: 9,691

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
65
S
19
G
7
Posts: 814
Reputation: 9,691

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
28
G
18
Posts: 1,520
Reputation: 25,315

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
164
S
49
G
139
Posts: 7,969
Reputation: 92,404

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
378
S
220
G
84
Posts: 23,871
Reputation: 188,227


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 7 guests