shuvit 6 years ago
parent
commit
08badc6c24
3 changed files with 38 additions and 364 deletions
  1. 19
    163
      co_ActionState.py
  2. 13
    76
      controller2.py
  3. 6
    125
      walk.py

+ 19
- 163
co_ActionState.py View File

@@ -421,7 +421,6 @@ def main():
421 421
             requestAction = 'fak_ollie_south_out'
422 422
             actionState = 'fak_ollie_south_out'  
423 423
 
424
-
425 424
         if l_actionState == 'reg_air_nose to nmanual' and requestAction == 'fak_roll':
426 425
             requestAction = 'reg_nmanual_out'
427 426
         if l_actionState == 'fak_air_nose to nmanual' and requestAction == 'reg_roll':
@@ -431,14 +430,6 @@ def main():
431 430
         if l_actionState == 'fak_air_tail to manual' and requestAction == 'reg_roll':
432 431
             requestAction = 'fak_nmanual_out'            
433 432
 
434
-
435
-#'frontside_grab_out', 'backside_grab_out', 'fak_backside_grab_out', 'fak_frontside_grab_out', 'frontside_nose_grab_out', 'frontside_tail_grab_out', 'backside_nose_grab_out', 'backside_tail_grab_out', 'fak_frontside_nose_grab_out', 'fak_frontside_tail_grab_out', 'fak_backside_nose_grab_out', 'fak_backside_tail_grab_out', 
436
-
437
-#'frontside_grab', 'backside_grab', 'frontside_nose_grab', 'frontside_tail_grab', 'backside_nose_grab', 'backside_tail_grab',  
438
-
439
-#'fak_backside_grab', 'fak_frontside_grab', 'fak_frontside_nose_grab', 'fak_frontside_tail_grab', 'fak_backside_nose_grab', 'fak_backside_tail_grab', 
440
-
441
-
442 433
         if l_actionState == 'frontside_grab' and requestAction != 'frontside_grab':
443 434
             requestAction = 'frontside_grab_out'
444 435
             actionState = 'frontside_grab_out'
@@ -494,24 +485,17 @@ def main():
494 485
         if l_actionState == 'fak_walk_air' and requestAction != 'fak_walk_air':
495 486
             requestAction = 'fak_walk_air_out'
496 487
             actionState = 'fak_walk_air_out'                                             
497
-
498
-
499
-
500 488
         
501 489
         if requestAction in ('reg_roll', 'fak_roll') and l_actionState in ('reg_ollie_north_out', 'reg_ollie_north', 'reg_ollie_south_out', 'reg_ollie_south', 'frontside_grab', 'backside_grab', 'frontside_nose_grab', 'frontside_tail_grab', 'backside_nose_grab', 'backside_tail_grab', 'frontside_grab_out', 'backside_grab_out', 'frontside_nose_grab_out', 'frontside_tail_grab_out', 'backside_nose_grab_out', 'backside_tail_grab_out', 'reg_judo_out') and actionTimer < 2:
502 490
             requestAction = 'reg_land'
503 491
         if requestAction in ('fak_roll', 'reg_roll') and l_actionState in ('fak_ollie_north_out', 'fak_ollie_north', 'fak_ollie_south_out', 'fak_ollie_south', 'fak_backside_grab', 'fak_frontside_grab', 'fak_frontside_nose_grab', 'fak_frontside_tail_grab', 'fak_backside_nose_grab', 'fak_backside_tail_grab', 'fak_backside_grab_out', 'fak_frontside_grab_out', 'fak_frontside_nose_grab_out', 'fak_frontside_tail_grab_out', 'fak_backside_nose_grab_out', 'fak_backside_tail_grab_out', 'fak_judo_out') and actionTimer < 2:
504 492
             requestAction = 'fak_land'  
505 493
 
506
-
507 494
         if l_actionState in ('reg_air_tail', 'reg_air_nose') and requestAction in ('fak_opos', 'fak_nopos'):
508 495
             requestAction = 'fak_land'
509 496
         if l_actionState in ('fak_air_tail', 'fak_air_nose') and requestAction in ('reg_opos', 'reg_nopos'):
510 497
             requestAction = 'reg_land'            
511
-
512
-                                                                                  
513
-                   
514
-                                                                                                                    
498
+                                                                                                                                                                                        
515 499
     else:
516 500
         print("action over written")               
517 501
     def updateAction(requestAction, actionState):
@@ -1267,11 +1251,7 @@ def main():
1267 1251
                 actionState = 'fak_nmanual_revert_cw'
1268 1252
                 skater.playAction("fak_nmanual_revert_cw", 70,10, layer=trans_layer, priority=8, play_mode=0, speed=3)
1269 1253
                 deck.playAction("a_reg_manual_revert_cw", 70,10, layer=trans_layer, priority=1, play_mode=0, speed=3)
1270
-                trucks.playAction("a_reg_manual_revert_cw", 70,10, layer=trans_layer, priority=0, play_mode=0, speed=3)                 
1271
-            
1272
-            
1273
-            
1274
-            
1254
+                trucks.playAction("a_reg_manual_revert_cw", 70,10, layer=trans_layer, priority=0, play_mode=0, speed=3) 
1275 1255
             if requestAction == 'reg_nmanual_revert_ccw':
1276 1256
                 own['actionTimer'] = 21
1277 1257
                 own['actionState'] = 'reg_nmanual_revert_ccw'
@@ -1286,12 +1266,7 @@ def main():
1286 1266
                 actionState = 'reg_nmanual_revert_cw'
1287 1267
                 skater.playAction("reg_nmanual_revert_cw", 70,10, layer=trans_layer, priority=8, play_mode=0, speed=3)
1288 1268
                 deck.playAction("a_fak_manual_revert_cw", 70,10, layer=trans_layer, priority=1, play_mode=0, speed=3)
1289
-                trucks.playAction("a_fak_manual_revert_cw", 70,10, layer=trans_layer, priority=0, play_mode=0, speed=3)                                   
1290
-            
1291
-            
1292
-            
1293
-            
1294
-            
1269
+                trucks.playAction("a_fak_manual_revert_cw", 70,10, layer=trans_layer, priority=0, play_mode=0, speed=3) 
1295 1270
             if requestAction == 'revert1':
1296 1271
                 own['actionTimer'] = 18
1297 1272
                 own['actionState'] = 'revert1'
@@ -1568,7 +1543,6 @@ def main():
1568 1543
                 deck.playAction("a_reg_360fsshovit", flip_start_frame,20, layer=flip_layer, play_mode=0, speed=.5)
1569 1544
                 trucks.playAction("a_reg_360fsshovit", flip_start_frame,20, layer=flip_layer, play_mode=0, speed=.5) 
1570 1545
                      
1571
-
1572 1546
             #reg_jump
1573 1547
             if requestAction == 'reg_jump':
1574 1548
                 actionState = 'reg_jump'
@@ -1611,36 +1585,20 @@ def main():
1611 1585
                 deck.playAction("a_fak_noffboard", 10,1, layer=trans_layer, play_mode=0, speed=.5)
1612 1586
                 trucks.playAction("a_fak_noffboard", 10,1, layer=trans_layer, play_mode=0, speed=.5)
1613 1587
                 
1614
-                
1615
-                
1616 1588
             if requestAction == 'reg_offboard':
1617 1589
                 actionState = 'reg_offboard'
1618
-#                skater.stopAction(loop_layer)
1619
-#                deck.stopAction(loop_layer)
1620
-#                trucks.stopAction(loop_layer) 
1621
-#                skater.stopAction(trans_layer)
1622
-#                deck.stopAction(trans_layer)
1623
-#                trucks.stopAction(trans_layer)
1624 1590
                 own['actionTimer'] = 40
1625 1591
                 skater.playAction("reg_noffboard", 1,30, layer=trans_layer, play_mode=0, speed=.5)
1626 1592
                 deck.playAction("a_reg_noffboard", 1,30, layer=trans_layer, play_mode=0, speed=.5)
1627 1593
                 trucks.playAction("a_reg_noffboard", 1,30, layer=trans_layer, play_mode=0, speed=.5)
1628 1594
 
1629 1595
             if requestAction == 'fak_offboard':
1630
-                actionState = 'fak_offboard'
1631
-#                skater.stopAction(loop_layer)
1632
-#                deck.stopAction(loop_layer)
1633
-#                trucks.stopAction(loop_layer) 
1634
-#                skater.stopAction(trans_layer)
1635
-#                deck.stopAction(trans_layer)
1636
-#                trucks.stopAction(trans_layer)                
1596
+                actionState = 'fak_offboard'                
1637 1597
                 own['actionTimer'] = 40
1638 1598
                 skater.playAction("fak_noffboard", 1,30, layer=trans_layer, play_mode=0, speed=.5)
1639 1599
                 deck.playAction("a_fak_noffboard", 1,30, layer=trans_layer, play_mode=0, speed=.5)
1640 1600
                 trucks.playAction("a_fak_noffboard", 1,30, layer=trans_layer, play_mode=0, speed=.5)                
1641
-                
1642
-                
1643
-                
1601
+                              
1644 1602
             if requestAction == 'reg_powerslide_out':
1645 1603
                 actionState = 'reg_powerslide_out'
1646 1604
                 own['actionTimer'] = 40  
@@ -1810,10 +1768,7 @@ def main():
1810 1768
                 actionState = 'fak_air_tail to nmanual'                    
