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

+ 13
- 76
controller2.py View File

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

+ 6
- 125
walk.py View File

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

Loading…
Cancel
Save