home *** CD-ROM | disk | FTP | other *** search
/ Game.EXE 2001 January / Game.EXE_01_2001.iso / demos / Blade of Darkness / data1.cab / Program_Executable_Files / Scripts / ClientInit.py < prev    next >
Encoding:
Text File  |  2000-11-16  |  3.2 KB  |  187 lines

  1. #*******************************************************************************************#
  2. #                              Client initialization routines                               #
  3. #*******************************************************************************************#
  4.  
  5. import Bladex
  6. import CharStats
  7. import Reference
  8.  
  9. import netgame
  10. import AniSound
  11. ClientActive = 1
  12.  
  13. import CommonResources
  14. CommonResources.Init()
  15.  
  16. execfile("../../Scripts/NetworkResources.py")
  17.  
  18. # empaquetado de objetos
  19. import BODInit
  20. BODInit.Init()
  21.  
  22.  
  23. import SolidMask
  24. SolidMask.Init()
  25.  
  26. import Material
  27. Material.Init()
  28.  
  29. #
  30. # Sounds
  31. #
  32. import AniSound
  33.  
  34. #
  35. # Sound for steps (needed before the biped stuff)
  36. #
  37. execfile("../../Scripts/NetStepSounds.py")
  38.  
  39.  
  40.  
  41.  
  42.  
  43. #
  44. # Sonidos de los clientes
  45. #
  46. def ClientSoundAsignation(name,kind):
  47.     print "tratando de asignar los sonidos a "+name+" de raza "+kind
  48.     ent = Bladex.GetEntity(name)
  49.     
  50.     if kind == "Knight_N":
  51.         AniSound.AsignarSonidosCaballero(name)
  52.     elif kind == "Amazon_N":
  53.         AniSound.AsignarSonidosAmazona(name)
  54.     elif kind == "Barbarian_N":
  55.         AniSound.AsignarSonidosBarbaro(name)
  56.     elif kind == "Dwarf_N":
  57.         AniSound.AsignarSonidosEnano(name)
  58.     else:
  59.         print "Sonidos para "+kind+"no implementado"
  60. netgame.SetJoinPlayerFunc(ClientSoundAsignation)
  61. print "Sonidos listos"
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71. Bladex.OpenDebugChannel("Salida")
  72.  
  73.  
  74. #
  75. # Animation events (needed b4 the biped stuff)
  76. #
  77. #import anm_def
  78. #anm_def.Init()
  79.  
  80.  
  81. #
  82. # Different kind of enemies. Should be called b4 creating ANY PersonEntity!
  83. #
  84. import Enemies
  85. Enemies.Init()
  86.  
  87.  
  88.  
  89. #
  90. # New animation system (biped) 
  91. #
  92. #execfile("..\\..\\Scripts\\KgtBAct.py")
  93. #execfile("..\\..\\Scripts\\Biped\\Biped.py")
  94.  
  95.  
  96.  
  97.  
  98. #
  99. # The sharing of whole sets of animations
  100. #
  101. #execfile("..\\..\\Scripts\\anm_conv.py")
  102.  
  103.  
  104. #
  105. # Factor of animations (to speed up or slow down animations) - OLD PLACE
  106. #
  107. #execfile("..\\..\\Scripts\\anm_fact.py")
  108.  
  109.  
  110. #
  111. # To modify flags of animations 
  112. #
  113. #execfile("..\\..\\Scripts\\anm_mdf.py")
  114.  
  115.  
  116. #
  117. # Factor of animations (to speed up or slow down animations)
  118. #
  119. #execfile("..\\..\\Scripts\\anm_fact.py")
  120.  
  121.  
  122. #
  123. # Particle Systems init
  124. #
  125. # CUIDADO! Valores definidos tambien en InitParticleSystems.py.
  126. B_PARTICLE_GTYPE_COPY=0
  127. B_PARTICLE_GTYPE_BLEND=1
  128. B_PARTICLE_GTYPE_ADD=2
  129. B_PARTICLE_GTYPE_MUL=3
  130.  
  131. import InitParticleSystems
  132. InitParticleSystems.Init()
  133.  
  134. #
  135. # Procedural textures
  136. #
  137. execfile("../../Scripts/AutoGenTextures.py")
  138.  
  139.  
  140. #
  141. # PJ Init loop...
  142. #
  143.  
  144. while(netgame.CreateMainPlayer()==0):
  145.   pass
  146.  
  147. char=Bladex.GetEntity("Player1")
  148.  
  149.  
  150. #
  151. # Timers
  152. #
  153. Bladex.CreateTimer("Timer60",1.0/60.0)
  154. Bladex.CreateTimer("Timer30",1.0/30.0)
  155. Bladex.CreateTimer("Timer15",1.0/15.0)
  156.  
  157.  
  158. #
  159. # Controls ( keyborad,mouse...) stuff
  160. #
  161. execfile("../../Scripts/InputInit.py")
  162. execfile("../../Scripts/NetMode.py")
  163. import acts
  164. acts.InitBindings("Player1")
  165.  
  166. try:
  167.   execfile("../../Config/Control.py")
  168.   print "BladeInit -> Executed Control.py"
  169. except:
  170.   execfile("../../Scripts/DefControl.py")
  171.   print "BladeInit -> Executed DefControl.py"
  172.  
  173. import NetScorer
  174. NetScorer.ActivateScorer()
  175.  
  176.  
  177.  
  178. #
  179. # Menu (el menu de cliente es otro, no esta basura)
  180. #
  181. import Menu
  182. Menu.InitMenuKeys()
  183.  
  184. import DefaultSelectionData
  185.  
  186. print "ClientInit.py"
  187.