Browse Source

bs out fix

shuvit 6 years ago
parent
commit
abe06eed1e
2 changed files with 12 additions and 4 deletions
  1. 1
    1
      co_ActionState.py
  2. 11
    3
      controller2.py

+ 1
- 1
co_ActionState.py View File

2410
 ###################  
2410
 ###################  
2411
     
2411
     
2412
     #debug
2412
     #debug
2413
-    print("rA:", requestAction, "|aS:", own['actionState'], "q", queueAction, own['actionTimer'])
2413
+    #print("rA:", requestAction, "|aS:", own['actionState'], "q", queueAction, own['actionTimer'])
2414
     cur_frame = skater.getActionFrame(trans_layer)
2414
     cur_frame = skater.getActionFrame(trans_layer)
2415
     #print(cur_frame)
2415
     #print(cur_frame)
2416
     def printplaying():
2416
     def printplaying():

+ 11
- 3
controller2.py View File

4042
     bsforce = 50
4042
     bsforce = 50
4043
     bs_dloc = .03
4043
     bs_dloc = .03
4044
     outvel = own.linearVelocity
4044
     outvel = own.linearVelocity
4045
-    if own['gt_cd2'] > 50:
4045
+    if own['gt_cd2'] > 50 and own['jump_timer'] < 20:
4046
         if own['grind_out_type'] == 'reg right':
4046
         if own['grind_out_type'] == 'reg right':
4047
             #print("do reg right")
4047
             #print("do reg right")
4048
             own.applyMovement([0,reg_move,0], True)
4048
             own.applyMovement([0,reg_move,0], True)
4085
             if own['gt_cd2'] == 51:
4085
             if own['gt_cd2'] == 51:
4086
                 #print('outforce')
4086
                 #print('outforce')
4087
                 if STANCE == False:
4087
                 if STANCE == False:
4088
+                    print("applying force1")
4088
                     own.applyForce([-200, 0, 0], True)
4089
                     own.applyForce([-200, 0, 0], True)
4089
                     own['stance'] = True
4090
                     own['stance'] = True
4090
                     STANCE = True
4091
                     STANCE = True
4091
                 if STANCE == True:
4092
                 if STANCE == True:
4093
+                    print("applying force2")
4092
                     own.applyForce([200, 0, 0], True)
4094
                     own.applyForce([200, 0, 0], True)
4093
                     own['stance'] = False
4095
                     own['stance'] = False
4094
                     STANCE = False
4096
                     STANCE = False
4095
         if own['grind_out_type'] == 'bs reg back' or own['grind_out_type'] == 'bs fak forward':
4097
         if own['grind_out_type'] == 'bs reg back' or own['grind_out_type'] == 'bs fak forward':
4096
             if own['gt_cd2'] > 50:
4098
             if own['gt_cd2'] > 50:
4097
                 if STANCE == True:
4099
                 if STANCE == True:
4100
+                    print("applying force3")
4098
                     own.applyForce([bsforce, 0, 0], True)
4101
                     own.applyForce([bsforce, 0, 0], True)
4099
                 if STANCE == False:
4102
                 if STANCE == False:
4103
+                    print("applying force4")
4100
                     own.applyForce([bsforce, 0, 0], True)
4104
                     own.applyForce([bsforce, 0, 0], True)
4101
-                own.applyMovement([bs_dloc,0,0], True)    
4105
+                own.applyMovement([bs_dloc,0,0], True)
4106
+                print("applying movement1")    
4102
         if own['grind_out_type'] == 'bs fak back' or own['grind_out_type'] == 'bs reg forward':
4107
         if own['grind_out_type'] == 'bs fak back' or own['grind_out_type'] == 'bs reg forward':
4103
             if own['gt_cd2'] > 50:
4108
             if own['gt_cd2'] > 50:
4104
                 if STANCE == True:
4109
                 if STANCE == True:
4110
+                    print("applying force5")
4105
                     own.applyForce([-bsforce, 0, 0], True)
4111
                     own.applyForce([-bsforce, 0, 0], True)
4106
                 if STANCE == False:
4112
                 if STANCE == False:
4113
+                    print("applying force6")
4107
                     own.applyForce([-bsforce, 0, 0], True)
4114
                     own.applyForce([-bsforce, 0, 0], True)
4108
-                own.applyMovement([-bs_dloc,0,0], True)                                             
4115
+                own.applyMovement([-bs_dloc,0,0], True) 
4116
+                print("applying movement2")                                            
4109
                                                                           
4117
                                                                           
4110
     if own['gt_cd2'] > 0:
4118
     if own['gt_cd2'] > 0:
4111
         own['gt_cd2'] -= 1
4119
         own['gt_cd2'] -= 1

Loading…
Cancel
Save