Simular to Multiplayer FPS, you as a character, administer and receive damage from several weapon types and a plethora of game functionalities.
Im new to programming and would like to set up a way to take health away from myself when damaged, as well as other players when they are damaged.
-
Do I write the script to deal damage on each bullet?
-
Do I write the script on the character for… when hit by bullet type?
-
Or do I create an empty object, then write a script (or function if my terminology is correct) to call; whenever the bullet reaches an end point?
Which would be the best case, and which object do I put the Call Function on if its number 3?
Thanks All!
Thank you for the reply! Ok, so your "ApplyDamage" method has all of its functionality in it? This method is placed on the character? For instance, (pseudo / logic) Players script "ApplyDamage" if when whatev, hit by, this that or the other do x damage if when whatev, hit by, this that or the other do n damage and so on.. somthing to that affect? Please forgive my terminology totally learning my way through it. 1 hour per line of code haha :)
– prefix