Request: Text Notepad for Events Reference

0 favourites
  • 8 posts
From the Asset Store
Change delay, create new lines, "backspace" the text
  • As construct2 projects get more complex and you are using many constants and arrays to reference data (for example), it would be good to be able to launch "post-it" type windows outside the editor that can hold either text or a render of the events - You can only copy paste event or variable lines in the editor.

    The problem is that event editing is modal. So you have to remember the global variables and constants when using them - Not always easy for the best of us.

    I'm finding myself doing screen grabs and pasting them in to documents so that I have a reference alongside the event code I'm writing. A bit of a faff (perhaps an alternative is to get a text render equivalent in the clipboard?).

    So, some way of being able to copy/paste or reference variables and function definitions when editing an event would be damned useful (unless I'm missing an intellisense keyboard trick somewhere).

  • why not using comments, you can put one right before/after the function you're using to help you remember what it does

  • Comments for the win :) You can hit Shift+Enter to enter comments on a new line in same comment box too.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can't copy paste const / event definition lines in to a comment block. I don;t see how that helps (quickly). To put this in to some perspective. I'm using arrays as the closest thing I can find to a data structure (perhaps object graphs are another feature request?). Anyway, to make array handling more readable I use constants to reference array indexes. That way, when you want to introduce a new property, you haven't got to go an rehash indexed look-ups. Event lines like...

    set rank to Ranks.At(Player.At(PA_RANK),RA_RANK_NAME)

    (In the above example, trying to simulate object instance and property lookup, the first array index is equivalent to an object instance and the second the property I want). I know I could disappear down a customer plug-in route for my own object graphs, but I quite like trying to use the tool native as supplied.   

    As you can probably guess, you end up with a long list on constants for array indices to mimic field references. If you want to re-jig the array entries, you change the constant.

    Anyway, I think the modal editing of events does make obfuscation approaches like this an act of good memory. Another alternative may be to list constants in the objects window. Anyway, a request / suggestion.

  • I'm not sure why you're having trouble with that, because you can use the expressions panel to see a list of all variables you can use, and you can also set a comment on individual variables which is also displayed beside the variable. Doesn't that do what you want? Combined with ordinary comments (press Q), surely you can have comprehensive documentation all through your project? Failing that, some notes in NotePad couldn't hurt.

    Alternatively you might want to use the Dictionary object instead of Array. If you're looking up the rank name associated with a number or code, that's much better suited to Dictionary lookups than Array.

  • Cool - How can I get the expressions panel to display constants, all I see are objects?

    I do have documentation throughout the project, but the globals (constants) are at the top and the functions et al down the bottom.

    Your suggestion on notepad is exactly what I have suggested except it would be good if you could paste copied events in to notepad - I can't.

    I am using dictionaries for some data look-ups, but the data for the game is held in tabulated arrays (It's a trading game). I had toyed with the idea of dictionaries with compound keys for data look-ups. I might go back to this. I just thought arrays and constants would be quicker given that the dictionaries will end up quite large (cities x commodities x properties) and continuous market simulation ending up somewhat laboured (compared to a quick numerical array index look-up).

    Just a thought Ashley - Can you get a text representation of variables and events in to the clipboard for pasting outside construct2? Might even help with people supplying issues / helping answer questions without uploading capx's

  • All variables are listed under the System object.

    Unless you're reading/writing 100,000 elements per second, the performance difference between Array and Dictionary is probably not important.

  • D'oh!... Thanks :)

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