1811 1769
                 skater.playAction("fak_nmanual", 90,110, layer=trans_layer, play_mode=0, speed=1)                
1812 1770
                 deck.playAction("a_reg_manual", 90,110, layer=trans_layer, play_mode=0, speed=1)
1813
-                trucks.playAction("a_reg_manual", 90,110, layer=trans_layer, play_mode=0, speed=1)                                                 
1814
-                
1815
-                
1816
-                
1771
+                trucks.playAction("a_reg_manual", 90,110, layer=trans_layer, play_mode=0, speed=1)                                                                 
1817 1772
             if requestAction == 'reg_sit_out':
1818 1773
                 own['actionTimer'] = 28
1819 1774
                 actionState = 'reg_sit_out'                     
@@ -1828,15 +1783,7 @@ def main():
1828 1783
                 skater.playAction("fak_sit", 65, 30, layer=trans_layer, play_mode=0, speed=1)
1829 1784
                 deck.playAction("a_fak_sit", 65,30, layer=trans_layer, play_mode=0, speed=1)
1830 1785
                 trucks.playAction("a_fak_sit", 65,30, layer=trans_layer, play_mode=0, speed=1) 
1831
-                
1832
-                
1833
-                
1834
-                
1835
-                
1836
-                
1837
-                
1838
-                
1839
-                
1786
+                 
1840 1787
             if requestAction == 'reg_ollie_north_out':
1841 1788
                 actionState = 'reg_ollie_north_out'
1842 1789
                 own['actionState'] = 'reg_ollie_north_out'
@@ -1887,8 +1834,6 @@ def main():
1887 1834
                     skater.playAction("fak_ollie_north", 10,1, layer=trans_layer, play_mode=0, speed=1.5)
1888 1835
                     deck.playAction("a_reg", 10,1, layer=trans_layer, play_mode=0, speed=1.5)
1889 1836
                     trucks.playAction("a_reg", 10,1, layer=trans_layer, play_mode=0, speed=1.5)                                                           
1890
-                
1891
-                
1892 1837
             if requestAction == 'fak_ollie_south_out':
1893 1838
                 actionState = 'fak_ollie_south_out'
1894 1839
                 own['actionState'] = 'fak_ollie_south_out'
@@ -1905,22 +1850,6 @@ def main():
1905 1850
                     skater.playAction("fak_ollie_south", 10,1, layer=trans_layer, play_mode=0, speed=1.5)
1906 1851
                     deck.playAction("a_reg", 10,1, layer=trans_layer, play_mode=0, speed=1.5)
1907 1852
                     trucks.playAction("a_reg", 10,1, layer=trans_layer, play_mode=0, speed=1.5)                   
1908
-                
1909
-                
1910
-                                                                                        
1911
-            
1912
-
1913
-
1914
-
1915
-
1916
-
1917
-
1918
-
1919
-
1920
-
1921
-
1922
-
1923
-#'frontside_grab', 'backside_grab', 'fak_backside_grab', 'fak_frontside_grab', 'frontside_nose_grab', 'frontside_tail_grab', 'backside_nose_grab', 'backside_tail_grab', 'fak_frontside_nose_grab', 'fak_frontside_tail_grab', 'fak_backside_nose_grab', 'fak_backside_tail_grab', 
1924 1853
 
1925 1854
             if requestAction == 'frontside_grab_out':
1926 1855
                 actionState = 'frontside_grab_out'
@@ -2119,8 +2048,6 @@ def main():
2119 2048
                     deck.playAction("a_reg", 10,1, layer=trans_layer, play_mode=0, speed=1.5)
2120 2049
                     trucks.playAction("a_reg", 10,1, layer=trans_layer, play_mode=0, speed=1.5) 
2121 2050
                     
2122
-                    
2123
-                    
2124 2051
             if requestAction == 'reg_judo_out':
2125 2052
                 actionState = 'reg_judo_out'
2126 2053
                 own['actionState'] = 'reg_judo_out'
@@ -2154,10 +2081,6 @@ def main():
2154 2081
                     deck.playAction("a_reg", 10,1, layer=trans_layer, play_mode=0, speed=1)
2155 2082
                     trucks.playAction("a_reg", 10,1, layer=trans_layer, play_mode=0, speed=1)                     
2156 2083
 
2157
-
2158
-
2159
-                                                                         
2160
-                    
2161 2084
             if requestAction == 'reg_walk_air_out':
2162 2085
                 actionState = 'reg_walk_air_out'
2163 2086
                 own['actionState'] = 'reg_walk_air_out'
@@ -2192,7 +2115,6 @@ def main():
2192 2115
                     deck.playAction("a_fak_walk_air", 10,40, layer=trans_layer, play_mode=0, speed=1.5)
2193 2116
                     trucks.playAction("a_fak_walk_air", 10,40, layer=trans_layer, play_mode=0, speed=1.5)                     
2194 2117
                     
2195
-                    
2196 2118
             if requestAction == 'reg_air-walk_air':
2197 2119
                 actionState = 'reg_air-walk_air'
2198 2120
                 own['actionState'] = 'reg_air-walk_air'
@@ -2208,7 +2130,7 @@ def main():
2208 2130
                 else:                                          
2209 2131
                     skater.playAction("reg_walk_air", 50,60, layer=trans_layer, play_mode=0, speed=1)
2210 2132
                     deck.playAction("a_reg_walk_air", 50,60, layer=trans_layer, play_mode=0, speed=1)
2211
-                    trucks.playAction("a_reg_walk_air", 50,60, layer=trans_layer, play_mode=0, speed=1)                                                                                                                                             
2133
+                    trucks.playAction("a_reg_walk_air", 50,60, layer=trans_layer, play_mode=0, speed=1)         
2212 2134
 
2213 2135
             if requestAction == 'fak_air-walk_air':
2214 2136
                 actionState = 'fak_air-walk_air'
@@ -2225,8 +2147,7 @@ def main():
2225 2147
                 else:                                          
2226 2148
                     skater.playAction("fak_walk_air", 50,60, layer=trans_layer, play_mode=0, speed=1)
2227 2149
                     deck.playAction("a_fak_walk_air", 50,60, layer=trans_layer, play_mode=0, speed=1)
2228
-                    trucks.playAction("a_fak_walk_air", 50,60, layer=trans_layer, play_mode=0, speed=1)                                                                                                                                             
2229
-
2150
+                    trucks.playAction("a_fak_walk_air", 50,60, layer=trans_layer, play_mode=0, speed=1)                        
2230 2151
 
2231 2152
 
2232 2153
 
@@ -2629,11 +2550,6 @@ def main():
2629 2550
                     deck.playAction("a_reg", 1,60, layer=loop_layer, play_mode=1, speed=1) 
2630 2551
                     trucks.playAction("a_reg", 1,60, layer=loop_layer, play_mode=1, speed=1) 
2631 2552
                     
2632
-                    
2633
-                    
2634
-                    
2635
-                    
2636
-                    
2637 2553
             #reg_manual
2638 2554
             if requestAction == 'reg_manual':
2639 2555
                 actionState = 'reg_manual'
@@ -2673,7 +2589,6 @@ def main():
2673 2589
                     deck.playAction("a_fak_manual", 10,70, layer=loop_layer, play_mode=1, speed=.5)
2674 2590
                     trucks.playAction("a_fak_manual", 10,70, layer=loop_layer, play_mode=1, speed=.5)
2675 2591
                     
2676
-                    
2677 2592
             #reg_nmanual
2678 2593
             if requestAction == 'reg_nmanual':
2679 2594
                 actionState = 'reg_nmanual'
@@ -2713,7 +2628,6 @@ def main():
2713 2628
                     deck.playAction("a_reg_manual", 10,70, layer=loop_layer, play_mode=1, speed=.5)
2714 2629
                     trucks.playAction("a_reg_manual", 10,70, layer=loop_layer, play_mode=1, speed=.5) 
2715 2630
                  
2716
-                    
2717 2631
             if requestAction == 'reg_air':
2718 2632
                 actionState = 'reg_air'
2719 2633
                 skater.playAction("reg_air", 1,60, layer=loop_layer, play_mode=1, speed=.5)
@@ -2846,8 +2760,7 @@ def main():
2846 2760
                     skater.playAction("fak_backside_tail_grab", 10,30, layer=loop_layer, play_mode=1, speed=.5)
2847 2761
                     deck.playAction("a_reg", 10,30, layer=loop_layer, play_mode=1, speed=.5)
2848 2762
                     trucks.playAction("a_reg", 10,30, layer=loop_layer, play_mode=1, speed=.5) 
2849
-                    
2850
-                    
2763
+                     
2851 2764
             if requestAction == 'reg_judo':
2852 2765
                 actionState = 'reg_judo'
2853 2766
                 if l_actionState != 'reg_judo':
@@ -2869,9 +2782,6 @@ def main():
2869 2782
                     deck.playAction("a_reg", 10,30, layer=loop_layer, play_mode=1, speed=1)
2870 2783
                     trucks.playAction("a_reg", 10,30, layer=loop_layer, play_mode=1, speed=1)                                         
2871 2784
                     
2872
-                    
2873
-                    
2874
-                    
2875 2785
             if requestAction == 'reg_ollie_north':
2876 2786
                 actionState = 'reg_ollie_north'
2877 2787
                 if l_actionState != 'reg_ollie_north':
