locohost's Recent Forum Activity

  • Another reason to not use functions so often.

    Ok this was going to be next question: Should I even use functions at all? I've been coding for my main hobby and professionally for literally 37 years. This makes me think of everything in C3 as "code" and that's really probably wrong.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Ok "Signals" are broken. This won't work.

    You can't nest Signals. If in a toplevel pick event, you try Function.Call, on line right after set "Wait for Signal" (WFS). Then in the called function, do another Function.call, next line set WFS, the second WFS never triggers. I have a logging line (writes to textbox) right after and you never see it. And yes there are Signal "..." at the tops of the functions so that's not the issue. And the Signal strings are in global Constants so no, its not an incorrect Signal/WFS string issue.

  • Ok I think I see how this works. I have to use "System > Wait for Signal" and "System > Signal" to simulate JavaScript "Callbacks". Just did a quick test and I think this is what I want.

  • So question, maybe this is answer: Does Action: Function.Call block and wait until function called finishes all events and actions and returns before continuing to next Action after call?

  • See below. The function below is called from another function after 3 Monster sprites are created and some instance variables (their inst-vars come from Family) are set. There is 100% definitely a Monster with key=10. I can see it clearly in debug, but it never gets picked. What am I doing wrong?

    Tagged:

  • It means the next pick at the same level will remove the last from the sol, and then default to the zero index if referenced again.

    Also, functions always break picking. You have to re-pick in the function call using an id in a param.

    Then again Ashley is doing some refactoring on the plug, so that may change soon.

    What is "sol"?

  • Yes I am sending in a UID to re-pick in the function. I would not expect a function to see any external picks.

  • Also, nearly all of my "code" is in functions. Does this make a difference?

  • Ok, yes that does make sense. Thanks :-)

  • Ok newt, let make sure I follow you:

    You're saying if I pick an object, then pick same or any other object at same level this "breaks" picking. What does "break" mean specifically? Does "break" mean: Each pick at same level cancels (un-picks) any prior pick? So if I pick in subevents, I will not break the prior pick?

    So like...

    Pick ( SomeObjectA ) by-whatever

    ---- Pick ( SomeOtherObject ) by-whatever

    -------- Pick ( AThirdObject ) by-whatever

    ------------ In this pick subevent I will still have all 3 objects picked

    But if I do above like this...

    Pick ( SomeObjectA ) by-whatever

    Pick ( SomeOtherObject ) by-whatever

    Pick ( AThirdObject ) by-whatever

    ---- In this pick subevent I will have AThirdObject picked, but break/lose the first 2 objects picked?

    I'm assuming if you ever (regardless of same level or subevent) pick same object again, you lose the prior pick. Yes?

    Thank you for helping my friend! :-)

  • When I pick an object, does this create a scope? Meaning, in order to correctly reference the picked object, do I have to put each referencing event/action as a sub-event of the pick? Or will any subsequent event (just following, not in a sub) have a correct reference to the prior picked object?

    Thank you for clarifying :-)

    Tagged:

  • Post subject describes the issue. Or am I doing something wrong?

    * I open any .c3p project from a local file

    * Do some edits

    * Click [ Ctrl ] + [ S ] and C3 tries to save to cloud storage.

    Why? Why doesn't C3 save project back to file I opened?

    Tagged:

locohost's avatar

locohost

Member since 19 Sep, 2014

None one is following locohost yet!

Trophy Case

  • 10-Year Club
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

14/44
How to earn trophies