Enemy dies when shooting

For some reason even though I followed exactly as Rick instructed (Actually I did the challenge myself and then modified it very slightly after he showed us how in the video)

but I ran into issues with the enemy dying and the laser duplicating but I think I fixed that with what he did in the video but the issue with the enemy disappearing after shooting still persists.
I tried various methods of making sure the enemy would not collide with it’s own laser like giving the laser it’s own damage dealer class and a seperate script but that created a new issue with the editor complaining about what to do when it’s hit by the laser it shot.
I could not figure out how to correctly modify the enemy damage dealer script or my enemy or my normal damage dealer script to discriminate between colliding with the player and colliding with an enemy…

1 Like

Heya, this issue is addressed in the video “Layer Collision Matrix”.

2 Likes

Oh. Let me see

You’re right. weird. this didn’t occur in the prior videos yet he acknowledges them?..

Yeah I think it’s just confusing because in Rick’s video his lasers don’t kill their own ships (just a coincidence probably), but I noticed in the Udemy comments other people had the same issue. So just keep following. :slight_smile:

2 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms