lionz's Forum Posts

  • Just think of the array like an excel spreadsheet, you store data as cells with rows and columns. No you don't store it in variables but you need to get the data from somewhere I guess you already have events for that. So if the row is X=1, then you set the data at 1,0 1,1 1,2 etc

    For saving it depends how you are already saving the game. If you are using system save/load then array would save/load with that. You can export a whole array as a JSON string though and store this in local storage if you need it.

  • Assuming you have all that data stored in other variables ready to go you would create a new row of an array (push the data to the back of the array) and set all the data across each column. You would also need an additional check if you have 5 rows (array X size) then you can delete the top row so you only ever have 5 entries.

    To display it in game you could have the text objects with variables that relate to co-ords of the array and then display that info, so text where variables are 0,0 for x and y display array.at(0,0), so of course in one event for all texts it's something like set text to array.at(text.var1,text.var2)

    If any of that confused you I would check out the array tutorials some more, adding data to an array is fairly simple stuff when you have tried it a few times.

  • Using the min/max values could be more efficient and less work than placing sprites, it takes away any of the placement problems. Whether it would fix the glitches is difficult to say as it depends on the cause. The issue could be with the enemy's own collision box, the environment collision such as the floor, or physics related values on the platform behaviour, FPS as you mentioned, or conflict with other movement related events on the event sheet.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • In general you would use a global variable, set to 0 could be default and unequipped and set it to 1 means you have the weapon equipped. It depends on so many things though, if you change the animations of the character or you pin a gun to the character, and if you can equip different types of weapons or if it's a very simple game where you equip/unequip a gun.

  • You'd have to sit down with your design and work it out. To give money every second you can use system every X seconds action and add to the Money variable.

  • You can use a layout per level. For the event sheet you can create a unique one per layout if you expect it to be very different, and then 'include' a main event sheet that has all the common events like player movement and animations etc.

  • Yes Waits inside the function makes sense, that's probably why the picking is broken. Didn't share the functions though.

  • Probably you are not picking instances with the other events but we can't see them. If you change variables only then it will be fine. If it forgets the picked instances then it must be down to the condition which is from Construct 2, not really worth breaking down why that does or doesn't work as it's difficult/impossible to recreate.

    You should use the Construct 3 functions, or potentially as a workaround store the UID of the instance in a local variable amongst your other local variables that means at least you don't have to rely on picking from the event which is running every tick. If you have saved the instance in question as a local variable then nothing can really go wrong.

  • The skill set up function does what? Check an instance variable on the player? I would skip using functions here and just use a condition, player has skill.

  • This looks quite old to me so it's Construct 2 yeah? What UID is it showing in the browser logging? It may forget picked instances if it runs that condition next tick but looks like Construct 2.

  • You can use 'is overlapping' if that fits your game, that's up to you and how you want to detect collisions.

  • Well you said the work is almost complete on the shop, what did you mean by this? Buy and sell mechanic depends on the design of the game.

  • You can create a UI layer by setting the parallax to 0,0 in layer properties. This means that objects on that layer won't scroll and will be static on screen

  • Hey lionz, I've finally finished my first game. Check it out

    https://www.construct.net/en/free-online-games/dodgem-xo-43762/play?via=c7

    Nice job! :)

  • Make them wider than the enemy, or on the events instead of using lubu.width come up with your own value lower than 94