Quantcast
Channel: Multiplayer
Viewing all articles
Browse latest Browse all 16796

Bullets won't work when I converted them to Commands

$
0
0
Hi,

I have a working local multiplayer game that am adding network to. If I understood correctly (and with reference to Unite 2014 network video) I made my shooting code into a Command by adding [Command] directive, "Cmd" prefix and NetworkServer.Spawn() but I can't see any bullet when I shoot. Here is my current code:

Code (csharp):
  1.  
  2.   [Command]
  3.   protected void CmdFireProjectile(float aimInDegrees, float timeToLiveModifier)
  4.   {
  5.   // TODO: Different weapons MAY need different logic of reducing...
Bullets won't work when I converted them to Commands

Viewing all articles
Browse latest Browse all 16796

Trending Articles



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