Function call not executing.

Get help using Construct 2

Post » Thu Jan 19, 2017 10:17 pm

I followed this BUG report.

viewtopic.php?f=152&t=186028&p=1092719#p1092719

Now, i am not supposed to write in a closed bug report. But i found this one very intriguing.
I understand why it is closed. Lots of events, and they are a bit done in a way that i would not do. Yet, they are very simple.
Nothing new, just functions calling functions. No reason to (almost every one in here is smarter then i am) run away from it on first glance.

I added logging with the browser plugin. You can find them easy with the search function. Reducing everything to a few events.
I added a 'alien' function call.

Follow the instructions as given by the OPP in the other topic.
Bring up the console in the browser.
You can clearly see that there is a log entry before calling the function, but no log entry from within the function.
Conclusion, the function is not called (the first time).

Why?

Would appreciate if you look into this. Because i dont understand it, and it makes me distrust functions.

Thanks.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Fri Jan 20, 2017 3:28 pm

I too am curious. HOWEVER: I looked at the capx - although it's all basic stuff it is also a horrendous and thinly-commented mess. I can't help but imagine whoever kept this project is very capable of making mistakes, and in code that messy they are easily hidden.
The LEVEL GENERATOR TOOLKIT



24 functions dedicated to producing randomly generated terrain for all kinds of games.
B
25
S
7
Posts: 247
Reputation: 2,318

Post » Fri Jan 20, 2017 3:32 pm

There are mistakes in there. Yet, it comes to that point that the function is called. Browser log actions right before that function call do log in the console, but the function is not called.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Fri Jan 20, 2017 9:16 pm

There are two places that function is called
Events 329 to 332 for the first screw
and events 318 to 321 for the following screws.

It can be obseved that no function call works in events 329 to 332. Explination? The function object isn't picked, and the cause is the "or" event on line 323.

Comment and link to new bug:
viewtopic.php?f=152&t=186028&p=1092988#p1092988
B
94
S
33
G
118
Posts: 5,395
Reputation: 75,851

Post » Fri Jan 20, 2017 9:35 pm

Thank you Sir for figuring that out and for the following up BUG report.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 8 guests