@@ -2912,8 +2822,6 @@ def main():
2912 2822
                     skater.playAction("fak_ollie_south", 10,10, layer=loop_layer, play_mode=1, speed=.5)
2913 2823
                     deck.playAction("a_reg", 10,10, layer=loop_layer, play_mode=1, speed=.5)
2914 2824
                     trucks.playAction("a_reg", 10,10, layer=loop_layer, play_mode=1, speed=.5)                                           
2915
-                    
2916
-                    
2917 2825
             if requestAction == 'reg_noseg':
2918 2826
                 actionState = 'reg_noseg'
2919 2827
                 if l_actionState != 'reg_noseg' and l_actionState != 'reg_air_nose':
@@ -3212,18 +3120,11 @@ def main():
3212 3120
                     trucks.stopAction(loop_layer)
3213 3121
                     skater.stopAction(flip_layer)
3214 3122
                     deck.stopAction(flip_layer)
3215
-                    trucks.stopAction(flip_layer)                    
3216
-                    # skater.playAction("reg_noseg.002", 1,10, layer=trans_layer, play_mode=0, speed=1)
3217
-                    # deck.playAction("a_reg_noseg.002", 1,10, layer=trans_layer, play_mode=0, speed=1)
3218
-                    # trucks.playAction("a_reg_noseg.002", 1,10, layer=trans_layer, play_mode=0, speed=1)        
3123
+                    trucks.stopAction(flip_layer)                           
3219 3124
                     skater.playAction("reg_noseg.002", 0,5, layer=trans_layer, play_mode=0, speed=.5)                
3220 3125
                     deck.playAction("a_reg_noseg.002", 0,5, layer=trans_layer, play_mode=0, speed=.5)
3221 3126
                     trucks.playAction("a_reg_noseg.002", 0,5, layer=trans_layer, play_mode=0, speed=.5)                        
3222 3127
                 else:
3223
-                    #pass
3224
-                    # skater.playAction("reg_noseg.002", 11,30, layer=loop_layer, play_mode=1, speed=.5)
3225
-                    # deck.playAction("a_reg_noseg.002", 11,30, layer=loop_layer, play_mode=1, speed=.5)
3226
-                    # trucks.playAction("a_reg_noseg.002", 11,30, layer=loop_layer, play_mode=1, speed=.5)
3227 3128
                     skater.playAction("reg_noseg.002", 5,5, layer=loop_layer, play_mode=1, speed=.5)                
3228 3129
                     deck.playAction("a_reg_noseg.002", 5,5, layer=loop_layer, play_mode=1, speed=.5)
3229 3130
                     trucks.playAction("a_reg_noseg.002", 5,5, layer=loop_layer, play_mode=1, speed=.5)                     
@@ -3238,18 +3139,11 @@ def main():
3238 3139
                     trucks.stopAction(flip_layer)                    
3239 3140
                     skater.playAction("fak_noseg", 40,35, layer=trans_layer, play_mode=0, speed=1)
3240 3141
                     deck.playAction("a_fak_noseg", 40,35, layer=trans_layer, play_mode=0, speed=1)
3241
-                    trucks.playAction("a_fak_noseg", 40,35, layer=trans_layer, play_mode=0, speed=1)        
3242
-                    #skater.playAction("fak_nmanual", 1,10, layer=trans_layer, play_mode=0, speed=.5)                
3243
-                    #deck.playAction("a_reg_manual", 1,10, layer=trans_layer, play_mode=0, speed=.5)
3244
-                    #trucks.playAction("a_reg_manual", 1,10, layer=trans_layer, play_mode=0, speed=.5)                    
3142
+                    trucks.playAction("a_fak_noseg", 40,35, layer=trans_layer, play_mode=0, speed=1)                           
3245 3143
                 else:
3246
-                    #pass
3247 3144
                     skater.playAction("fak_noseg", 35,35, layer=loop_layer, play_mode=1, speed=.5)
3248 3145
                     deck.playAction("a_fak_noseg", 35,35, layer=loop_layer, play_mode=1, speed=.5)
3249
-                    trucks.playAction("a_fak_noseg", 35,35, layer=loop_layer, play_mode=1, speed=.5)
3250
-                    #skater.playAction("fak_nmanual", 10,70, layer=loop_layer, play_mode=1, speed=.5)                
3251
-                    #deck.playAction("a_reg_manual", 10,70, layer=loop_layer, play_mode=1, speed=.5)
3252
-                    #trucks.playAction("a_reg_manual", 10,70, layer=loop_layer, play_mode=1, speed=.5)                    
3146
+                    trucks.playAction("a_fak_noseg", 35,35, layer=loop_layer, play_mode=1, speed=.5)                  
3253 3147
                     
3254 3148
             if requestAction == 'reg_air_tail':
3255 3149
                 actionState = 'reg_air_tail'
@@ -3262,18 +3156,12 @@ def main():
3262 3156
                     trucks.stopAction(flip_layer)                    
3263 3157
                     skater.playAction("reg_tailg.001", 40,35, layer=trans_layer, play_mode=0, speed=1)
3264 3158
                     deck.playAction("a_reg_tailg.001", 40,35, layer=trans_layer, play_mode=0, speed=1)
3265
-                    trucks.playAction("a_reg_tailg.001", 40,35, layer=trans_layer, play_mode=0, speed=1)
3266
-                    #skater.playAction("reg_manual", 1,10, layer=trans_layer, play_mode=0, speed=.5)                
3267
-                    #deck.playAction("a_reg_manual", 1,10, layer=trans_layer, play_mode=0, speed=.5)
3268
-                    #trucks.playAction("a_reg_manual", 1,10, layer=trans_layer, play_mode=0, speed=.5)                            
3159
+                    trucks.playAction("a_reg_tailg.001", 40,35, layer=trans_layer, play_mode=0, speed=1)                            
3269 3160
                 else:
3270 3161
                     #pass
3271 3162
                     skater.playAction("reg_tailg.001", 35,35, layer=loop_layer, play_mode=1, speed=.5)
3272 3163
                     deck.playAction("a_reg_tailg.001", 35,35, layer=loop_layer, play_mode=1, speed=.5)
3273
-                    trucks.playAction("a_reg_tailg.001", 35,35, layer=loop_layer, play_mode=1, speed=.5)
3274
-                    #skater.playAction("reg_manual", 10,70, layer=loop_layer, play_mode=1, speed=.5)                
3275
-                    #deck.playAction("a_reg_manual", 10,70, layer=loop_layer, play_mode=1, speed=.5)
3276
-                    #trucks.playAction("a_reg_manual", 10,70, layer=loop_layer, play_mode=1, speed=.5)                     
3164
+                    trucks.playAction("a_reg_tailg.001", 35,35, layer=loop_layer, play_mode=1, speed=.5)                   
3277 3165
             if requestAction == 'fak_air_tail':
3278 3166
                 actionState = 'fak_air_tail'
3279 3167
                 if l_actionState != 'fak_air_tail':
@@ -3285,18 +3173,11 @@ def main():
3285 3173
                     trucks.stopAction(flip_layer)                    
3286 3174
                     skater.playAction("fak_tailg", 40,35, layer=trans_layer, play_mode=0, speed=1)
3287 3175
                     deck.playAction("a_fak_tailg", 40,35, layer=trans_layer, play_mode=0, speed=1)
3288
-                    trucks.playAction("a_fak_tailg", 40,35, layer=trans_layer, play_mode=0, speed=1)
3289
-                    #skater.playAction("fak_manual", 1,10, layer=trans_layer, play_mode=0, speed=.5)                
3290
-                    #deck.playAction("a_fak_manual", 1,10, layer=trans_layer, play_mode=0, speed=.5)
3291
-                    #trucks.playAction("a_fak_manual", 1,10, layer=trans_layer, play_mode=0, speed=.5)                            
3176
+                    trucks.playAction("a_fak_tailg", 40,35, layer=trans_layer, play_mode=0, speed=1)                          
3292 3177
                 else:
3293
-                    #pass
3294 3178
                     skater.playAction("fak_tailg", 35,35, layer=loop_layer, play_mode=1, speed=.5)
3295 3179
                     deck.playAction("a_fak_tailg", 35,35, layer=loop_layer, play_mode=1, speed=.5)
3296 3180
                     trucks.playAction("a_fak_tailg", 35,35, layer=loop_layer, play_mode=1, speed=.5)
3297
-                    #skater.playAction("fak_manual", 10,70, layer=loop_layer, play_mode=1, speed=.5)                
3298
-                    #deck.playAction("a_fak_manual", 10,70, layer=loop_layer, play_mode=1, speed=.5)
3299
-                    #trucks.playAction("a_fak_manual", 10,70, layer=loop_layer, play_mode=1, speed=.5)                                         
3300 3181
             
3301 3182
             if requestAction == 'reg_stop':
3302 3183
                 actionState = 'reg_stop'
@@ -3319,7 +3200,6 @@ def main():
3319 3200
                     deck.playAction("a_reg", 30,30, layer=loop_layer, play_mode=1, speed=.5)
3320 3201
                     trucks.playAction("a_reg", 30,30, layer=loop_layer, play_mode=1, speed=.5)  
3321 3202
 
3322
-
3323 3203
             if requestAction == 'reg_fp_rback':
3324 3204
                 actionState = 'reg_fp_rback'
3325 3205
                 if l_actionState != 'reg_fp_rback':
@@ -3339,8 +3219,8 @@ def main():
3339 3219
                 else:
