Will the "Line of code events" feature be useful to you?

  • Will these events be useful to you which are - "On nth action executed","On nth condition executed" and by which people would be able to detect when a certain action or condition(determined by their line number) is executed and what should happen after that,I know that this feature has certain problems and for some of which i have written some solutions which are in the website https://construct3.ideas.aha.io/ideas/C3-I-690and i request you to provide suggestions on how to solve the problems of this idea and on how to improve this idea as if implemented this feature can make developing games with Construct 3 easier and faster and i plan to resubmit idea again by 10th Febuary to the Scirra Ideas Portal

    Cheers

  • How would something like that work with functions, or things like recursion, loops?

  • What I was getting towards in those comments on the idea is: I'm afraid I don't think this can be made to work well at all, even with mitigations. The equivalent feature in programming languages would be something like "on Nth line of code run". I cannot think of any programming language that has ever done that - for the good reason of it being incredibly easy to break with even minor changes. Code (or events) is only reliable if it doesn't depend on where it is. This makes it fundamentally depend on where things are, which is unreliable.

  • sorry to say, it just sounds like a horrible idea :)

    (just add a value to a variable every time you run the specified action, and you can then use on nth action togheter with that variable..?)

  • I cannot think of any programming language that has ever done that

    Basic:

    10 print "Hello world!"

    20 goto 10

  • To the OP I'd suggest that you please break up your writing into shorter sentences. And try to group and list your ideas together, maybe combined with some pseudo-code. People then may be able to talk with you about other options. Because I think Ashley understood your original suggestion and pointed out the unusual, brittle nature of it. (outside of BASIC, as Newt awesomely points out!)

    Construct event sheets are a unique animal themselves, but still they offer loops and functions which are so much better for managing control of flow and structure of software.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • GOTO is a different feature to the one suggested here - its event equivalent would probably be "go to event number". And that still has all the same brittle, game-breaking pitfalls. BASIC worked around this by using multiples of 10 as line numbers, so you have room to insert extra instructions in between without breaking the number sequence (events have no equivalent). Other languages use labels instead of line numbers (events also have no equivalent). Most modern programming languages use more sophisticated approaches to control flow, like if statements, loops and functions, in order to completely bypass the many problems of goto-style logic - and events have equivalents for most of those already.

  • Lately I have been trying to get organized in my code. For my procedural level generation I am bundling environment generation into functions to keep things tidy and ensure they create in a very controlled way. One Function finishes (inline) and at the end calls the next Function and so on. If a certain biome is dry for instance, I skip the create water function.

    I find myself using these functions more and more to control event flow.

    • Signal
    • Function
    • triggering off of a global variable change
    • occasionally counting ticks
  • Actually "Wait for Signal" might be pretty close to what the op was thinking of.

  • Actually "Wait for Signal" might be pretty close to what the op was thinking of.

    I think so too

  • I have got an idea in which instead of using the "On nth condition executed" and "On nth action executed" to know when an action or condition is executed the user can assign tags to the actions or conditions which the user wants to and then type the tag or tags in the events "On tag executed" and "On tag executed nth time" along with a name for identification and if these events are added in Construct in Construct the user by using these events will be able to know when one or more actions or conditions are executed and will also be able to specify what should happen after an action or condition is executed once or more than one time.

  • That sounds like the labels feature, but in reverse. I still don't see how it would actually be useful in practice. No programming languages have equivalent features, presumably because it is not a useful thing to do. What kinds of events are difficult to ceate with existing features but would be made easier with this?

    Also you are still writing as a single long sentence, which makes it very difficult to read your posts.

  • By tagging multiple actions and then entering their tags in "On tag executed" events with the help of AND sub events the user can detect when certain groups of actions are executed and by by using events the user would be able to more easily define what should happen after that.

  • Hi,

    A good programmer NEVER uses GOTO in his program, it's not clean!

    A good program uses procedures (function) instead!

    To detect if a code has been executed, use variables!

    I think you're not taking the problem properly.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)