Author Topic: how to extend / override create functions?  (Read 1837 times)

JamminGames

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
how to extend / override create functions?
« on: June 04, 2013, 12:25:44 AM »
basically what i'm trying to do is make a function that passes through  2 things,
creating a projectile, and the playerID that created it.

i'm a total noob to network code so my understanding of the theory is probably off. is this how i should be going about implementing weapon firing over a network? I want to send a message when a player is shooting, and pass through what to instantiate client side, and where to instantiate it from.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: how to extend / override create functions?
« Reply #1 on: June 04, 2013, 06:04:52 PM »
Have a look at TNManager.Create functions. Each one has a certain set of arguments, and identifies itself by writing a byte such as writer.Write((byte)2);

In TNManager.OnCreateObject it reads the byte, and then parses the data accordingly.