Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Gamepro5 |
Hello,
I am making a to be multiplayer FPS. My current system is that the game’s weapons are children of the player and a signal is required to go from the player to the weapon. Right now I am trying to make a grenade launcher type thing that shoots capsule pills that will latter explode. I have gotten the player to tell the gun to shoot the projectiles, but when it comes to writing code for the projectile itself I am at a loss. I don’t know how the rigidbody projectile can efficiently and cleanly tell the shooter the damage it dealt and other information, and how to make it check if it collided with another player so I can tell it to explode and then subtract the health of that player. Signals don’t seem to be the solution to this because I would have to link a signal to every player every time a projectile is fired and the amount of players it made to be flexible with creating player and bot instances so me implementing multiplayer will be easier.
I don’t know how to make the rigidbody projectiles subtract the health of other player instances it collided with.