Game getting freezed

I followed Kento Techno Armory tutorial
Everything work fine but when i hold space for few seconds, armory keep getting freezed( Krom and both Html5 get freeze.(can’t uplode file because of being new user).

It could be some buffer issue.

@MagicLord can you explain it? does it has to do with my code or is it bug in armory.(when i said armory keep getting freezed, i meant the game not blender . just to be clear)…

try running C++ and seeing if the problem persists. js/krom input is messy.

Yeah, the problem is there. This popup when game freeze


It looks like it is physics getContacts function doing a nullpointer exception.

Allrights thanks, i will check my code again and find out where did i go wrong…

i don’t know what happening, here is my blend untitled.blend (640.7 KB)
and my haxe code:
Astroid.hx (371 Bytes)
Ammo.hx (2.0 KB)
PlayerController.hx (1.6 KB)

My best guess is that object.remove() makes it such that the script itself is uncallable. If you move the script to be a scene one (under the scene tab), and reference object with“Ammo”); then the game no longer freezes in the console.

Alright, I fixed it , I don’t know how it worked but the problem was my ammo speed was slower than the player speed so, when spawning ammo and at same time moving player forward it sort of spawn ammos near each other and then it lag for a second and than its freeze.I think the problem has to do with ammos colliding with each other

Why wasting physic ressources on ammo item ?

Put ammo script for each item.
The script checks player distance, when the distance is below a value the player gets the ammo.

But i need collosion for ammo to hit the astroid, or am i misunderstanding something here?

I thaugh it was some item to add ammo to your inventory :sweat_smile:

1 Like