How do I create a list of commands and then execute them?

  • Hi, there. I'm facing a trouble since I´m into a project where I need to save a sequence from 1 to 5 moves(up, down, left and right) and then execute them. The player must be able to select again and again (rounds). I've tried to save the commands intro a array, but it was unsuccessful.

    Thank in advance!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I had done a "Simon says" type of game that "saves" the type of button clicked in C2.

    You can check it out : scirra.com/arcade/tutorial-games/simon-says-2083

    It will be effective on the sequence aspect of things I believe and storing "moves" in an array.

    How to effectively do the job though depends on your project, and how currently your player is setting the actions.

    This will affect exactly what values you are going to save, and how you are going to reproduce your sequence "automatically" afterwards.

  • Thanks a bunch. It was helpful, but it didn't exactly solve my problem. I am trying to produce a 2D game such as LightBot which the player sets a sequence of commands then execute. I really don't need to compare the sequence, I need to build a sequence and then execute in a way my player moves according to the commands over the board. I don't need any comparation, I just need to save in an array and execute.

  • The simon says example do save the generated sequence and does play it back.

    That's what you are looking for and want to adapt to the specificities of your current project.

    If you provide your c3p, it will be easier to determine exactly what modifications would be required.

    But in theory, you have all the logic you need at your fingertips already.

  • I understand what you meean, however I can see it. It might be my lack of experience. :/ How can I provide my c3p?

  • I don't know if I made myself clear. I need that the playerinput a sequence of movement and a Sprite moves according to this sequence to capture a flag.

  • I understand what you meean, however I can see it. It might be my lack of experience. :/ How can I provide my c3p?

    Upload your file to an online file hosting service (for example dropbox, or google drive) and post the public link to the file in this topic.

  • First of all, thanks for all the support.

    Here u r

    drive.google.com/file/d/1Adu25Ta7kIRLttIQQJAlh4NMTjtCgC8m/view

    Let me know if it is working, please.

  • Well, your project allows to move one player with the arrow keys.

    Is that the sequence you are willing to save ? What keys are pressed, in what timing, and apply those to the other player as well ?

    I'm sorry, but in the end it is very vague what you are exactly attempting to do in regards to what you currently have implemented.

    Provide as precise details as you can about what you are looking to do, what you experience your current project doing and how it differs from what you are willing to do.

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