[SOLVED] Crash when player breaks Assimilation

so, I tried making an Amoeba enemy, so I started making it so that when the player touches it, they start getting assimilated by the amoeba. However, everything works kinda well until the Assimilation part. I want the player to be absorbed by the Amoeba, so I removed the Amoeba’s rigidbody, but sometimes the Amoeba moves a bit, but it’s fine for now, I can fix it once I figure out how to solve the real problem.

So the real problem is when you break out of the assimilation. I made it so that it is hopefully impossible to break out of assimilation without dashing(Press C) but when you press it, everything works for the 18 frames that the player dashes for, but immedietly after the dash ends, the game crashes. can anyone figure out what goes on?

the two scripts use for the Assimilation: PlayCanvas | HTML5 Game Engine

the screen where I’m testing the Amoeba enemy: PlayCanvas | HTML5 Game Engine

If you look in the console after pressing C you can see the

TypeError: this.assimilated is not a function
 at MoveQiste.update (Move%20Qiste.js?id=191323175&branchId=0cf0f258-17a9-429a-9342-69d1c29c2a71:62:14)

So it is telling you the error is on line 62.

But that function is defined.

However in that function you are on line 220 you have a typo

this.assimilated = false

Probably that should be this.isAssimilated

1 Like

thanks. I’m unable to see the console so I wasn’t able to see that. my computer doesn’t support Developer tools, so I can’t see the console(I have tried). So I usually need help for these kinds of things

Now I see bugs for other things that I have to fix. But I need a break right now, so I’ll be mostly offline for a while.

Thank you for your help.

You can try to add vConsole to your project. With this tool you can see the console on devices like tablets and mobile phones as well.

1 Like

I’m on a Chromebook without developer tools or Linux, I don’t know if I can use this.

ok, for some reason, the amoebas aren’t disabling collisions anymore. I put in more than 3 checks, but they still won’t stop interacting with the player during the time they are assimilating them. What in the world is the cause of this?

I’ve added 3 checks that make the entity

this.entity.rigidbody.enabled = false
this.entity.collision.enabled = false

nvm, I figured it out