Hi, my photon app working fine, but 1 slice of code have a bug:
void Update() {
if (Input.GetKeyDown (KeyCode.R)) {
reload ();
}
if (rb.velocity.magnitude >= 0.5 && !graphicsAM.IsPlaying(tpRunReload.name)) {
if (!isTP) {
playAnim (walk.name);
} else {
graphicsPV.RPC ("playAnimPV", PhotonTargets.All, tpRun.name);
}
} else {
if (!graphicsAM.IsPlaying (tpReload.name)) {
if (!isTP) {
playAnim (iddle.name);
} else {
graphicsPV.RPC ("playAnimPV", PhotonTargets.All, tpIddle.name);
}
}
}
}
++++
Reload working for all players (myself and OTHERS players reloading with me). How to solve this?
RPC call is here (+ anim method):
public void reload() {
graphicsPV.RPC ("playAnimPV", PhotonTargets.All, tpReload.name);
}
[PunRPC]
public void playAnimPV (string animName) {
if (isTP) {
graphicsAM.CrossFade (animName);
}
}
All anims working fine, but reload apply reload for all players (not ONLY myself, others players reloading with me same 1 touch over R key (on my game). How to solve this? Try isMine but cant work.
Thanks!
void Update() {
if (Input.GetKeyDown (KeyCode.R)) {
reload ();
}
if (rb.velocity.magnitude >= 0.5 && !graphicsAM.IsPlaying(tpRunReload.name)) {
if (!isTP) {
playAnim (walk.name);
} else {
graphicsPV.RPC ("playAnimPV", PhotonTargets.All, tpRun.name);
}
} else {
if (!graphicsAM.IsPlaying (tpReload.name)) {
if (!isTP) {
playAnim (iddle.name);
} else {
graphicsPV.RPC ("playAnimPV", PhotonTargets.All, tpIddle.name);
}
}
}
}
++++
Reload working for all players (myself and OTHERS players reloading with me). How to solve this?
RPC call is here (+ anim method):
public void reload() {
graphicsPV.RPC ("playAnimPV", PhotonTargets.All, tpReload.name);
}
[PunRPC]
public void playAnimPV (string animName) {
if (isTP) {
graphicsAM.CrossFade (animName);
}
}
All anims working fine, but reload apply reload for all players (not ONLY myself, others players reloading with me same 1 touch over R key (on my game). How to solve this? Try isMine but cant work.
Thanks!