3340 3220
                     skater.playAction("fak_fp_rback", 10,10, layer=loop_layer, play_mode=1, speed=.5)
3341 3221
                     deck.playAction("a_fak_fp_rback", 10,10, layer=loop_layer, play_mode=1, speed=.5)
3342
-                    trucks.playAction("a_fak_fp_rback", 10,10, layer=loop_layer, play_mode=1, speed=.5)                                                              
3343
-                                 
3222
+                    trucks.playAction("a_fak_fp_rback", 10,10, layer=loop_layer, play_mode=1, speed=.5)         
3223
+
3344 3224
             if requestAction == 'reg_back_invert':
3345 3225
                 actionState = 'reg_back_invert'
3346 3226
                 if l_actionState != 'reg_back_invert':
@@ -3362,11 +3242,8 @@ def main():
3362 3242
                     deck.playAction("a_fak_fr_invert", 30,30, layer=loop_layer, play_mode=1, speed=1)
3363 3243
                     trucks.playAction("a_fak_fr_invert", 30,30, layer=loop_layer, play_mode=1, speed=1)           
3364 3244
                     
3365
-                    
3366
-                    
3367 3245
             if requestAction == 'reg_hippy_in':
3368 3246
                 actionState = 'reg_hippy_in'
3369
-                #own['actionTimer'] = 10
3370 3247
                 if l_actionState != 'reg_hippy_in':
3371 3248
                     skater.playAction("reg_hippy", 1,10, layer=trans_layer, play_mode=0, speed=.5)
3372 3249
                     deck.playAction("a_reg", 1,10, layer=trans_layer, play_mode=0, speed=.5)
@@ -3377,7 +3254,6 @@ def main():
3377 3254
                     trucks.playAction("a_reg", 10,10, layer=loop_layer, play_mode=1, speed=.5)   
3378 3255
             if requestAction == 'fak_hippy_in':
3379 3256
                 actionState = 'fak_hippy_in'
3380
-                #own['actionTimer'] = 10
3381 3257
                 if l_actionState != 'fak_hippy_in':
3382 3258
                     skater.playAction("fak_hippy", 1,10, layer=trans_layer, play_mode=0, speed=.5)
3383 3259
                     deck.playAction("a_reg", 1,10, layer=trans_layer, play_mode=0, speed=.5)
@@ -3409,9 +3285,7 @@ def main():
3409 3285
                             deck.playAction("a_reg_nwalk", cur_frame,0, layer=loop_layer, play_mode=0, speed=.5)
3410 3286
                             trucks.playAction("a_reg_nwalk", cur_frame,0, layer=loop_layer, play_mode=0, speed=.5)
3411 3287
                     else:
3412
-                        #print("#####")
3413 3288
                         trans_playing = skater.isPlayingAction(trans_layer)
3414
-                        #if trans_playing == 1:
3415 3289
                 else:        
3416 3290
                     skater.playAction("reg_idle1", 1,120, layer=loop_layer, play_mode=0, speed=.5)
3417 3291
                     deck.playAction("a_reg_idle1", 1,120, layer=loop_layer, play_mode=0, speed=.5)
@@ -3434,7 +3308,6 @@ def main():
3434 3308
                     else:
3435 3309
                         trans_playing = skater.isPlayingAction(trans_layer)
3436 3310
                         if trans_playing == 1:
3437
-                            #pass
3438 3311
                             skater.playAction("reg_idle1", 1,120, layer=loop_layer, play_mode=0, speed=.5)
3439 3312
                 else:
3440 3313
                     skater.playAction("reg_idle1", 1,120, layer=loop_layer, play_mode=0, speed=.5)            
@@ -3461,8 +3334,6 @@ def main():
3461 3334
                     else:
3462 3335
                         trans_playing = skater.isPlayingAction(trans_layer)
3463 3336
                 else:        
3464
-                        #if trans_playing == 1:
3465
-                            #pass
3466 3337
                     skater.playAction("fak_idle1", 1,120, layer=loop_layer, play_mode=0, speed=.5)     
3467 3338
                                      
3468 3339
 
@@ -3525,8 +3396,6 @@ def main():
3525 3396
                 skater.playAction("reg_idle7", 1,120, layer=loop_layer, play_mode=0, speed=.5)
3526 3397
                 deck.playAction("a_reg_idle7", 1,120, layer=loop_layer, play_mode=0, speed=.5)
3527 3398
                 trucks.playAction("a_reg_idle7", 1,120, layer=loop_layer, play_mode=0, speed=.5) 
3528
-
3529
-
3530 3399
             if requestAction == 'fak_idle1':
3531 3400
                 actionState = 'fak_idle1'
3532 3401
                 skater.playAction("fak_idle1", 1,120, layer=loop_layer, play_mode=0, speed=.5)
@@ -3673,14 +3542,12 @@ def main():
3673 3542
                 if l_requestAction != 'fak_walkFast':
3674 3543
                     if l_requestAction == 'fak_walk':
3675 3544
                         cur_frame = skater.getActionFrame(loop_layer)
3676
-                        #actionState = 'fak_walkFast'
3677 3545
                         skater.playAction("fak_nwalk", 0,35, layer=loop_layer, play_mode=1, speed=1)         
3678 3546
                         deck.playAction("a_fak_nwalk", 0,35, layer=loop_layer, play_mode=1, speed=1)
3679 3547
                         trucks.playAction("a_fak_nwalk", 0,35, layer=loop_layer, play_mode=1, speed=1)       
3680 3548
                         skater.setActionFrame(cur_frame, loop_layer)
3681 3549
                         deck.setActionFrame(cur_frame, loop_layer)
3682 3550
                         trucks.setActionFrame(cur_frame, loop_layer)                    
3683
-                    #pass
3684 3551
                 #loop
3685 3552
                 else:
3686 3553
                     skater.playAction("fak_nwalk", 0,35, layer=loop_layer, play_mode=1, speed=1)             
@@ -3703,7 +3570,6 @@ def main():
3703 3570
 
3704 3571
             if requestAction == 'reg_dropin_pos':
3705 3572
                 actionState = 'reg_dropin_pos'
3706
-                #own['actionTimer'] = 10
3707 3573
                 if l_actionState != 'reg_dropin_pos':
3708 3574
                     skater.playAction("reg_dropin3", 30,50, layer=trans_layer, play_mode=0, speed=.5)
3709 3575
                     deck.playAction("a_reg_dropin3", 30,50, layer=trans_layer, play_mode=0, speed=.5)
@@ -3716,7 +3582,6 @@ def main():
3716 3582
                     
3717 3583
             if requestAction == 'fak_dropin_pos':
3718 3584
                 actionState = 'fak_dropin_pos'
3719
-                #own['actionTimer'] = 10
3720 3585
                 if l_actionState != 'fak_dropin_pos':
3721 3586
                     skater.playAction("nfak_dropin", 30,50, layer=trans_layer, play_mode=0, speed=.5)
3722 3587
                     deck.playAction("a_fak_dropin", 30,50, layer=trans_layer, play_mode=0, speed=.5)
@@ -3728,7 +3593,6 @@ def main():
3728 3593
 
3729 3594
             if requestAction == 'reg_sit':
3730 3595
                 actionState = 'reg_sit'
3731
-                #own['actionTimer'] = 30
3732 3596
                 if l_actionState != 'reg_sit':      
3733 3597
                     skater.playAction("reg_sit", 1,65, layer=trans_layer, play_mode=0, speed=1)
3734 3598
                     deck.playAction("a_reg_sit", 1,65, layer=trans_layer, play_mode=0, speed=1)
@@ -3740,7 +3604,6 @@ def main():
3740 3604
 
3741 3605
             if requestAction == 'fak_sit':
3742 3606
                 actionState = 'fak_sit'
3743
-                #own['actionTimer'] = 30
3744 3607
                 if l_actionState != 'fak_sit':      
3745 3608
                     skater.playAction("fak_sit", 1,65, layer=trans_layer, play_mode=0, speed=1)
3746 3609
                     deck.playAction("a_fak_sit", 1,65, layer=trans_layer, play_mode=0, speed=1)
@@ -3752,7 +3615,6 @@ def main():
3752 3615
                     
3753 3616
             if requestAction == 'reg_walk_air':
3754 3617
                 actionState = 'reg_walk_air'
3755
-                #own['actionTimer'] = 30
3756 3618
                 if l_actionState not in ('reg_walk_air', 'reg_jump', 'reg_air-walk_air'):      
3757 3619
                     skater.playAction("reg_walk_air", 1,10, layer=trans_layer, play_mode=0, speed=1)
3758 3620
                     deck.playAction("a_reg_walk_air", 1,10, layer=trans_layer, play_mode=0, speed=1)
@@ -3763,7 +3625,6 @@ def main():
3763 3625
                     trucks.playAction("a_reg_walk_air", 10,10, layer=loop_layer, play_mode=1, speed=0)                                        
3764 3626
             if requestAction == 'fak_walk_air':
3765 3627
                 actionState = 'fak_walk_air'
3766
-                #own['actionTimer'] = 30
3767 3628
                 if l_actionState not in ('fak_walk_air', 'fak_jump', 'fak_air-walk_air'):      
3768 3629
                     skater.playAction("fak_walk_air", 1,10, layer=trans_layer, play_mode=0, speed=1)
3769 3630
                     deck.playAction("a_fak_walk_air", 1,10, layer=trans_layer, play_mode=0, speed=1)
