home *** CD-ROM | disk | FTP | other *** search
/ PC PowerPlay 56 / CDPowerplay56Disc2.iso / demos / blade / data1.cab / Program_Executable_Files / Scripts / DefControl.py < prev    next >
Encoding:
Text File  |  2000-10-27  |  3.8 KB  |  122 lines

  1. # This script is written automatically in the config controls
  2. # and is really for defining key asociations with Actions
  3.  
  4. #pdb.set_trace()
  5. ON_RELEASE=0
  6. ON_PRESS=1    # default
  7.  
  8.  
  9.  
  10.  
  11. import BInput
  12.  
  13. InputManager=BInput.GetInputManager()
  14. InputManager.SetInputActionsSet("Default")  # Me aseguro de definir las acciones en el grupo correcto
  15.  
  16.  
  17. Bladex.AddInputAction("Testa",0)
  18. Bladex.AddInputAction("Testb",0)
  19. Bladex.AddInputAction("Test2",0)
  20.  
  21.  
  22. ##def PrintTest():
  23. ##  print "Dual key released"
  24. ##
  25. ##Bladex.AssocKey("Testa", "Keyboard", "Z", ON_RELEASE)
  26. ##Bladex.AssocKey("Testb", "Keyboard", "X", ON_RELEASE)
  27. ##
  28. ##Bladex.Bind2("Test2", "Testa", "Testb",500)
  29. ##Bladex.AddBoundFunc("Test2", PrintTest)
  30.  
  31.  
  32. ON_RELEASE=0
  33. ON_PRESS=1    # default
  34.  
  35.  
  36. # simple attack
  37. Bladex.AssocKey("Attack","Keyboard","RCtrl")
  38. Bladex.AssocKey("Attack Release","Keyboard","RCtrl",ON_RELEASE)
  39. Bladex.AssocKey("Attack","Mouse","LeftButton")
  40. Bladex.AssocKey("Attack Release","Mouse","LeftButton",ON_RELEASE)
  41.  
  42.  
  43. # simple block
  44. Bladex.AssocKey("Block","Keyboard","RAlt")
  45. Bladex.AssocKey("Block Release","Keyboard","RAlt",ON_RELEASE)
  46.  
  47. # throws
  48. Bladex.AssocKey("Throw","Keyboard","Delete")
  49. Bladex.AssocKey("Throw Release","Keyboard","Delete", ON_RELEASE)
  50.  
  51.  
  52.  
  53. Bladex.AssocKey("Forwards","Keyboard","Up")
  54. Bladex.AssocKey("FrwdDown","Keyboard","Up")
  55. Bladex.AssocKey("FrwdUp","Keyboard","Up",ON_RELEASE)
  56. Bladex.AssocKey("Backwards","Keyboard","Down")
  57. Bladex.AssocKey("BrwdDown","Keyboard","Down")
  58. Bladex.AssocKey("BrwdUp","Keyboard","Down",ON_RELEASE)
  59.  
  60. Bladex.AssocKey("Swim Up","Keyboard","4")
  61. Bladex.AssocKey("Swim Down","Keyboard","5")
  62. Bladex.AssocKey("Turn Left","Keyboard","Left")
  63. Bladex.AssocKey("Turn Right","Keyboard","Right")
  64. Bladex.AssocKey("Look Up","Keyboard","O")
  65. Bladex.AssocKey("Look Down","Keyboard","L")
  66. Bladex.AssocKey("ToggleStats","Keyboard","T")
  67. Bladex.AssocKey("ToggleSampling","Keyboard","V")
  68. Bladex.AssocKey("Use","Keyboard","Enter")
  69. Bladex.AssocKey("SelectObj","Keyboard","Next")
  70. #Bladex.AssocKey("UnSelectObj","Keyboard","0")
  71. Bladex.AssocKey("Select Enemy","Keyboard","Numpad0")
  72. #Bladex.AssocKey("UnSelectEnemy","Keyboard","C")
  73. Bladex.AssocKey("Jump","Keyboard","Slash")
  74. Bladex.AssocKey("Jump","Mouse","RightButton")
  75. Bladex.AssocKey("Sneak","Keyboard","RShift")
  76. Bladex.AssocKey("Run","Keyboard","K")
  77. Bladex.AssocKey("Toggle Weapons","Keyboard","End")
  78.  
  79. Bladex.AssocKey("Free Look","Keyboard","Space")
  80. Bladex.AssocKey("Next View","Keyboard","Add")
  81. Bladex.AssocKey("Last View","Keyboard","Subtract")
  82.  
  83. #Bladex.AssocKey("Dodge","Keyboard","")
  84. Bladex.AssocKey("Camera Left","Keyboard","F5")
  85. Bladex.AssocKey("Camera Right","Keyboard","F6")
  86. Bladex.AssocKey("Change Camera","Keyboard","F7")
  87. Bladex.AssocKey("Fixed Camera","Keyboard","F8")
  88. Bladex.AssocKey("Camera Dist","Keyboard","F9")
  89. Bladex.AssocKey("Change Mov","Keyboard","P")
  90. #Bladex.AssocKey("Toggle Sound","Keyboard","I")
  91. Bladex.AssocKey("Bigger FOV","Keyboard","F11")
  92. Bladex.AssocKey("Smaller FOV","Keyboard","F12")
  93. Bladex.AssocKey("Toggle BB","Keyboard","F4")
  94. Bladex.AssocKey("Cycle Weapons","Keyboard","Prior")
  95. Bladex.AssocKey("Cycle Shields","Keyboard","Insert")
  96. Bladex.AssocKey("Cycle Objects","Keyboard","Begin")
  97. Bladex.AssocKey("Screen Shot","Keyboard","F2")
  98. Bladex.AssocKey("ToggleProfiling","Keyboard","F3")
  99.  
  100. #Bladex.AssocKey("KillEnemy","Keyboard","")
  101. #Bladex.AssocKey("NextPOV","Keyboard","")
  102.  
  103. Bladex.AssocKey("RotateX","Mouse","X_Axis")
  104. Bladex.AssocKey("RotateY","Mouse","Y_Axis")
  105.  
  106. # Network Keys
  107. Bladex.AssocKey("Show Scorer","Keyboard","Tab")
  108.  
  109.  
  110.  
  111.  
  112. print "Executed DefControl.py"
  113.  
  114.  
  115. def MataEnemigoEncarado():
  116.     Bladex.GetEntity(char.Data.selected_enemy[0]).Life=0
  117.  
  118.  
  119. Bladex.AddInputAction("Mata", 0)
  120. Bladex.AssocKey("Mata", "Keyboard", "M")
  121. Bladex.AddBoundFunc("Mata", MataEnemigoEncarado)
  122.