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

+ 1
- 1
co_ActionState.py View File

2192
 ###################  
2192
 ###################  
2193
     
2193
     
2194
     #debug
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
     cur_frame = skater.getActionFrame(trans_layer)
2196
     cur_frame = skater.getActionFrame(trans_layer)
2197
     #print(cur_frame)
2197
     #print(cur_frame)
2198
     def printplaying():
2198
     def printplaying():

+ 24
- 43
controller2.py View File

1460
     
1460
     
1461
     
1461
     
1462
     if GRAB_ON == True and r_ground.triggered == 0 and aBut == True:
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
     elif GRAB_ON == True and GRAB_PLAYED == False and r_ground.triggered == 0:
1467
     elif GRAB_ON == True and GRAB_PLAYED == False and r_ground.triggered == 0:
1468
         own['requestAction'] = 'backside_grab'        
1468
         own['requestAction'] = 'backside_grab'        
1469
         GRAB_PLAYED = True
1469
         GRAB_PLAYED = True
1475
     GRAB_PLAYED = own["GRAB_PLAYED"]
1475
     GRAB_PLAYED = own["GRAB_PLAYED"]
1476
     GRAB_ON = own["GRAB_ON"]
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
     if GRAB_ON == True and GRAB_PLAYED == False and r_ground.triggered == 0:           
1484
     if GRAB_ON == True and GRAB_PLAYED == False and r_ground.triggered == 0:           
1484
         own['requestAction'] = 'fak_frontside_grab' 
1485
         own['requestAction'] = 'fak_frontside_grab' 
2968
 #q1    
2969
 #q1    
2969
 if rUD < -0.070:
2970
 if rUD < -0.070:
2970
     if q2on == 0 and q8on == 0:
2971
     if q2on == 0 and q8on == 0:
2971
-        print("q1on")
2972
+        #print("q1on")
2972
         q1on = 1
2973
         q1on = 1
2973
         q1oncd = countdown
2974
         q1oncd = countdown
2974
         own["Q1oncd"] = q1oncd
2975
         own["Q1oncd"] = q1oncd
3476
     frames_since_ground = framenum - lF_air_frame
3477
     frames_since_ground = framenum - lF_air_frame
3477
     frames_since_grind = framenum - own['last_grind_frame']
3478
     frames_since_grind = framenum - own['last_grind_frame']
3478
     #print(frames_since_ground, "fsg")
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
         own['footplant_on'] = 1
3488
         own['footplant_on'] = 1
3497
     if grindHit == False:
3489
     if grindHit == False:
3498
         own['footplant_on'] = 0 
3490
         own['footplant_on'] = 0 
3499
     if own['footplant_on'] == True and rUD < turnsens and rUD > -turnsens:
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
     if own['footplant_on'] == 1 and own['last_footplant'] == True:
3495
     if own['footplant_on'] == 1 and own['last_footplant'] == True:
3502
         if skater.isPlayingAction(2925) == False:
3496
         if skater.isPlayingAction(2925) == False:
3503
             if STANCE == 0:
3497
             if STANCE == 0:
3504
                 own['requestAction'] = 'reg_fp_rback'
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
             if STANCE == 1:
3500
             if STANCE == 1:
3509
                 own['requestAction'] = 'fak_fp_rback'
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
 def invert():    
3504
 def invert():    
3524
     if LAST_GRIND == False and grindHit == True and own['grindpos'] == 'reg_board':
3505
     if LAST_GRIND == False and grindHit == True and own['grindpos'] == 'reg_board':
3525
         if lBump == 1:
3506
         if lBump == 1:

Loading…
Cancel
Save