codah's Forum Posts

  • caiorosisca, yes this should work as what you are doing is essentially adding another UID to the object. It's not necessary because the object already has a UID

    They are different, because UID's are not guaranteed to be sequential. But it is the same as IID + 1.

  • Can you explain that one a little better. I feel like I should follow you but at the moment I don't haha.

    It's an advanced concept, you might want to wait until you have the basics. But here is a tutorial.

    https://www.scirra.com/tutorials/1063/how-to-improve-your-construct-2-code-with-callbacks

  • The family idea seems a good one if you have the full version.

  • Maybe i've just missed the "move to object" option in the Z options... in that case, you're allowed to insult me.

    Ok. You suck. But yeah there is an option to set behind/in front of another object.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • i tried using pathfindin but then i can't make him move from its place

    Please explain

  • See if this helps

  • Without diagrams, .capx or more concrete requirements we can only guess, for example, how you expect a grid to be like a circle.

    Using arrays for grids is not mandatory, but is common given that a 2d array does logically map to a 2d grid.

    So assuming arrays are the go, you can contain a lot of information in an array element to describe each grid space. The simplest would be a single value to denote what the grid space 'is'. For example a zero could be an empty space, which is one way to get your 'grid with hole' you mentioned.

    You could also have a string/text in each element with each character meaning something. For example "0100450899" could mean 'a space with color w, texture x , height y and width z, or whatever.

    Basically it's up to your code to interpret the array contents and draw the grid appropriately. If that's what you mean by 'manipulate the grid with variables'.

    You could also have separate arrays to hold different information about the same grid. The possibilities are endless.

  • I've found it useful to use the IID occasionally but I forgot you could index sprites like that. Thanks for the reminder.

  • You could alternatively use animation frames for the squashing

  • Hi welcome to the forum. You can search the manual and tutorials online to find out these basics.

    https://www.scirra.com/manual/124/system-conditions

  • Why can't you just set the value of the global as normal using System:Set myVar to 0? or similar

  • Yes exactly I didn't see those lines at first either

  • In event 31, 32, 33 you're changing pistol.currentAmmo. This is supposed to always remain 11. You should change the array value instead.

    Edit: I would make those index values global constants so you can't make this mistake again. You're repeating them in each weapon type anyway. If you had the paid version you could use family instance variables (but they are not constant).

  • Ok in your first post you said width is 12 which didn't sound right.

    To save a .capx, choose "save as single file".

  • Are you able to post a .capx?

    You might be using your array indices around the wrong way (confusing X for Y). Also make sure both Width and Height of the array are set correctly. Why are you jumping from using array Y index 1 (clip) to index 11 (ammo)? And remember C2 is silent about incorrectly used Arrays..