Project link:
What is happening in the project, and what do you want to happen instead?
If you lose in the game, and try to go back to the levels menu, the levels menu no longer work.
Project link:
What is happening in the project, and what do you want to happen instead?
If you lose in the game, and try to go back to the levels menu, the levels menu no longer work.
Putting âwhen game starts create a cloneâ is not a very good idea since every time it switches to that scene it will create a clone.
Iâm not sure, but it could have to do with the ârepeat foreverâs in every âwhen clone indexâ block.
Or it couldâve been the fact that itâs checking for a clone index when you tap it, but itâs made a couple of clones already, blocking the original. I donât think thatâs happening tho since iirc you can tap through blank text objects (lol hopefully this is helpful)
Or it could be a hopscotch bug idk /lh
Edit: lol I couldnât fix it, either Iâm bad at coding or itâs a hopscotch bug. I mean, I did manage to fix it once but it started flashing so it probably wasnât a very good fix
Whenever you do When Game Starts { repeat 10 { clone object } }, every time you enter that scene, itâll clone exponentially (because every clone will clone 10 times each ; 1 to 11 to 110 to 1100 to 4096). This will cause your game to lag and crash for no apparent reason.
The only way to fix this is to do
When (self) total clones < 10 { # will keep cloning until it reaches 10 total clones
Create a clone of this object
}
This will prevent excessive cloning, which is why the menus (and possibly every other scene) kept breaking.
You can also change when game starts to when (self) total clones = 1
to do the same thing, just slower.
So thatâs the design flaw FOR ALMOST ALL MY GAMES, thank you!
But there;s 1 tiny issue, idk how to fix the cube falling when you go back and the score turning all purple
Not sure how to fix the cube clipping through the ground, but as for the score, you just need to add a check once if self total clones = 1. I also recommend moving the when game starts rule above where you do the cloning.
So the when game starts rule actually runs for all active objects (like the clones), not just the original object. Adding a check once if self total clones = 1 will force it to only run if thereâs just the original object (which, if done correctly, will make it run only once for the entire project, until restart)
Do this in all objects where you have cloning involved.
Example:
When Game Starts {
Check once if (self) total clones = 1 {
Do code here # will only run once and only for the original object
}
}
Edit: this may sound crazy, but defining a variable outside a rule only sets it once. To set it every time you enter the level, use a when game starts rule. You never actually reset the YVelocity Local Variable.
Still didnât work, check new versionâs code
What color is the score supposed to be? In the code, itâs clearly set to purple, and itâs purple to begin with.
Its supposed to be white and look 3d with purple
Well guess what: that when game starts rule made all clones go to the same exact location when going back. Like I said, that rule runs for ALL objects, including objects that were already cloned.
So literally like this:
Ok, I fixed the score.
But idk how to fix the clipping cube
I did this (set yvelocity to 0), and it seemed to work, but the cube was still spinning because of the repeat forever rule, which will never make it stop spinning. The best way around that would be to use a variable to control when it should spin or not.
Also, I sometimes get into a situation where I instantly touch a spike on return.
Still confused? Hereâs what the location of set variables mean:
Itâs probably best to keep the solution unmarked until all issues are resolved.
I fixed the spin and clipping cube, but now the cube LITERALLY ascends into the heavens () when it dies when you go back
At least itâs not descending into the underworld. /s
Thereâs always gonna be a problem when you fix a different problemâŚ
So how will i fix it?
Also the cube stops descending or ascending if it hits spikes even if you donât reset the game by menu
Did it die when it was upside down? If so, then a simple switch variable reset will fix that.
Before you say âI already do that at the topâ, that wonât actually work. See the image above to see why.
Yeah, i fixed the ascending cube but the cube wouldnât descend anymore (game is more like bug mayhem)
You also do have a lot of these:
Are they even necessary? One, I can understand, but three?! I know theyâre slightly different, but thatâs besides the point. These do actually add up.
Wait, I just fixed it
I realised the local Y Velocity variable was in the game start so i defined it outside it and it now works
2 issues though