Hiii!!! Can someone PLEEEEEEEEASE help me with that : JS Error [asset: Main Hero, component: Defeat, line: 0] - TypeError: start is null / This appears when I collide with an enemy in my game. My Hero just need to die but it just stopps and I can see that error! Can someone explain what happening? I don't even have such block of code with 0 line ((
Do me a favor, go into your Defeat Node, click right hand corner of node, copy all of the code, paste it here so I can see it. Or post a link to your bbdoc file and I will gladly take a look. Sounds like something got inserted into your Defeat node code. And even easier, delete that Defeat node and replace it with a new one and try again.
Hi! Here is my defeat node code: // let remove; function init(){ remove = this.attribute('Remove'); } function update(dt) { } function signal(name, value) { if(value){ this.emitSignal('Defeat', true); let start = this.entity().component('Start'); start.setCreated(false); if(remove){ this.entity().remove(); } } } I think it's ok because I EVEN DEDN'T CHANGED it AND I saw same code in the examples of games and there it works nice. I tried to delete this and to create again but it's error still. I would try to publish the whole bbdoc file later but maybe you could understand sth now. Thank you so much man♥♥♥ The problem is that I DOING THE SAME as in example of a game BUT manually and it don't work. It's really strange cause I copied all that from a project that work I just added that defeat node and a collide with my hands and changed nothing. lol.
this error tells you that there is no node with that name so 'start' is null are you sure that your character start node name is 'Start'? considering the upper and lower case
Thank you very much, I found the solution! The problem was that in my code the name of hero was START but in fact it was named CUBE. So stupid flaw. Thank you ♥♥♥