@@ -3771,17 +3632,12 @@ def main():
3771 3632
                 else:
3772 3633
                     skater.playAction("fak_walk_air", 10,10, layer=loop_layer, play_mode=1, speed=0)
3773 3634
                     deck.playAction("a_fak_walk_air", 10,10, layer=loop_layer, play_mode=1, speed=0)
3774
-                    trucks.playAction("a_fak_walk_air", 10,10, layer=loop_layer, play_mode=1, speed=0)                                              
3775
-        
3635
+                    trucks.playAction("a_fak_walk_air", 10,10, layer=loop_layer, play_mode=1, speed=0)                            
3776 3636
             own['actionState'] = actionState
3777 3637
         else:
3778 3638
             pass
3779 3639
         own['actionState'] = actionState
3780 3640
         return actionState
3781
-    
3782
-    #if (own['actionState'] == 'reg_dropin' and own['requestAction'] == 'reg_roll':
3783
-        #own['requestAction'] = 'reg_dropin'
3784
-    
3785 3641
             
3786 3642
     l_playing = skater.isPlayingAction(loop_layer)
3787 3643
     t_playing = skater.isPlayingAction(trans_layer)        

+ 13
- 76
controller2.py View File

@@ -1188,14 +1188,8 @@ def main():
1188 1188
             jump()
1189 1189
         if r_ground.triggered == 0 and STANCE == False:
1190 1190
             own["wallride_off"] = 1
1191
-            if own["wallride"] != None:
1192
-                print("wall out trick") 
1193
-                #jump()  
1194 1191
         elif r_ground.triggered == 0 and STANCE == True:
1195 1192
             own["wallride_off"] = 1
1196
-            if own["wallride"] != None:
1197
-                print("wall out trick") 
1198
-                #jump()
1199 1193
         
1200 1194
     def heelflip():
1201 1195
         print("heelflip")
@@ -1211,14 +1205,9 @@ def main():
1211 1205
             jump()
1212 1206
         if r_ground.triggered == 0 and STANCE == False:
1213 1207
             own["wallride_off"] = 1
1214
-            if own["wallride"] != None:
1215
-                print("wall out trick")
1216
-                #jump()
1217 1208
         elif r_ground.triggered == 0 and STANCE == True:
1218 1209
             own["wallride_off"] = 1
1219
-            if own["wallride"] != None:
1220
-                print("wall out trick") 
1221
-                #jump()
1210
+            
1222 1211
     def nollie_heelflip():
1223 1212
         print("heelflip")
1224 1213
         dict['trick_string'] = 'Nollie Heelflip'
@@ -2299,7 +2288,6 @@ def main():
2299 2288
                 trucks.stopAction(fliplay)
2300 2289
                 killall() 
2301 2290
                 if own['dropinCol'] == True:
2302
-                    print("dropinanim")
2303 2291
                     own['requestAction'] = 'reg_dropin'
2304 2292
                     own['dropinTimer'] = 60
2305 2293
                 else:
@@ -2307,7 +2295,6 @@ def main():
2307 2295
                     force = (linVelocity.x -1, linVelocity.y, linVelocity.z)
2308 2296
                     if own['dropinTimer'] == 0:
2309 2297
                         own.setLinearVelocity(force, True)
2310
-                        print('onboard vel')
2311 2298
             if STANCE == 1:
2312 2299
                 skater.stopAction(fliplay)
2313 2300
                 deck.stopAction(fliplay)
@@ -2435,20 +2422,16 @@ def main():
2435 2422
             killact(2)
2436 2423
             killact(4)
2437 2424
             if STANCE == 0:
2438
-                own['requestAction'] = 'reg_air_tail'
2439
-                print("reg_air_tail")    
2425
+                own['requestAction'] = 'reg_air_tail' 
2440 2426
             else:
2441 2427
                 own['requestAction'] = 'fak_air_tail' 
2442
-                print("fak_air_tail")
2443 2428
         elif rUD < -.040 and r_ground.triggered == False and GRAB_ON == False and wr == None and jump_timer < 30:
2444 2429
             killact(2)
2445 2430
             killact(4)
2446 2431
             if STANCE == 0:
2447 2432
                 own['requestAction'] = 'reg_air_nose' 
2448
-                #print("reg_air_nose")
2449 2433
             else:
2450 2434
                 own['requestAction'] = 'fak_air_nose' 
2451
-                #print("fak_air_nose")
2452 2435
 
2453 2436
     def air_turn_boost():
2454 2437
         pass
@@ -2469,22 +2452,17 @@ def main():
2469 2452
         frames_since_ground = framenum - lF_air_frame    
2470 2453
         if own['manual_v2_type'] == 'reg manual': 
2471 2454
             own['requestAction'] = 'reg_manual_revert_ccw'   
2472
-            print("reg")
2473 2455
         elif own['manual_v2_type'] == 'reg nose manual':
2474
-            own['requestAction'] = 'reg_nmanual_revert_ccw'  
2475
-            print("reg nose manual revert")             
2456
+            own['requestAction'] = 'reg_nmanual_revert_ccw'              
2476 2457
         elif own['manual_v2_type'] == 'fak manual': 
2477 2458
             own['requestAction'] = 'fak_manual_revert_ccw'   
2478
-            print("fak manual revert")
2479 2459
         elif own['manual_v2_type'] == 'fak nose manual': 
2480
-            own['requestAction'] = 'fak_nmanual_revert_ccw'   
2481
-            print("fak")           
2460
+            own['requestAction'] = 'fak_nmanual_revert_ccw'            
2482 2461
         else:
2483 2462
             if STANCE == 0:
2484 2463
                 own['requestAction'] = 'revert1'            
2485 2464
             else:
2486
-                own['requestAction'] = 'fak_revert1'
2487
-                print('flip rev')            
2465
+                own['requestAction'] = 'fak_revert1'           
2488 2466
         own['revert_timer'] = 20 
2489 2467
         cont.activate(own.actuators["revertSound"]) 
2490 2468
         own['revert_sound'] = 1     
@@ -2499,16 +2477,12 @@ def main():
2499 2477
         own.applyRotation(rot,local)
2500 2478
         if own['manual_v2_type'] == 'reg manual': 
2501 2479
             own['requestAction'] = 'reg_manual_revert_cw'   
2502
-            print("reg")
2503 2480
         elif own['manual_v2_type'] == 'reg nose manual':    
2504
-            own['requestAction'] = 'reg_nmanual_revert_cw'
2505
-            print("reg nose manual revert")             
2481
+            own['requestAction'] = 'reg_nmanual_revert_cw'            
2506 2482
         elif own['manual_v2_type'] == 'fak manual':    
2507 2483
             own['requestAction'] = 'fak_manual_revert_cw'
2508
-            print("fak manual revert")
2509 2484
         elif own['manual_v2_type'] == 'fak nose manual':    
2510 2485
             own['requestAction'] = 'fak_nmanual_revert_cw'
2511
-            print("fak")   
2512 2486
         else:     
2513 2487
             if STANCE == 0:
2514 2488
                 own['requestAction'] = 'revert2'       
@@ -2525,20 +2499,15 @@ def main():
2525 2499
         own["Q3oncdl"] = 0
2526 2500
         local = True
2527 2501
         rot = [ 0.0, 0.0, 3.14]
2528
-        own.applyRotation(rot,local) 
2529
-        print("real revert 3")  
2502
+        own.applyRotation(rot,local)  
2530 2503
         if own['manual_v2_type'] == 'reg manual':  
2531 2504
             own['requestAction'] = 'reg_manual_revert_ccw'  
2532
-            print("reg")
2533 2505
         elif own['manual_v2_type'] == 'reg nose manual':    
2534
-            own['requestAction'] = 'reg_nmanual_revert_ccw'
2535
-            print("reg nose manual revert")             
2506
+            own['requestAction'] = 'reg_nmanual_revert_ccw'            
2536 2507
         elif own['manual_v2_type'] == 'fak manual': 
2537 2508
             own['requestAction'] = 'fak_manual_revert_ccw'   
2538
-            print("fak manual revert")
2539 2509
         elif own['manual_v2_type'] == 'fak nose manual':
2540 2510
             own['requestAction'] = 'fak_nmanual_revert_ccw'    
2541
-            print("fak")   
2542 2511
         else:  
2543 2512
             if STANCE == 0:     
2544 2513
                 own['requestAction'] = 'revert3' 
@@ -2558,22 +2527,17 @@ def main():
2558 2527
         own.applyRotation(rot,local)  
2559 2528
         if own['manual_v2_type'] == 'reg manual':    
2560 2529
             own['requestAction'] = 'reg_manual_revert_cw'
2561
-            print("reg")
2562 2530
         elif own['manual_v2_type'] == 'reg nose manual':    
2563
-            own['requestAction'] = 'reg_nmanual_revert_cw'
2564
-            print("reg nose manual revert")             
2531
+            own['requestAction'] = 'reg_nmanual_revert_cw'           
2565 2532
         elif own['manual_v2_type'] == 'fak manual':    
2566 2533
             own['requestAction'] = 'fak_manual_revert_cw'
2567
-            print("fak manual revert")
2568 2534
         elif own['manual_v2_type'] == 'fak nose manual':    
2569 2535
             own['requestAction'] = 'fak_nmanual_revert_cw'
2570
-            print("fak") 
2571 2536
         else:
2572 2537
             if STANCE == 0:
2573 2538
                 own['requestAction'] = 'revert4'
