lionz's Forum Posts

  • I guess I should've asked for a screenshot haha but the way I would do it is this - have a variable for the array position, I guess you have this called ID. Then another variable for whether it is locked this is set to array.at(variable1) 'for each' button. This should leave the buttons with 0 or 1 for variable2.

  • Ok so you went with the array option that's good, can you elaborate on this part : I have an event that checks the array slot corresponding to the skin with the ID (So Check X -> if SkinButton.id = 1, do actions). What does the event look like? I know how to resolve this, that's why I suggested an array I'm just wondering what you tried here and where it went wrong.

  • What's the problem? I see it run once add data to the first line, nothing happens after that.

  • The loop looks reasonable to me. The wait wouldn't do anything but shouldn't affect anything either. You say other objects work, in a different loop ? Compare the loops.

    The Browser object, add it to the project like you would with a Sprite. On the actions inside the loop you can use the log action to log RSLoop. You can then see in F12 console during the game if it prints out 1234123.

  • You can't do it because you need the 35 conditions to check if each global variable is set. You can't create the variable name in that way. If you used an array for the data probably you could do it in one or two events.

  • You'll have to expand on that explanation. You can right-click on a sprite and Clone it but I guess this isn't what you mean.

  • The logic I sent removes the first row, then they bump up, then a new row is created at the bottom and the scores are written in that row. Until there are 5 rows (table is full) it doesn't do the top row removal.

  • I wonder if it's not possible to use a function instead of a button to add data. I did a test and it always only writes to the first 4 fields (first line)

    You can put all the logic into a function and call it when you press the button if you want, there's no difference. The second bit I don't understand or the problem you are having.

  • I think better to share the project file. Fixing the position first will help, as mentioned above check the origin on the blue sprite. That is a separate issue though because the overlap is done with the purple sprite. Look in debug view at the variables I guess.

  • Why do you have two actions for set position?

    If the guard doesn't touch any yellow squares and the default is left then he will keep moving left.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Create a sub event and compare on reload : if (maxammo-clipammo) greater than ammoleft, add ammoleft to clipammo and set ammoleft to 0. ELSE do the previously mentioned logic.

  • As mentioned if you are using system save/load then that is good enough. If you want to use local storage then you can save the array as JSON string and load from local storage when launching the game.

  • When you reload subtract (max ammo - clip ammo) from ammo left, then set clip ammo to max ammo.

  • To me that looks ok, maybe the spawner object doesn't have those image points for the current animation? Also you can try using the Browser object to log in console the values of the variable and see if they are as expected.

  • There I made a file : dropbox.com/s/3i3937n3ekzgf6i/add%20row.c3p