lionz's Forum Posts

  • On button clicked > set animation frame to self.animationframe+1

  • This is a common issue with conflicting animations playing. On your press A and D events you can add a condition 'jump animation is not playing', this means it will not try and play the run animation when you are the in air. Or in your case because you used a variable you can instead say 'isJumping=0' as the condition.

    You also have another problem where you set idle to true when you start the jump so it will try and play idle and jump together so remove this. You should not have an idle variable, instead use 'player not moving' play idle animation.

  • Maybe it's time to share the file?

  • You'll have to debug it then. There's loads to consider. Did the file get imported into the array correctly and before this event was run? Check the array in the debug menu. Is it failing because the variable is in a wrong format or just incorrect value? Use the Browser log action to print out some things during the event to see what it's finding in the array and if it's expected.

  • When you go for each x (row) then you are looking for a curX not a curY. CurY would be the same like 0 or undefined. So almost there, if you are iterating each row then you want array.at(array.curx,0) and array.at(array.curx,1) in those events.

  • > You are right this is missing and also from the store. Hmm kinda inspiring me to have a go and make a template available in the store.

    Humble reminder that I've created a dedicated plugin for this a while back: https://www.construct.net/en/game-assets/addons/inventory-aid-960

    Ok fair enough I couldn't find this, I think it needs a more suitable name than Inventory Aid. Good job though :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The layouts reset by default. What you are looking for is the 'Persist' behavour. Add this to any objects you want to retain their position or variables and they will be the same when you go between layouts.

  • Use 'on created' condition to pick the one that was just created then apply actions and see if it works.

  • You are right this is missing and also from the store. Hmm kinda inspiring me to have a go and make a template available in the store.

  • I don't see how you could ever load a proper game with this logic. In the same layout where you are trying to load a previous save game, it is saving over it every second. So unless you manage to click the load button within 1 second you've already lost your save game.

    As for a fix it depends on the game design but I would definitely only save every second during the gameplay, not on the same screen where you are trying to load games, so move that autosave to the layout where you are playing the game.

  • I'm wondering how you could ever get it to appear 3 times in a row? Seems like twice would be the most possible. I think your approach is fine though just reshuffle if it's the same, that would also be my first approach to this.

  • That loop appears to be running constantly and doesn't relate to when an item is picked up? Also the condition is strange it's checking specifically 0,1 is empty, is that the intention? Since the For implies it is running through all columns then you want to check if (0,loopindex) is empty which would check 0,0 0,1 0,2. Later I noticed the global variable item, if you are trying to use this to not run the loop when global variable is empty then it needs to be at the top level of the loop.

  • Yeah you've added there 3 columns, it didn't work earlier because you only have 1 row. That array does not have a width of 3 so you've changed it somehow with events.

  • Width is the rows(X). You probably have events to fill the array that affect the size.

  • So you mentioned that the array size is 3,1,1 but from the screenshot it's 1,1,1. So because you checked in debug mode you can see why the icon logic won't work as FireEx doesn't exist in the array, in fact row 1 does not exist.