2574 2539
             else:
2575
-                own['requestAction'] = 'fak_revert2'     
2576
-            print("normal revert")        
2540
+                own['requestAction'] = 'fak_revert2'           
2577 2541
         own['revert_timer'] = 20 
2578 2542
         cont.activate(own.actuators["revertSound"]) 
2579 2543
         own['revert_sound'] = 1      
@@ -2793,22 +2757,18 @@ def main():
2793 2757
 
2794 2758
         if q3oncdl < q4oncdl < q5oncdl < q6oncdl < q7oncdl:
2795 2759
             if r_ground.triggered == True:
2796
-                print("REVERT!!!")
2797 2760
                 revert()
2798 2761
                 own['set_revert_timer'] = 1
2799 2762
         if q3oncdl > q4oncdl > q5oncdl > q6oncdl > q7oncdl:
2800 2763
             if r_ground.triggered == True:
2801
-                print("REVERT2!!!")
2802 2764
                 revert2()
2803 2765
                 own['set_revert_timer'] = 1
2804 2766
         if q7oncdl < q8oncdl < q1oncdl < q2oncdl < q3oncdl:
2805 2767
             if r_ground.triggered == True:
2806
-                print("REVERT3!!!")
2807 2768
                 revert3()
2808 2769
                 own['set_revert_timer'] = 1
2809 2770
         if q7oncdl > q8oncdl > q1oncdl > q2oncdl > q3oncdl:
2810 2771
             if r_ground.triggered == True:
2811
-                print("REVERT4!!!")
2812 2772
                 revert4()
2813 2773
                 own['set_revert_timer'] = 1           
2814 2774
     ################
@@ -3034,7 +2994,6 @@ def main():
3034 2994
 
3035 2995
     #nollie 360 shovit
3036 2996
     if q7oncd > 0 and q8oncd > 0 and q1oncd > 0 and q2oncd > 0 and q3oncd > 0 and q7oncd <= q8oncd <= q1oncd <= q2oncd <= q3oncd:
3037
-        print("q4oncd: ", q4oncd, " q5oncd: ", q5oncd, " q6oncd: ", q6oncd)
3038 2997
         print ("Nollie 360 shovit")
3039 2998
         dict['trick_string'] = 'Nollie 360 Shovit'
3040 2999
         nollie_shovit360()
@@ -3262,24 +3221,18 @@ def main():
3262 3221
                 local = True
3263 3222
                 rot = [ 0.0, 0.0, 3.14]
3264 3223
                 own.applyRotation(rot,local)
3265
-                print("hippy turn")
3266 3224
                 if STANCE == 0:
3267 3225
                     own['requestAction'] = 'reg_hippy_ncw'
3268
-                    print('%hip1')
3269 3226
                 if STANCE == 1:
3270 3227
                     own['requestAction'] = 'fak_hippy_ncw'                
3271
-                    print('%hip2')
3272 3228
             elif rLR < -turnsens:
3273 3229
                 local = True
3274 3230
                 rot = [ 0.0, 0.0, -3.14]
3275
-                own.applyRotation(rot,local)
3276
-                print("hippy turn neg")            
3231
+                own.applyRotation(rot,local)            
3277 3232
                 if STANCE == 0:
3278 3233
                     own['requestAction'] = 'fak_hippy_nccw'  
3279
-                    print('%hip3')
3280 3234
                 if STANCE == 1:
3281 3235
                     own['requestAction'] = 'reg_hippy_nccw'
3282
-                    print('%hip4')
3283 3236
     ##straight        
3284 3237
             else:
3285 3238
                 if STANCE == 0:
@@ -3288,7 +3241,6 @@ def main():
3288 3241
                     own['requestAction'] = 'fak_hippy'                                       
3289 3242
 
3290 3243
     #pushing and hippy jumps
3291
-
3292 3244
     since_a = frame - lastaf
3293 3245
     since_x = frame - lastxf
3294 3246
     cush = 10
@@ -3425,10 +3377,8 @@ def main():
3425 3377
         frames_since_ground = framenum - lF_air_frame
3426 3378
         frames_since_grind = framenum - own['last_grind_frame']
3427 3379
         if grindHit == True and aBut == True:
3428
-            print("first invert check")
3429 3380
             own.linearVelocity.x = 0
3430
-            own.linearVelocity.y = 0
3431
-            #own.setLinearVelocity([0,0,0],0)                          
3381
+            own.linearVelocity.y = 0                         
3432 3382
             own['footplant_on'] = 1
3433 3383
         if grindHit == False:
3434 3384
             own['footplant_on'] = 0 
@@ -3469,13 +3419,9 @@ def main():
3469 3419
         if frame - lif > 3 and own['invert_on'] == 0:
3470 3420
             own['invert_type'] = None
3471 3421
             
3472
-        #if grindHit == False:
3473
-            #own['invert_on'] = False    
3474
-
3475 3422
     invert() 
3476 3423
     footplant()
3477 3424
         
3478
-      
3479 3425
     if own['invert_on'] == 0: 
3480 3426
         killact(900)
3481 3427
         
@@ -3573,7 +3519,6 @@ def main():
3573 3519
                 if lUD < -0.080:
3574 3520
                     followcam.actuators["up"].dLoc = [ 0, 0, -camspeed2]
3575 3521
                     cont.activate(followcam.actuators["up"])
3576
-                    #print("fastup")
3577 3522
                 else:
3578 3523
                     cont.deactivate(followcam.actuators["up"])    
3579 3524
     #            #down    
@@ -3598,7 +3543,6 @@ def main():
3598 3543
                 if rUD < -0.080:
3599 3544
                     followcam.actuators["rotup"].dLoc = [0, 0, camrot2]
3600 3545
                     cont.activate(followcam.actuators["rotup"])
3601
-                    #print("uppppppppppppppppppppppppppp")
3602 3546
                 else:
3603 3547
                     cont.deactivate(followcam.actuators["rotup"])    
3604 3548
     #            #down    
@@ -3625,7 +3569,6 @@ def main():
3625 3569
                 if lUD > -0.080 and lUD < -0.030:
3626 3570
                     followcam.actuators["up"].dLoc = [ 0, 0, -camspeed1]
3627 3571
                     cont.activate(followcam.actuators["up"])
3628
-                    #print(lUD)
3629 3572
                 else:
3630 3573
                     cont.deactivate(followcam.actuators["up"])    
3631 3574
     #            #down    
@@ -3859,10 +3802,8 @@ def main():
3859 3802
             STANCE = own['grind_stance'] 
3860 3803
             if 'fak' in own['l_actionState']:
3861 3804
                 STANCE = 1
3862
-                #print('changing stance 1')
3863 3805
             if 'reg' in own['l_actionState']:
3864
-                STANCE = 0
3865
-                #print('changing stance 0')                
3806
+                STANCE = 0          
3866 3807
             if own['grindpos'] == 'reg_5050':
3867 3808
                 if lq3on == 1 or lq2on:
3868 3809
                     if own['gt_cd2'] == 0:
@@ -4010,7 +3951,6 @@ def main():
4010 3951
                 own.setLinearVelocity([outvel.x * 1.01, outvel.y, outvel.z], True)
4011 3952
             if own['grind_out_type'] == 'reg fak right' or own['grind_out_type'] == 'reg fak left' or own['grind_out_type'] == 'fak fak right' or own['grind_out_type'] == 'fak fak left':
4012 3953
                 if own['gt_cd2'] == 51:
4013
-                    #print('outforce')
4014 3954
                     if STANCE == False:
4015 3955
                         own.applyForce([-200, 0, 0], True)
4016 3956
                         own['stance'] = True
@@ -4088,7 +4028,6 @@ def main():
4088 4028
                 cont.activate(wallrideconstR)
4089 4029
                 force = [0,-sideforce,upforce]
4090 4030
                 own.applyForce(force,1)
4091
-                #own.alignAxisToVect(obj.worldPosition, 1, .9)
4092 4031
                 if STANCE == 0: 
4093 4032
                     own['requestAction'] = 'reg_wall_l'
4094 4033
                 else:
@@ -4114,7 +4053,6 @@ def main():
4114 4053
         own['revert_timer'] = own['revert_timer'] - 1 
4115 4054
         
4116 4055
     def shutoff_timers():
4117
-        #print(wallride)
4118 4056
         if (LAST_GRIND == False and grindHit == True) or (jump_timer > 10 and own['wallride'] == None):
4119 4057
             own["Q1oncd"] = 0
4120 4058
             own["Q2oncd"] = 0
@@ -4180,7 +4118,6 @@ def main():
4180 4118
                 vel = [linVelocity.x + .25, linVelocity.y, linVelocity.z - .01]
4181 4119
             local = True
4182 4120
             own.applyRotation(rot,local)
4183
-            #force = (linVelocity.x - .25, linVelocity.y, linVelocity.z - .01 )
4184 4121
             own.setLinearVelocity(vel, local)            
4185 4122
         if own['dropinTimer'] == 50:
4186 4123
             if STANCE == 1:

+ 6
- 125
walk.py View File

@@ -79,14 +79,8 @@ followcam = scene.objects["followcam"]
79 79
 
80 80
 noidle = 0
81 81
 
82
-#playing_deck = deck.isPlayingAction(deckon)
83
-#playing_trucks = trucks.isPlayingAction(truckon)
84
-#if playing_deck == 1 or playing_trucks == 1:
85
-#    noidle = 1
86
-    
87 82
 if skater.isPlayingAction(460):  
