Quantcast
Channel: Photon Unity Networking (PUN) — Photon Engine
Viewing all articles
Browse latest Browse all 8947

equiping player weapons

$
0
0
void Start () { pv = GetComponent<PhotonView>(); viewid = pv.viewID; } void Update () { if (Input.GetKeyDown(KeyCode.Space)) { pv.RPC("equipWeapon", PhotonTargets.All, viewid); }[PunRPC] public void equipWeapon(int id) { if (id != viewid) return; // equip weapon }

I am trying to equip playerweapons through network.
Problem is both my players are equiping weapons, even though i am comparing thier view id
Any1 knows how to do this??

Viewing all articles
Browse latest Browse all 8947

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>