oosyrag's Forum Posts

  • What is your stick? Is it a controller's analog stick (gamepad object), or did you create a touchscreen analog stick with sprites?

    The formula for getting angle in degrees from coordinates is atan(changeinY/changeinX)

    If you are making your own touch analog stick - compare stick's current position to the origin position to get change in Y and change in X, use the formula to get your angle from origin, and then use Move At Angle.

  • You need to set the angle of the particle effect when your character turns around.

    How are you having your character sprite turn around? If you are using mirror, add an extra action whenever your mirror your character, use Particle: Set Angle - 180-self.angle.

    Or you can use a variable to keep track of which way your character is facing, and change the particle angle whenever that changes.

  • Add a "System: For Each - Unit A" to your very first condition.

  • Try starting with the basic example. Go to New Project, and look for Example: Touch - Panning.

  • Use the action:

    Move at angle
    Move the object a number of pixels at a given angle in degrees[/code:j92xkjfx]
  • If you are creating the doors dynamically off screen as the screen moves -

    Create variable NextDoor.

    When a door is created, add 1 to NextDoor.

    If NextDoor > 12 - Set NextDoor to 1

  • I was assuming you were saving the JSON format to disk or webstorage/local storage, then using an AJAX Request to load the saved data. Then you can access it with LastData. Also assumed your JSON data came from an array to begin with.

    For reference for your array load question, if you have the ""{"c2array":true,"size":[7,2,1],"data":[[[1286],[885]]... ect" data (JSON format of array data) in GlobalVariable, you can use Array.Load on that GlobalVariable.

    But glad you figured it out anyway!

  • Short answer is yes you can.

    I think you don't need 8-direction or bullet behavior on the cars.

    Try to break down exactly what you want happening to the cars. When you tap, it is going to move right or left a set amount. First start with the movement action, then add the rotation action after.

    It may help to add an Instance Variable for your car to record if the car is currently moving, and if it is moving left or right.

    I've put together a quick example for you, try your best to figure out how it works, and then add the angle change of the car object. It might help to read about expressions - https://www.scirra.com/manual/78/expressions.

    https://www.dropbox.com/s/ttnepv7yyc3yl ... .capx?dl=0

    Good luck with your game! There will be a lot of things to learn about programming but it will get easier with practice.

  • If you are saving an array as JSON, the cleanest way would be to use the Array object's "Load" action to load it back into an array.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • For basic projects, local web storage is probably the cleanest and simplest.

    However, you seem to be looking at a multiplayer game. What are you using for your backend/login/id? If you make your own server or use a third party one, you should have no problem saving information to that service.

    I haven't explored multiplayer myself lately but I did have https://parse.com/ bookmarked as a resource, except I think that project got shut down. https://www.firebase.com/ seems to be an alternative.

  • Have you tried the tilemap object? https://www.scirra.com/manual/172/tilemap

    Also Tiled is a great free tool. http://www.mapeditor.org/

  • https://www.scirra.com/manual/119/touch

    You can use the Nth touch and TouchID expression to get the X and Y locations of your first and second touches. You can then store those positions in variables to use as comparison to see if your new touch position is bigger or smaller and by how much and scale accordingly with LayoutScale.

  • len(x) - return length of the string x

    As Gumball said - make a variable to store the current state of the text box, only if the length of text is equal or greater than what it was previously.

    System Compare Two Values - len(TextBox) < len(TextVariable) - Set TextBox to TextVariable

    Else - Set TextVariable to TextBox

  • An array of size 1, 1, 1 starts with 1 blank cell. if you push 4 things to it, it will then have a width of 5. Try starting with array size of 0,1,1.