OK My machine gun emits sparks when bullets hit objects in my game but I'm wondering if there is some cool way to say create a new particle system that looks like "Green Blood" and somehow have the sparks change from well "Sparks" to "Green Blood" when I shoot one of my Alien Zombies? Any cool thoughts or ideas on how one might do something like that... I gues I should ask to if that is even possible do??
1 Answer
1Why not just use green colors on the particle animator?
Thanks DaveA I kinda thought that might be how it could be done, but I'm also wondering how I get my weapons to recognize when they are shooting alien zombie and not say rocks, trees or other game objects that just sparks would be ok for?
– anon48034950Use tags. In the inspector set tag to for instance 'Enemy' and in your function OnCollisionEnter (obj : Collision) { if (tag == "Enemy") { stuff } }.
– anon73820239You don't need to use fast moving colliders for bullets, you can use Raycast. But the same idea, whatever the bullet (or ray) hits, test for tag and act accordingly.
– DaveAIts a good thing my machine gun and shot gun are already using raycast bullets ;) Not sure how I'll get it to work with my rocket & grenade laucher weapons though as those two use actual projectiles that explode on contact?
– anon48034950These are common questions, lots of answers. Do a search (either in the search box at the top right), or just ask the question in the 'subject' field, hit Tab, and it will list similar questions. Also see 'Related' and use the tags.
– DaveA