[r115] Function with object creation

Bugs will be moved here once resolved.

Post » Sat Jan 12, 2013 5:14 pm

When using a function to do any comparisons for objects created within the original function call event, the objects are not available, unless you wait a tick. In fact only the objects that existed before the event are available to the function, even if those objects were destroyed within the event.
Confusing no?
What is expected is the same as if using a variable for a trigger. When doing so objects created in the event are accessible without having to wait a tick, and objects destroyed are no longer available. Even if the destroyed objects are the same.
In the capx the texts show how functions react to not using "wait" compared to using a variable.



https://dl.dropbox.com/u/666516/r115bugfunctionforeachwait.capx
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Sat Jan 12, 2013 9:21 pm

Similar to this reported bug ?

Also doesn't it follow the scope of newly created instances ?Kyatric2013-01-12 21:22:25
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Sat Jan 12, 2013 10:12 pm

Actually I would think it little to do with either.
Scope should be separate as its a different event, and Yanns bug is mostly about the params.
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Tue Jan 15, 2013 3:47 pm

It's the same issue @Kyatric talks about. Calling a function in a subevent doesn't count as a new top level event and does not change the fact the created instance will not really exist until the next top level event has started executing.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests