Paste Code
Paste Blends
Paste Images
class Entity:
@ServerMethod
def shoot(self):
self.ammo -= 1
ray = self.handler.world.ray_cast(self.gun_direction)
#.....

@ClientMethod
def shoot(self):
self.ammo -= 1
ray = self.handler.world.ray_cast(self.gun_direction)
PlaySound("Shoot")

def update(self):
if self.inputs.shoot:
self.shoot()
  1. class Entity:
  2.     @ServerMethod
  3.     def shoot(self):
  4.         self.ammo -= 1
  5.         ray = self.handler.world.ray_cast(self.gun_direction)
  6.         #.....
  7.  
  8.     @ClientMethod
  9.     def shoot(self):
  10.         self.ammo -= 1
  11.         ray = self.handler.world.ray_cast(self.gun_direction)
  12.         PlaySound("Shoot")
  13.    
  14.     def update(self):
  15.         if self.inputs.shoot:
  16.             self.shoot()
go to heaven