Klab

Recent community posts

Oh great, thanks for the quick reply! I was already scared the site was abandoned, due to the total lack of comments here. Anyway, I will try to describe my project settings. The error that I posted I don't get anymore now though. Not sure what i did there. Currently I have the problem that the lasers don't target my enemies. Here is a screenshot of the settings: http://imgur.com/a/uDJYq

I basically just took the CSpawn from your demo setup and made it a child of my PlayerObject. And also took the Target object from your demo and made it a child of my enemy object prefab. It's right in the middle of the enemy object. I can shoot the lasers with "M", but they do not target my enemies. They just always shoot at the same place (kind where my player object spawns. I also use an enemy wave spawner, which lets me spawn multiple enemies of a prefab from the top of my screen, but I doubt this has to do with this. Otherwise it works fine for me.

Ok, so that would be my current set up. HOWEVER, I actually would wish to use your homing lasers in a different set up. This set up would be much more complicated though, and I doubt you really want to help me there setting this up. The thing is, I actually already use a guided missile system in my project (which I turned off for the described above though), and this system uses stuff like targeting multiple enemies with a keypress, and then being able to shoot if they are in a certain radius which you can manipulate.

I actually like this system very much, but I just dislike how the lasers look there. Your lasers just look way cooler. Especially also because they fade out and are much smoother. Mine just instantly vanish when the tip reaches its target (the parent gets destroyed) and just look pretty cheap (I just use a trail renderer for them).

Would you also be willing to help me implement this into my actual other system? I also could transfer you some more money for this to your paypal if you are able to manage this. However, my other guided missile/laser system really has a lot of complicated code (I didn't write this myself though).

Edit: I just noticed I can actually use your laser for my guided system, ie it's possible to just put the CLaser prefab in the "Missile" slot of the other guided missile/laser system I have. I can shoot the laser, and also target enemies (with the target system from my other missile system), but still, your laser just doesn't shoot at the enemies. It just always aims at the position coordinates of the enemy prefab (0/0/0). If I change these coordinates it shoots at the new coordinates. But my enemies don't have the same coordinates as their prefabs. They spawn from a spawner and move around. Even with the Target object from the demo as an enemy it just doesn't work. Any idea what I do wrong there?

Edit 2: I doubt though, that my target radius system will work with your target system. The way the targeting in my project works is that every enemy has a target check script attached to it, and when I press a certain key, the player can target an adjustable amount of enemies in an adjustable sized radius. Your target system just checks for a prefab and that's it. Would it perhaps be possible that you combine your laser with this target system when I send you the right scripts?

Hello, I am still very new to Unity and I can't get this to work. I always get an error saying "NullReferenceException: Object reference not set to an instance of an object". I get this from the script with "just 1 line of code". I attached it to the player.