Browse Source

footplants2

shuvit 6 years ago
parent
commit
5747dfdcaf
3 changed files with 26 additions and 46 deletions
  1. 1
    2
      bpy_misc/pushpuller-addon.py
  2. 1
    1
      co_ActionState.py
  3. 24
    43
      controller2.py

+ 1
- 2
bpy_misc/pushpuller-addon.py View File

@@ -40,6 +40,7 @@ class OBJECT_OT_pullerer(bpy.types.Operator):
40 40
  
41 41
     def execute(self, context):
42 42
         area = bpy.context.area
43
+        self.report({'INFO'}, "Performing pull")
43 44
         for text in bpy.data.texts:
44 45
             area.spaces[0].text = text
45 46
             if text.filepath != '':
@@ -49,8 +50,6 @@ class OBJECT_OT_pullerer(bpy.types.Operator):
49 50
                     print("error reloading: ", text.filepath)    
50 51
             if text.filepath != '' and text.is_dirty:
51 52
                 bpy.ops.text.save()
52
-
53
-        self.report({'INFO'}, "Performing pull")
54 53
         return {'FINISHED'}
55 54
 
56 55
 def register():

+ 1
- 1
co_ActionState.py View File

@@ -2192,7 +2192,7 @@ def main():
2192 2192
 ###################  
2193 2193
     
2194 2194
     #debug
2195
-    #print("rA:", requestAction, "|aS:", own['actionState'], "q", queueAction, own['actionTimer'])
2195
+    print("rA:", requestAction, "|aS:", own['actionState'], "q", queueAction, own['actionTimer'])
2196 2196
     cur_frame = skater.getActionFrame(trans_layer)
2197 2197
     #print(cur_frame)
2198 2198
     def printplaying():

+ 24
- 43
controller2.py View File

@@ -1460,10 +1460,10 @@ def backside_grab_on():
1460 1460
     
1461 1461
     
1462 1462
     if GRAB_ON == True and r_ground.triggered == 0 and aBut == True:
1463
-        
1464
-        skater.playAction("reg_fp_rback", 10,10, layer=2925, priority=8, play_mode=1, speed=.5)
1465
-        deck.playAction("a_reg_fp_rback", 10,10, layer=2925, priority=8, play_mode=1, speed=.5)
1466
-        trucks.playAction("a_reg_fp_rback", 10,10, layer=2925, priority=8, play_mode=1, speed=.5)          
1463
+        own['requestAction'] = 'reg_fp_rback'
1464
+        #skater.playAction("reg_fp_rback", 10,10, layer=2925, priority=8, play_mode=1, speed=.5)
1465
+        #deck.playAction("a_reg_fp_rback", 10,10, layer=2925, priority=8, play_mode=1, speed=.5)
1466
+        #trucks.playAction("a_reg_fp_rback", 10,10, layer=2925, priority=8, play_mode=1, speed=.5)          
1467 1467
     elif GRAB_ON == True and GRAB_PLAYED == False and r_ground.triggered == 0:
1468 1468
         own['requestAction'] = 'backside_grab'        
1469 1469
         GRAB_PLAYED = True
@@ -1475,10 +1475,11 @@ def fakfrontside_grab_on():
1475 1475
     GRAB_PLAYED = own["GRAB_PLAYED"]
1476 1476
     GRAB_ON = own["GRAB_ON"]
1477 1477
 
1478
-    if GRAB_ON == True and r_ground.triggered == 0 and aBut == True:    
1479
-        skater.playAction("fak_fp_rback", 10,10, layer=2925, priority=8, play_mode=1, speed=.5)
1480
-        deck.playAction("a_fak_fp_rback", 10,10, layer=2925, priority=8, play_mode=1, speed=.5)
1481
-        trucks.playAction("a_fak_fp_rback", 10,10, layer=2925, priority=8, play_mode=1, speed=.5)     
1478
+    if GRAB_ON == True and r_ground.triggered == 0 and aBut == True:
1479
+        own['requestAction'] = 'fak_fp_rback'    
1480
+        #skater.playAction("fak_fp_rback", 10,10, layer=2925, priority=8, play_mode=1, speed=.5)
1481
+        #deck.playAction("a_fak_fp_rback", 10,10, layer=2925, priority=8, play_mode=1, speed=.5)
1482
+        #trucks.playAction("a_fak_fp_rback", 10,10, layer=2925, priority=8, play_mode=1, speed=.5)     
1482 1483
     
1483 1484
     if GRAB_ON == True and GRAB_PLAYED == False and r_ground.triggered == 0:           
1484 1485
         own['requestAction'] = 'fak_frontside_grab' 
@@ -2968,7 +2969,7 @@ if q5oncd > 0:
2968 2969
 #q1    
2969 2970
 if rUD < -0.070:
2970 2971
     if q2on == 0 and q8on == 0:
2971
-        print("q1on")
2972
+        #print("q1on")
2972 2973
         q1on = 1
2973 2974
         q1oncd = countdown
2974 2975
         own["Q1oncd"] = q1oncd
@@ -3476,50 +3477,30 @@ def footplant():
3476 3477
     frames_since_ground = framenum - lF_air_frame
3477 3478
     frames_since_grind = framenum - own['last_grind_frame']
3478 3479
     #print(frames_since_ground, "fsg")