88 83
     noidle = 1  
89
-    
90 84
 
91 85
 if own["stance"] == None:
92 86
     own["stance"] = True
@@ -254,16 +248,7 @@ elif lup == 1 and aBut == 1 and yBut == False and (r_ground.positive or own['sta
254 248
             own['requestAction'] = 'fak_walkFast'             
255 249
 else:
256 250
     vel = own.getLinearVelocity(True)
257
-    cont.deactivate(own.actuators["walkondirt"])
258
-#    if stance == 0:
259
-#        cont.deactivate(skater.actuators['aWalk'])
260
-#        cont.deactivate(deck.actuators['a_reg_walk'])
261
-#        cont.deactivate(trucks.actuators['a_reg_walk'])        
262
-
263
-#    if stance == 1:
264
-#        cont.deactivate(skater.actuators['aWalk_fak'])
265
-#        cont.deactivate(deck.actuators['a_fak_walk'])
266
-#        cont.deactivate(trucks.actuators['a_fak_walk'])        
251
+    cont.deactivate(own.actuators["walkondirt"])       
267 252
 
268 253
 #in air        
269 254
 if lup == 1 and r_ground.positive == False:
@@ -271,7 +256,6 @@ if lup == 1 and r_ground.positive == False:
271 256
     if stance == 0:
272 257
         cont.deactivate(own.actuators['forward'])
273 258
         cont.deactivate(own.actuators['forward2'])
274
-        #cont.deactivate(skater.actuators['aWalk'])
275 259
         killact(4)
276 260
         killact(5)
277 261
         killact(6)
@@ -281,7 +265,6 @@ if lup == 1 and r_ground.positive == False:
281 265
     if stance == 1:    
282 266
         cont.deactivate(own.actuators['backward'])
283 267
         cont.deactivate(own.actuators['backward2'])
284
-        #cont.deactivate(skater.actuators['aWalk_fak'])
285 268
         killact(4)
286 269
         killact(5)
287 270
         killact(6)
@@ -310,29 +293,15 @@ else:
310 293
 camera.height = .9 #-.4
311 294
 camera.min = 1.5
312 295
 camera.max = 2
313
-#camera.object = "Char4:Mhair01"
314
-#camera.damping = 0
315
-#camera.axis = 4 
316 296
 lasty = own['lasty']     
317
-#if yBut == False and lasty == True:
318
-
319
-#    if own['walk'] == 1: 
320
-#        killact(fliplay) 
321
-        #killall() 
322
-    #camera.damping = 0     
323
-    #camera.axis = 4            
324
-#print(stance)
325
-
326 297
 
327 298
 def onboard():
328
-#    pass
329 299
     if own['walk'] == 0:
330 300
         print("start walking")
331 301
         if own['framenum'] > 100 and own['fall'] == False:
332 302
             #pass
333 303
             cont.activate(own.actuators['pop'])
334 304
         own['getoffboard'] = False
335
-        #set_vibration(0, 0.0, 0.0)
336 305
         fliplay = 301
337 306
         fliplay2 = 302 
338 307
         fliplay3 = 303
@@ -349,18 +318,12 @@ def onboard():
349 318
             pass
350 319
          
351 320
         if STANCE == 0:
352
-            #killact(3)
353
-            #killact(4)
354
-            killall()
355 321
             skater.stopAction(fliplay)
356 322
             deck.stopAction(deckon)
357 323
             trucks.stopAction(truckon)
358 324
             own['requestAction'] = 'reg_offboard'             
359 325
             
360 326
         if STANCE == 1:
361
-            killact(3)
362
-            killact(4)
363
-            killall()
364 327
             skater.stopAction(fliplay)
365 328
             deck.stopAction(deckon)
366 329
             trucks.stopAction(truckon)
@@ -394,24 +357,8 @@ def getonboard():
394 357
     getonboard = own['getonboard']
395 358
     fliplay2 = 50#8560
396 359
     if yBut == True:
397
-        #camera.height = -.4
398
-        #camera.min = 1.5
399
-        #camera.max = 2 #2
400
-        #camera.damping = .99
401
-        #camera.axis = 0
402
-        
403
-        #cont.deactivate(cam.actuators['replayCam'])
404
-        #cont.deactivate(cam.actuators['Camera'])
405
-        #camera.height = 10 #-.5
406
-        #print("high cam")
407
-        #camera.min = .75
408
-        #camera.max = 1.25
409
-        #cont.activate(cam.actuators['Camera']) 
410
-        
411
-
412 360
         fliplay3 = fliplay2 + 1 
413 361
         if dropinCol.positive == True: 
414
-                       
415 362
             nearestObject = None
416 363
             grindEmpty = scene.objects['grindEmpty']
417 364
             grindDar = grindEmpty.sensors['grindDar2']
@@ -433,8 +380,6 @@ def getonboard():
433 380
                 grinder_e = obj.worldOrientation.to_euler()
434 381
                 grinder_rotz = math.degrees(grinder_e[2])            
435 382
                 rot = player_rotz - grinder_rotz  
436
-                
437
-                
438 383
                 grinder_pos = obj.worldPosition 
439 384
                 worldVect = [1, 0, 0]
440 385
                 vect = obj.getAxisVect(worldVect)      
@@ -453,10 +398,8 @@ def getonboard():
453 398
                         move = [-deltamove, 0, 0]
454 399
                     else:
455 400
                         move = [deltamove, 0, 0]                            
456
-                    #print("1deltamove", deltamove)
457 401
                     own.applyMovement(move, True)                    
458 402
                 except:
459
-                    #print("delta broke: ", player_pos, grinder_pos)
460 403
                     pass 
461 404
 
462 405
             if STANCE == 0: 
@@ -464,7 +407,6 @@ def getonboard():
464 407
                 own['dropinTimer'] = 60                                     
465 408
                     
466 409
             if STANCE == 1: 
467
-                    
468 410
                 own['requestAction'] ='fak_dropin_pos'  
469 411
                 own['dropinTimer'] = 60                                 
470 412
                                      
@@ -473,7 +415,6 @@ def getonboard():
473 415
         onboard_speed = .1                                      
474 416
         own['getonboard'] = 0 
475 417
     if (yBut == False and lasty == True) or yBut == True and dropinCol.positive:
476
-        
477 418
         deckact = deck.actuators["Visibility"]
478 419
         trucksact = trucks.actuators["Visibility"]
479 420
         wheel1act = wheel1.actuators["Visibility"]
@@ -520,7 +461,6 @@ def checkidle():
520 461
         diff = own["framenum"] - idle_frame
521 462
         
522 463
         if (diff > 700 and idle_frame != 0 and dropinCol.positive == False and own['walk'] != 0) or own['sit'] == 1:
523
-            #print("you are idle", diff)  
524 464
             cont.activate(camobj.actuators['idle_camRight'])  
525 465
             camera.height = .9   
526 466
             camera.min = 2
@@ -532,23 +472,18 @@ def checkidle():
532 472
 def idle_anim():
533 473
     if own['walk_idling'] == 1 and own['sit'] == 0:
534 474
         walk_idle_frame = own['walk_idle_frame']
535
-        #print("walk_idling")
536 475
         mod_num = (own["framenum"] - walk_idle_frame) % 240
537
-        #print(walk_idle_frame, mod_num)
538
-        #killact(3)
539 476
         idle_lay = 300
540 477
         if mod_num == 0:
541 478
             if own['idle_skipper'] > 0:
542 479
                own['idle_skipper'] -= 1 
543 480
             ran_num = random.randint(1, 8)
544
-            #print(ran_num, "modding")
545 481
             if own['last_idle_num'] == ran_num:
546 482
                 ran_num = 1
547 483
             if own['idle_skipper'] == 0:
548 484
                 own['last_idle_num'] = ran_num
549 485
                 if ran_num == 1 or ran_num > 7:    
550 486
                     killact(3)
551
-                    
552 487
                     if STANCE == 0 and own['throw_deck'] == 0:
553 488
                         own['requestAction'] = 'reg_idle1'
554 489
                     elif STANCE == 0 and own['throw_deck'] == 1:
@@ -605,7 +540,6 @@ def idle_anim():
605 540
                         own['requestAction'] = 'reg_idle6'
606 541
                     elif STANCE == 0 and own['throw_deck'] == 1:
607 542
                         own['requestAction'] = 'reg_idle6'
608
-                        #skater.playAction("reg_idle6", 1,120, layer=idle_lay, play_mode=0, speed=.5)
609 543
                     elif STANCE == 1 and own['throw_deck'] == 0:
610 544
                         own['requestAction'] = 'fak_idle6'
611 545
                     elif STANCE == 1 and own['throw_deck'] == 1:
@@ -640,8 +574,6 @@ def reset_pos():
640 574
         own['stance'] = own['spawn_stance']                          
641 575
         if own["spawn_stance"] == 1:
642 576
             own.setLinearVelocity([.1,0,0], 1)
643
-            
644
-            
645 577
         else: 
646 578
             own.setLinearVelocity([-.1,0,0], 1)         
647 579
             
@@ -654,7 +586,6 @@ def reset_pos():
654 586
         stance = own["stance"]
655 587
         own["spawn_stance"] = stance   
656 588
 def falldeck():
657
-    #print("falldeck")
658 589
     throw_deck_empty = scene.objects["throw_deck_empty"]
659 590
     deckact = deck.actuators["Visibility"]
660 591
     trucksact = trucks.actuators["Visibility"]
@@ -685,8 +616,7 @@ def falldeck():
685 616
         wheel2act.visibility = True
686 617
         wheel3act.visibility = True
687 618
         wheel4act.visibility = True
688
-        throw_deck_empty['kill_deck'] = 1 
689
-        #print("trying to kill deck")     
619
+        throw_deck_empty['kill_deck'] = 1    
690 620
     cont.activate(deck.actuators['Visibility'])
691 621
     cont.activate(trucks.actuators['Visibility'])
692 622
     cont.activate(wheel1.actuators['Visibility'])
@@ -713,11 +643,9 @@ def throwdeck(strength, ud):
713 643
         wheel4act.visibility = False
714 644
         act = throw_deck_empty.actuators['throw_dec_act']
715 645
         hard = strength * .08
716
-
717 646
         if hard > 9:
718 647
             hard = 9
719 648
         ud = ud * 4
720
-
721 649
         own['bbut_timer'] = 0
722 650
         if STANCE == True:
723 651
             own['requestAction'] = 'fak_throw'
@@ -759,11 +687,9 @@ def fall():
759 687
         falldeck()
760 688
         
761 689
         if STANCE == 1:
762
-#            own['requestAction'] = 'fak_fall1'
763 690
             own['requestAction'] = 'fak_air-walk_air'            
764 691
             own.setLinearVelocity([3,2,0], True)
765 692
         else:
766
-#            own['requestAction'] = 'reg_fall1'
767 693
             own['requestAction'] = 'reg_air-walk_air'
768 694
             own.setLinearVelocity([-3,-2,0], True)    
769 695
         own['fall'] = False
@@ -785,14 +711,8 @@ def sit():
785 711
                 killact(3)
786 712
                 if STANCE == 0:
787 713
                     own['requestAction'] = 'reg_sit'
788
-                    # skater.playAction("reg_sit", 1,65, layer=300, play_mode=0, speed=1)
789
-                    # deck.playAction("a_reg_sit", 1,65, layer=300, play_mode=0, speed=1)
790
-                    # trucks.playAction("a_reg_sit", 1,65, layer=300, play_mode=0, speed=1)
791 714
                 elif STANCE == 1:
792
-                    own['requestAction'] = 'fak_sit'
793
-                    # skater.playAction("fak_sit", 1,65, layer=300, play_mode=0, speed=1)
794
-                    # deck.playAction("a_fak_sit", 1,65, layer=300, play_mode=0, speed=1)
795
-                    # trucks.playAction("a_fak_sit", 1,65, layer=300, play_mode=0, speed=1)                                         
715
+                    own['requestAction'] = 'fak_sit'                                        
796 716
         except:
797 717
             pass    
798 718
     if own['sit'] == 1:
@@ -801,17 +721,11 @@ def sit():
801 721
             sit_vect = r_ground.hitObject.getAxisVect( [0, 1, 0])
802 722
             if STANCE == 0:
803 723
                 own.alignAxisToVect(-sit_vect, 0, .2)
804
-                own['requestAction'] = 'reg_sit'
805
-                # skater.playAction("reg_sit", 65,65, layer=299, play_mode=1, speed=1)
806
-                # deck.playAction("a_reg_sit", 65,65, layer=299, play_mode=1, speed=1)
807
-                # trucks.playAction("a_reg_sit", 65,65, layer=299, play_mode=1, speed=1)                                 
724
+                own['requestAction'] = 'reg_sit'                               
808 725
                 
809 726
             elif STANCE == 1:
810 727
                 own['requestAction'] = 'fak_sit'
811
-                own.alignAxisToVect(sit_vect, 0, .2) 
812
-                # skater.playAction("fak_sit", 65,65, layer=299, play_mode=1, speed=1)
813
-                # deck.playAction("a_fak_sit", 65,65, layer=299, play_mode=1, speed=1)
814
-                # trucks.playAction("a_fak_sit", 65,65, layer=299, play_mode=1, speed=1)                    
728
+                own.alignAxisToVect(sit_vect, 0, .2)                    
815 729
         except:
816 730
             pass    
817 731
 
@@ -830,7 +744,6 @@ def switchcam():
830 744
 #followcam 
831 745
 def move_followcam():
832 746
     if own['camera'] == 2:
833
-        #if rtsBut == False and own['lastrts'] == True:
834 747
         if own['lastbkBut'] == True and bkBut == False:
835 748
             print("activate move followcam") 
836 749
             if own['move_followcam'] == False:
@@ -838,7 +751,6 @@ def move_followcam():
838 751
             else:
839 752
                 own['move_followcam'] = False                       
840 753
         if own['move_followcam'] == True:
841
-            #act = followcam.actuators[
842 754
             camspeed1 = .015
843 755
             camspeed2 = .055
844 756
             camrot1 = .005
@@ -872,7 +784,6 @@ def move_followcam():
872 784
             if rUD < -0.080:
873 785
                 followcam.actuators["rotup"].dLoc = [0, 0, camrot2]
874 786
                 cont.activate(followcam.actuators["rotup"])
875
-                #print("uppppppppppppppppppppppppppp")
876 787
             else:
877 788
                 cont.deactivate(followcam.actuators["rotup"])    
878 789
 #            #down    
@@ -899,7 +810,6 @@ def move_followcam():
899 810
             if lUD > -0.080 and lUD < -0.030:
900 811
                 followcam.actuators["up"].dLoc = [ 0, 0, -camspeed1]
901 812
                 cont.activate(followcam.actuators["up"])
902
-                #print(lUD)
903 813
             else:
904 814
                 cont.deactivate(followcam.actuators["up"])    
905 815
 #            #down    
@@ -946,14 +856,12 @@ def move_followcam():
946 856
                 cont.deactivate(followcam.actuators["rotright"])                       
947 857
 def move_flycam():
948 858
     if own['camera'] == 1:
949
-        #if rtsBut == False and own['lastrts'] == True:
950 859
         if own['lastbkBut'] == True and bkBut == False: 
951 860
             if own['move_freecam'] == False:
952 861
                 own['move_freecam'] = True
953 862
             else:
954 863
                 own['move_freecam'] = False                       
955 864
         if own['move_freecam'] == True:
956
-            #act = freecam.actuators[
957 865
             camspeed1 = .015
958 866
             camspeed2 = .055
959 867
             camrot1 = .005
@@ -962,7 +870,6 @@ def move_flycam():
962 870
             if lUD < -0.080:
963 871
                 freecam.actuators["up"].dLoc = [ 0, 0, -camspeed2]
964 872
                 cont.activate(freecam.actuators["up"])
965
-                #print("fastup")
966 873
             else:
967 874
                 cont.deactivate(freecam.actuators["up"])    
968 875
 #            #down    
@@ -1068,11 +975,6 @@ if r_ground.triggered:
1068 975
     try:
1069 976
         if 'stair' in r_ground.hitObject:
1070 977
             own['stair_counter'] = 20
1071
-            force = [ 0.0, 0.0, -100]
1072
-            # use local axis
1073
-            local = True
1074
-            # apply force
1075
-            #own.applyForce(force, local)        
1076 978
     except:
1077 979
         pass        
1078 980
     if own['stair_counter'] > 0:
@@ -1085,20 +987,7 @@ if yBut == True:
1085 987
 
1086 988
 
1087 989
 if own['stair_counter'] > 5 and r_ground.triggered == False:
1088
-    own.applyForce([0,0,-200], True) 
1089
-    print("applying ground force")
1090
-
1091
-#if own['requestAction'] == None:
1092
-#    if own['throw_deck'] == False:
1093
-#        if STANCE == 1:
1094
-#            own['requestAction'] = reg_idle
1095
-#        else:
1096
-#            own['requestAction'] = fak_idle        
1097
-#    else:
1098
-#        if STANCE == 1:
1099
-#            own['requestAction'] = reg_idle_nb
1100
-#        else:
1101
-#            own['requestAction'] = fak_idle_nb                            
990
+    own.applyForce([0,0,-200], True)                          
1102 991
    
1103 992
 if deck.visible:
1104 993
     own['deckvis'] = 1
@@ -1111,11 +1000,8 @@ if own['requestAction'] == 'empty' or own['requestAction'] == None:
1111 1000
     if STANCE == 1:
1112 1001
         own['requestAction'] = 'fak_idle1'        
1113 1002
     
1114
-    
1115
-    
1116 1003
 def onground():
1117 1004
     if r_ground.positive:
1118
-        #print('on ground')
1119 1005
         own['lF_ground_frame'] = own['framenum']
1120 1006
         if 'grind' in r_ground.hitObject:
1121 1007
             own.applyForce([0,100,0], True)
@@ -1130,10 +1016,6 @@ def onground():
1130 1016
             else:
1131 1017
                 own['requestAction'] = 'fak_walk_air' 
1132 1018
                 
1133
-
1134
-           
1135
-            
1136
-                    
1137 1019
 onboard() 
1138 1020
 jump()
1139 1021
 dropin()
@@ -1150,7 +1032,6 @@ fall()
1150 1032
 idle_anim()
1151 1033
 sit()
1152 1034
 onground()
1153
-#cont.activate(cam.actuators['Camera'])
1154 1035
 #printplaying() 
1155 1036
 
1156 1037
 own.alignAxisToVect([0.0,0.0,1.0], 2, .03)

Loading…
Cancel
Save