lionz's Forum Posts

  • 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

  • You can use debug view to see the array, I wouldn't start out by using the text objects to check if it's correct. I don't know what you are attempting with the loop I thought you were simply adding a row of values so set value should work and you should see those values in debug view.

    Something that might be useful, to add a new row you can push the first value to the back of the array which creates the new row, then the other values you set at (array.width-1,1) (array.width-1,2) etc because the width (number of X rows) of the array is always 1 more than the highest row since they start from 0, i.e. 3 rows 0,1,2 have a width of 3

    When you have managed that then you know how to add a new row of scores at the end of the level.

  • Yes you would set the data at 0,0 and other data at 0,1 0,2 0,3 0,4. Then the next row is 1,0 1,1 1,2 1,3 1,4 like a table. You can learn more by doing than explanation, practice with the array object.