I tried the example and it does work, to make it work for my use, I guess LOAD would be when player dies, and SAVE would be at beginning of scene?
You save condition
If one of these conditions is true
- Player is in collision with checkpoint
- At beginning of the scene
Add here trigger once like i did outside of if one of these conditions is true
Load conditions
- Whenever you spawn player back after he dies
- At beginning of the scene
Add here trigger once like i did outside of if one of these conditions is true
If you don’t have dedicated load button then i guess that is all you need
BTW idk if you forgot from previous example but tilde button left from 1 or up from tab or down from escape reload scene
More likely it change scene to other scene which immediately switches it back to this scene
So you could save while you are dropping boxes with RMB to see them actually still fall down when you load to test it out
I copy and pasted it and hmmm (ignore the boxes not affected by gravity or suddenly stop, it’s intentional)
I seen it because i did it also
You messed either X or Y in your events like you either save X 2 times or Y 2 times or load
Alright now it works, thank you for your patience, I have one last thing for real, I want whenever I destroy a box the box counter value increases by 1, and when that same box respawns the value gets reversed (aka decreases by 1 since it respawned)
Like, when I press the button to delete all boxes, and let’s say the box instances are 40, the counter would show 40/40, and when I press the button that respawns all of them, the counter would show 0/40
Red is what i added since last screenshot
Pay attention that EVERYWHERE variable change action is last
So it runs AFTER everything else in event had chance to execute
So you won’t end up with for example deleting box with left mouse button and waiting 1 frame for it to update text object or not updating it at all unless you destroy another box
So it is happening instantly
I tried it and while it does work I want it in the opposite effect, like when all boxes are there it is 0, when you destroy a box it increases by 1, example:
Start of scene:
All boxes are there
0/40
Player destroys 3 boxes
3/40
3 boxes respawn
0/40
I have 33 boxes on the scene so you do not consider adding new boxes since that was only in my version just for example purposes
And from screenshot above you only change expression in text object
Just so you are aware
You could just pick all boxes at beginning of the scene and store that value to separate variable
And now always subtract from that variable picked instances count
BUT only benefit from it would be that you do not need to put in text object static number of exact count of boxes in my case 33
So like you would not need to know how many boxes you have
But i guess you will always need to know how many boxes are there
And/or you can just check that by printing to text picked instances count
And run game to see how many boxes it displays
And you would not need to count them one by one yourself
I was able to make it in a way that I don’t need to manually do the box count, It now works perfectly, granted so far I only tried it with the Num key conditions but I don’t think it should be different when I put my own conditions, thank you so much!