Switch from Code Blocks to Line Code

0 favourites
From the Asset Store
solution for games like "fruit ninja" and drawing applications
  • I thought I posted this from mobile but can't find it so here goes. It would be nice to have a simplified way to copy/paste code as well as organize or change the arrangement of the code at any line, between any line or move similar groups of code into groups within the code. I have found no easy way to do this with the blocks its like once its written its there and that's that, you have to actually re-write it if you end up with similar code scattered throughout an event sheet. It is possible to write the event sheet on paper first but in my experience the creative process does not stay within nice neat pre-ordained boundaries, something will always get added or changed in some way and being able to switch from blocks to line would help immensely with this. There is another editor that accomplishes this (I want to say it was AGS but don't quote me on that) and I remember that it was an invaluable asset when it came to troubleshooting, organizing, copy/paste and/or changing code in any way.

  • Have you tried to copy, and paste events?

    Have you tried to drag existing events?

  • Dude, you got to go to manual and tutorials section and learn the basics of how editor works. You can drag and move, copy and paste, call functions and there is search too among many others.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Clearly you can drag and drop code etc.

    I'd like to see shortcuts (e.g. tab and shift-tab) for indenting and un-indenting code (abit like in visual studio or an outliner).

  • Dude, you got to go to manual and tutorials section and learn the basics of how editor works. You can drag and move, copy and paste, call functions and there is search too among many others.

    I appreciate the response but I have tried copy and paste ten different ways and being that thus is truly not a scientific issue in terms of user functions it stands to reason the system is flawed here by the fact that anyone should have to address this as a problem at all. Further more a tutorial of any kind should not be required for the most basic of functions, for instance ones they teach in grade school now. Also I do read the independent and highly scattered (topic wise) tutorials, I am knee deep in several right now so it does not seem unreasonable to me at all to ask for help or to make suggestions on certain things. I know about drag and drop with the icons and such but was unaware of this feature in the code blocks. Nice system and dude sorry if I caused you any grief by answering my humble post.

  • Are ctrl-c and ctrl-v not working for you? If not, maybe your keyboard isn't working? You can also right click to get a menu to copy and paste.

    Ctrl-c and ctrl-v are used in practically every program everywhere, so C2's manner of copying and pasting isn't different from the standard.

  • > Dude, you got to go to manual and tutorials section and learn the basics of how editor works. You can drag and move, copy and paste, call functions and there is search too among many others.

    >

    I appreciate the response but I have tried copy and paste ten different ways and being that thus is truly not a scientific issue in terms of user functions it stands to reason the system is flawed here by the fact that anyone should have to address this as a problem at all. Further more a tutorial of any kind should not be required for the most basic of functions, for instance ones they teach in grade school now. Also I do read the independent and highly scattered (topic wise) tutorials, I am knee deep in several right now so it does not seem unreasonable to me at all to ask for help or to make suggestions on certain things. I know about drag and drop with the icons and such but was unaware of this feature in the code blocks. Nice system and dude sorry if I caused you any grief by answering my humble post.

    HA! LOL

    Forget about what they taught at school. You have a tool, you got to learn how to use it.

  • I just realized - you might be trying to paste something where it can't be pasted, like some text when the expression editor isn't open, or you might be trying to paste a condition or action without an event selected, so it doesn't appear?

    Edit - also, c'mon, he's having some problems using the program, let's just help him with it. Loling at people will probably just cause hurt feelings.

  • actually copy-paste is not straightforward.. there are a lot of places where you can't paste things.

    for small sections, I copy and paste them and they fall to the bottom of the code block.. then I can just drag the new lines to where I want them. that always works.

    for entire code blocks.. they seem to work more reliably.

    if the paste doesn't work, then you're trying to paste into the wrong section. I find this happens a lot when you try to copy a fragment of a conditional code block and the conditions aren't right.. then it blocks it.. combo's like that are annoying if you don't know about it.

  • I copy and paste all the time and select section if code to move around also. the only time it doesn't work with pasting some code elsewhere is when I have an event that I want to make an subevent of there are certain ones that don't allow it to be made into subevents. So if the event has a arrow in front if it you won't be able to make it an subevent. To move an event around all you have to do is click the empty area in front of the event and it will select all the child code with it and you can move it up an down. But again if the event doesn't work with the else statement and you try to drag it there it won't work.

  • I totally get where OP is coming from. I had the same issue when I started using Construct. You need to understand how C2's code is structured and you'll understand very well where you can paste different type of blocks and where. Just try stuff and get used to it.

    CTRL + C, CTRL + V are just second nature to me now.

  • Mega, you are a real treat. I am a college instructor (although not in computers or academics) and you strike me as the typical type of soul who cannot help anyone else because they are all beneath you while at the same time being the one who disrupts the class with your superior knowledge of all things.

    As for copy and paste it is not rocket science, I can use it fluently in most every program I have ever used - except this one. That may be my fault but it does not deter the fact that the method in use here is not in the mainstream or else it just does not like WIN8.

    As for reading tutorials I am quite capable of this and this is what irritates me about it. I had this working then rearranged some things and now it does not work. I have found that at times simply changing, adding or deleting code does not activate properly when testing the game. Its as if the whole thing is stuck in the previous scope and unable to update to the new commands.

    I just want to know why this does not work when every tutorial I have read says it should.

    I am trying to post the dropbox URL for the .capx but now I have to have 300 rep to do that, how in the world can one do what is asked of him when all that lies in the path are obstacles????? I figured out how to open the line code but it really does no good if I cant get the characters in the layout to obey them.

  • I have basically copied the tutorial and it still does not work. If I am missing something it is something small and it is not in any of the tutorials. The only thing I don't understand is the red X in front of "is alerted" because nothing I chose in the options gave me that outcome.

  • Spindraft right click on the alert statement and in the list of options choose invert and it will change the statement to not. This is what is used for changing a statement to false. 'If alerted' is true when you invert it adds the X meaning 'if not alerted' which is false. So basically if the Enemy is not alerted do this.

  • You're also adding obstacles to the line of sight behavior instead of the pathfinding behavior. An obstacle is not universal between behaviors.

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