Browse Source

air mover and pump timer mods

shuvit 6 years ago
parent
commit
a5b53fc2f6
2 changed files with 6 additions and 6 deletions
  1. 2
    2
      co_ActionState.py
  2. 4
    4
      controller2.py

+ 2
- 2
co_ActionState.py View File

485
                     
485
                     
486
             if requestAction == 'reg_pump_out':
486
             if requestAction == 'reg_pump_out':
487
                 actionState = 'reg_pump_out'
487
                 actionState = 'reg_pump_out'
488
-                own['actionTimer'] = 19
488
+                own['actionTimer'] = 39
489
                 trans_playing = skater.isPlayingAction(trans_layer)
489
                 trans_playing = skater.isPlayingAction(trans_layer)
490
                 if trans_playing:
490
                 if trans_playing:
491
                     cur_frame = skater.getActionFrame(trans_layer)
491
                     cur_frame = skater.getActionFrame(trans_layer)
510
                     
510
                     
511
             if requestAction == 'fak_pump_out':
511
             if requestAction == 'fak_pump_out':
512
                 actionState = 'fak_pump_out'
512
                 actionState = 'fak_pump_out'
513
-                own['actionTimer'] = 19
513
+                own['actionTimer'] = 39#19
514
                 trans_playing = skater.isPlayingAction(trans_layer)
514
                 trans_playing = skater.isPlayingAction(trans_layer)
515
                 if trans_playing:
515
                 if trans_playing:
516
                     cur_frame = skater.getActionFrame(trans_layer)
516
                     cur_frame = skater.getActionFrame(trans_layer)

+ 4
- 4
controller2.py View File

2812
         q5oncd = countdown
2812
         q5oncd = countdown
2813
         own["Q5oncd"] = q5oncd
2813
         own["Q5oncd"] = q5oncd
2814
     oposin()  
2814
     oposin()  
2815
-    
2816
-if (rTrig > 0.02 and GRAB_ON == False and r_ground.triggered == 1) or (lTrig > 0.02 and GRAB_ON == False and r_ground.triggered == 1):
2815
+ground_since = own["framenum"] - own['lF_air_frame']    
2816
+if (rTrig > 0.02 and GRAB_ON == False and r_ground.triggered == 1) or (lTrig > 0.02 and GRAB_ON == False and r_ground.triggered == 1) and ground_since > 10:
2817
     pump()
2817
     pump()
2818
 else:
2818
 else:
2819
     own["lastPump"] = False 
2819
     own["lastPump"] = False 
4141
             own.applyMovement(move, True)               
4141
             own.applyMovement(move, True)               
4142
 
4142
 
4143
 def air_mover():
4143
 def air_mover():
4144
-    if r_ground.triggered == False and jump_timer > 53:
4144
+    if r_ground.triggered == False and jump_timer > 53 and frames_since_grinding > 50:
4145
         #print(lUD)
4145
         #print(lUD)
4146
         if lUD > 0.075:
4146
         if lUD > 0.075:
4147
             print("air_mover", jump_timer)
4147
             print("air_mover", jump_timer)
4152
             
4152
             
4153
             own.applyForce(force2, True)
4153
             own.applyForce(force2, True)
4154
             #own.applyForce([0,0,5], False)
4154
             #own.applyForce([0,0,5], False)
4155
-    if r_ground.triggered == False and jump_timer > 10 and lUD > 0.075:
4155
+    if r_ground.triggered == False and jump_timer > 10 and lUD > 0.075 and frames_since_grinding > 50:
4156
         #print(lUD)
4156
         #print(lUD)
4157
         print("air_mover", jump_timer)
4157
         print("air_mover", jump_timer)
4158
         if STANCE == 0:
4158
         if STANCE == 0:

Loading…
Cancel
Save