3479
-    if LAST_GRIND == False and grindHit == True and aBut == True and frames_since_ground < 40 and touched:
3480
-        own.setLinearVelocity([0,0,0],0)
3481
-        #killall()
3482
-        #if STANCE == 0:
3483
-            #skater.playAction("reg_fp_rback", 10,10, layer=2925, priority=8, play_mode=1, speed=.5)
3484
-            #deck.playAction("a_reg_fp_rback", 10,10, layer=2925, priority=8, play_mode=1, speed=.5)
3485
-            #trucks.playAction("a_reg_fp_rback", 10,10, layer=2925, priority=8, play_mode=1, speed=.5)
3486
-            #skater.playAction("reg_fp_rback", 1,10, layer=2928, priority=8, play_mode=0, speed=1)
3487
-            #deck.playAction("a_reg_fp_rback", 1,10, layer=2928, priority=8, play_mode=0, speed=1)
3488
-            #trucks.playAction("a_reg_fp_rback", 1,10, layer=2928, priority=8, play_mode=0, speed=1)
3489
-        #if STANCE == 1:
3490
-            #skater.playAction("fak_fp_rback", 10,10, layer=2925, priority=8, play_mode=1, speed=.5)
3491
-            #deck.playAction("a_fak_fp_rback", 10,10, layer=2925, priority=8, play_mode=1, speed=.5)
3492
-            #trucks.playAction("a_fak_fp_rback", 10,10, layer=2925, priority=8, play_mode=1, speed=.5)
3493
-            #skater.playAction("fak_fp_rback", 1,10, layer=2928, priority=8, play_mode=0, speed=1)
3494
-            #deck.playAction("a_fak_fp_rback", 1,10, layer=2928, priority=8, play_mode=0, speed=1)
3495
-            #trucks.playAction("a_fak_fp_rback", 1,10, layer=2928, priority=8, play_mode=0, speed=1)                            
3480
+    #print(grindHit, r_ground.triggered)
3481
+    #print(own['footplant_on'], own['last_footplant'])
3482
+    #if LAST_GRIND == False and grindHit == True and aBut == True and frames_since_ground < 40 and touched:
3483
+    if grindHit == True and aBut == True:
3484
+        print("first invert check")
3485
+        own.linearVelocity.x = 0
3486
+        own.linearVelocity.y = 0
3487
+        #own.setLinearVelocity([0,0,0],0)                          
3496 3488
         own['footplant_on'] = 1
3497 3489
     if grindHit == False:
3498 3490
         own['footplant_on'] = 0 
3499 3491
     if own['footplant_on'] == True and rUD < turnsens and rUD > -turnsens:
3500
-        own.setLinearVelocity([0,0,0],0)
3492
+        #own.setLinearVelocity([0,0,0],0)
3493
+        own.linearVelocity.x = 0
3494
+        own.linearVelocity.y = 0
3501 3495
     if own['footplant_on'] == 1 and own['last_footplant'] == True:
3502 3496
         if skater.isPlayingAction(2925) == False:
3503 3497
             if STANCE == 0:
3504 3498
                 own['requestAction'] = 'reg_fp_rback'
3505
-                #skater.playAction("reg_fp_rback", 10,10, layer=2925, priority=8, play_mode=1, speed=.5)
3506
-                #deck.playAction("a_reg_fp_rback", 10,10, layer=2925, priority=8, play_mode=1, speed=.5)
3507
-                #trucks.playAction("a_reg_fp_rback", 10,10, layer=2925, priority=8, play_mode=1, speed=.5)                
3499
+                print("requesting footplant0")               
3508 3500
             if STANCE == 1:
3509 3501
                 own['requestAction'] = 'fak_fp_rback'
3510
-                #skater.playAction("fak_fp_rback", 10,10, layer=2925, priority=8, play_mode=1, speed=.5)
3511
-                #deck.playAction("a_fak_fp_rback", 10,10, layer=2925, priority=8, play_mode=1, speed=.5)
3512
-                #trucks.playAction("a_fak_fp_rback", 10,10, layer=2925, priority=8, play_mode=1, speed=.5)                        
3513
-    # if own['last_footplant'] == True and own['footplant_on'] == 0:
3514
-    #     #killall()
3515
-    #     if STANCE == 0:
3516
-    #         skater.playAction("reg_fp_rback", 10,20, layer=2928, priority=8, play_mode=0, speed=1)
3517
-    #         deck.playAction("a_reg_fp_rback", 10,20, layer=2928, priority=8, play_mode=0, speed=1)
3518
-    #         trucks.playAction("a_reg_fp_rback", 10,20, layer=2928, priority=8, play_mode=0, speed=1)  
3519
-    #     if STANCE == 1:
3520
-    #         skater.playAction("fak_fp_rback", 10,20, layer=2928, priority=8, play_mode=0, speed=1)
3521
-    #         deck.playAction("a_fak_fp_rback", 10,20, layer=2928, priority=8, play_mode=0, speed=1)
3522
-    #         trucks.playAction("a_fak_fp_rback", 10,20, layer=2928, priority=8, play_mode=0, speed=1)            
3502
+                print("requesting footplant1")
3503
+           
3523 3504
 def invert():    
3524 3505
     if LAST_GRIND == False and grindHit == True and own['grindpos'] == 'reg_board':
3525 3506
         if lBump == 1:

Loading…
Cancel
Save