Sending Damage over a network.
Options
ACARROT
✭
Hey there guys, I've finally given up on this and have come to the forums XD
I'm trying to send damage to another Fps character over a network.
In singleplayer I have to add:
But what would I do with Photon?
I know it has something to do with RPC's, but I am stumped by it.
For the Damage Receiver, I have
Additionally, I would prefer to avoid youtube videos as they are very time consuming and my internet doesn't happen to load the code at a very good quality.
How would I go around this? Thanks!
I'm trying to send damage to another Fps character over a network.
In singleplayer I have to add:
hit.transform.gameObject.GetComponent<AC_HealthManager> ().SendMessage ("Damage", ImpactDamage, SendMessageOptions.RequireReceiver);
But what would I do with Photon?
I know it has something to do with RPC's, but I am stumped by it.
For the Damage Receiver, I have
public void Damage(float Damage){ Body.GetComponent<AC_HealthManager> ().SendMessage ("Damage", Damage * DmMultiplyer, SendMessageOptions.DontRequireReceiver); }In which body, is the root gameobject.
Additionally, I would prefer to avoid youtube videos as they are very time consuming and my internet doesn't happen to load the code at a very good quality.
How would I go around this? Thanks!
0
Comments
-
Look at the example scenes, I got it pretty quickly and you should too. Look at the IPunObservable classes and the networkviews.
Read the waterpolo tutorial from start to finish, it helps a lot: https://doc.photonengine.com/en/pun/current/tutorials/tutorial-marco-polo.
0 -
Hey @amzin7000 , thanks for the response, sorry, I've been pretty busy lately, I'll look at it tonight or tomorrow. Thanks again.0
-
Ok, I managed to get it to work, somewhat. Thanks for the help, I used the Merry Fragmas Tutorials.0