Browse Source

a little cleaning

shuvit 3 years ago
parent
commit
e7126c12b6
2 changed files with 59 additions and 113 deletions
  1. 2
    0
      Startup.py
  2. 57
    113
      controller2.py

+ 2
- 0
Startup.py View File

@@ -138,5 +138,7 @@ def main():
138 138
     dict['spawned_npc_decks'] = []
139 139
     dict['spawned_npc_trucks'] = []    
140 140
     dict['spawned_npcs'] = []
141
+    dict['JUMPHEIGHT'] = 800
142
+    dict['MAX_VEL'] = 6.7
141 143
 
142 144
 main()

+ 57
- 113
controller2.py View File

@@ -20,9 +20,7 @@ def main():
20 20
     import GameLogic
21 21
     import ctypes
22 22
     import math
23
-    #import bpy
24 23
 
25
-    #build global dict (move this to separate script that runs once)
26 24
     scene = bge.logic.getCurrentScene()
27 25
     objList = scene.objects
28 26
     try:
@@ -188,7 +186,7 @@ def main():
188 186
     #setable
189 187
     grablay = 600 #this plus 1
190 188
     fliplay = 4
191
-    MAX_VEL = 6.7
189
+    MAX_VEL = dict['MAX_VEL']
192 190
     SPEEDUP = .055
193 191
     SPEEDPUMP = .14 #.09
194 192
     SPEEDPUMPFAST = .16 #.13
@@ -197,7 +195,7 @@ def main():
197 195
     ACCEL = 10
198 196
     CRUISE = 9
199 197
     COUNTDOWN = 20 #pump and speed stuff
200
-    JUMPHEIGHT = 800 #775#750
198
+    JUMPHEIGHT = dict['JUMPHEIGHT'] #775#750
201 199
     JUMPSTRENGTH = 0
202 200
     own['flip_manual_stance'] = 0
203 201
     #CAVEMAN_SPEED = .75
@@ -409,7 +407,6 @@ def main():
409 407
                         own['manual_v2_type'] = 'fak nose manual'
410 408
                 if rUD < -.04 and rUD > -.07:
411 409
                     own['manual_v2_type'] = 'fak nose manual'
412
-
413 410
                                 
414 411
         else:
415 412
             #print("flip stance")
@@ -441,27 +438,18 @@ def main():
441 438
                     
442 439
         if STANCE == 0 and (own['manual_v2_type'] == 'fak manual' or own['actionState'] == 'fak-reg_nmanual'):
443 440
             #print('change manual stance')
444
-            own['manual_v2_type'] = 'reg nose manual' 
445
-            
446
-            
447
-            
441
+            own['manual_v2_type'] = 'reg nose manual'  
448 442
             
449 443
         if STANCE == 1 and (own['manual_v2_type'] == 'reg manual' or own['actionState'] == 'reg-fak_nmanual'):
450 444
             #print('change manual stance')                        
451 445
             own['manual_v2_type'] = 'fak nose manual'
452 446
 
453
-
454
-
455
-
456 447
         if STANCE == 0 and (own['manual_v2_type'] == 'fak nose manual' or own['actionState'] == 'fak-reg_manual'):
457 448
             #print('change manual stance')
458 449
             own['manual_v2_type'] = 'reg manual' 
459 450
         if STANCE == 1 and (own['manual_v2_type'] == 'reg nose manual' or own['actionState'] == 'reg-fak_manual'):
460 451
             #print('change manual stance')                        
461
-            own['manual_v2_type'] = 'fak manual'  
462
-            
463
-                                      
464
-                  
452
+            own['manual_v2_type'] = 'fak manual'               
465 453
  
466 454
     #check manual
467 455
     ####
@@ -560,13 +548,8 @@ def main():
560 548
         own["LAST_RIGHT"] = 0  
561 549
         
562 550
     def reg_stance_on(inc):
563
-        #revert_timer
564 551
         playing = deck.isPlayingAction(40)
565 552
         if own["revert_timer"] < 1 and own['manual_v2'] == 0 and playing == 0:
566
-#            if inc == 1:
567
-#                print('inc stance')
568
-#                own['requestAction'] = 'reg_pump'
569
-#            else:    
570 553
             own['requestAction'] = 'reg_roll'
571 554
     def reg_stance_off():
572 555
         pass 
@@ -582,10 +565,7 @@ def main():
582 565
  
583 566
     def fak_manual_off():
584 567
         pass 
585
-    #######                     
586
-    #######
587
-    #######
588
-    #######
568
+
589 569
     def reg_nmanual_on():
590 570
         own['requestAction'] = 'reg_nmanual'   
591 571
     def reg_nmanual_off():
@@ -611,8 +591,7 @@ def main():
611 591
         pass
612 592
 
613 593
     def reg_stanceinc_off():
614
-        pass  
615
-        
594
+        pass       
616 595
                     
617 596
     def reg_stance_left_on():
618 597
         if own['manual_v2'] == 0 and own["revert_timer"] < 1 and own['gt_cd2'] < 1 and ground_since > 30:
@@ -624,8 +603,7 @@ def main():
624 603
             playing_action_frame = skater.getActionFrame(LAND_LAYER)
625 604
             if LAST_LEFT == 0 or (playing_action_frame > (LAND_END - 2) and playing_action_frame < (LAND_END - 1)):
626 605
                 LAST_LEFT = 1
627
-            own["LAST_LEFT"] = 1 
628
-                            
606
+            own["LAST_LEFT"] = 1                        
629 607
              
630 608
     def reg_stance_right_on():
631 609
         if own['manual_v2'] == 0 and own["revert_timer"] < 1 and own['gt_cd2'] < 1 and ground_since > 30:
@@ -641,10 +619,7 @@ def main():
641 619
        
642 620
     def fak_stance_on(inc):
643 621
         playing = deck.isPlayingAction(40)
644
-        if own['manual_v2'] == 0 and own["revert_timer"] < 1 and playing == 0 and own['gt_cd2'] < 1:
645
-#            if inc == 1:
646
-#                own['requestAction'] = 'fak_pump'
647
-#            else:    
622
+        if own['manual_v2'] == 0 and own["revert_timer"] < 1 and playing == 0 and own['gt_cd2'] < 1:   
648 623
             own['requestAction'] = 'fak_roll'
649 624
     def fak_stance_off():
650 625
         pass
@@ -689,15 +664,13 @@ def main():
689 664
             own['requestAction'] = 'fak_air' 
690 665
       
691 666
     def fak_air_off():
692
-        pass
693
-    #$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$    
667
+        pass   
694 668
     def stance():  
695 669
         rotation = .96
696 670
         turnsens = 0.06
697 671
         if rot.z < .9: inc = 1
698 672
         else: inc = 0
699
-        flipping = skater.isPlayingAction(500)
700
-        #print(flipping)
673
+        flipping = False
701 674
         #ground
702 675
         ground_since = own["framenum"] - own['lF_air_frame']
703 676
         inc = 0
@@ -902,7 +875,6 @@ def main():
902 875
             jump_timer = 30
903 876
             own['jump_timer'] = jump_timer           
904 877
             
905
-
906 878
     def pump():
907 879
         velocity = own['velocity']
908 880
         #switch
@@ -1040,7 +1012,6 @@ def main():
1040 1012
             if own["wallride"] != None: 
1041 1013
                 jump()
1042 1014
 
1043
-
1044 1015
     def inward_heelflip():
1045 1016
         print("inward heelflip")
1046 1017
         dict['trick_string'] = 'Inward Heelflip'
@@ -1284,6 +1255,7 @@ def main():
1284 1255
             own["wallride_off"] = 1
1285 1256
             if own["wallride"] != None: 
1286 1257
                 jump()
1258
+
1287 1259
     def shuvit360():
1288 1260
         print("360shuvit")
1289 1261
         dict['trick_string'] = '360 shuvit'
@@ -1303,7 +1275,8 @@ def main():
1303 1275
         elif r_ground.triggered == 0 and STANCE == True:
1304 1276
             own["wallride_off"] = 1
1305 1277
             if own["wallride"] != None: 
1306
-                jump()        
1278
+                jump()    
1279
+
1307 1280
     def fsshuvit360():
1308 1281
         print("360shuvit")
1309 1282
         dict['trick_string'] = '360 shuvit'
@@ -1324,6 +1297,7 @@ def main():
1324 1297
             own["wallride_off"] = 1
1325 1298
             if own["wallride"] != None: 
1326 1299
                 jump()
1300
+
1327 1301
     def nollie_shuvit():
1328 1302
         print("shuvit")
1329 1303
         dict['trick_string'] = 'Nollie shuvit'
@@ -1403,7 +1377,6 @@ def main():
1403 1377
             if own["wallride"] != None: 
1404 1378
                 jump() 
1405 1379
 
1406
-
1407 1380
     #nollie_fsshuvit360()
1408 1381
     def nollie_fsshuvit360():
1409 1382
         dict['trick_string'] = 'Nollie Frontside shuvit 360'
@@ -1433,6 +1406,7 @@ def main():
1433 1406
             grablay2 = grablay + 1
1434 1407
             GRAB_PLAYED = True
1435 1408
             own["GRAB_PLAYED)"] = GRAB_PLAYED
1409
+
1436 1410
     def fak_judo_grab_on():
1437 1411
         GRAB_PLAYED = own["GRAB_PLAYED"]
1438 1412
         GRAB_ON = own["GRAB_ON"]
@@ -1443,7 +1417,6 @@ def main():
1443 1417
             GRAB_PLAYED = True
1444 1418
             own["GRAB_PLAYED)"] = GRAB_PLAYED            
1445 1419
                 
1446
-
1447 1420
     def frontside_grab_on():
1448 1421
         GRAB_PLAYED = own["GRAB_PLAYED"]
1449 1422
         GRAB_ON = own["GRAB_ON"]
@@ -1459,8 +1432,6 @@ def main():
1459 1432
     def backside_grab_on():
1460 1433
         GRAB_PLAYED = own["GRAB_PLAYED"]
1461 1434
         GRAB_ON = own["GRAB_ON"]
1462
-        
1463
-        
1464 1435
         if GRAB_ON == True and r_ground.triggered == 0 and aBut == True:
1465 1436
             own['requestAction'] = 'reg_fp_rback'          
1466 1437
         elif GRAB_ON == True and GRAB_PLAYED == False and r_ground.triggered == 0:
@@ -1471,7 +1442,6 @@ def main():
1471 1442
     def fakfrontside_grab_on():
1472 1443
         GRAB_PLAYED = own["GRAB_PLAYED"]
1473 1444
         GRAB_ON = own["GRAB_ON"]
1474
-
1475 1445
         if GRAB_ON == True and r_ground.triggered == 0 and aBut == True:
1476 1446
             own['requestAction'] = 'fak_fp_rback'         
1477 1447
         
@@ -1651,6 +1621,7 @@ def main():
1651 1621
             force = [(yvel), 0, linVelocity15.z]
1652 1622
             own.setLinearVelocity(force, local)
1653 1623
             own['requestAction'] = 'reg_push'
1624
+
1654 1625
     def push_goof():
1655 1626
         linVelocity15 = own.linearVelocity
1656 1627
         local = True
@@ -1670,6 +1641,7 @@ def main():
1670 1641
             force = [(yvel), 0, linVelocity15.z]
1671 1642
             own.setLinearVelocity(force, local)
1672 1643
             own['requestAction'] = 'reg_push_goof'
1644
+
1673 1645
     def brfoot():
1674 1646
         lay = grablay + 40
1675 1647
         if STANCE == 0:
@@ -1677,14 +1649,16 @@ def main():
1677 1649
 
1678 1650
         if STANCE == 1:
1679 1651
             own['requestAction'] = 'fak_brfoot' 
1680
-        jump()    
1652
+        jump()   
1653
+
1681 1654
     def frfoot():
1682 1655
         lay = grablay + 40
1683 1656
         if STANCE == 0:
1684 1657
             own['requestAction'] = 'reg_frfoot'
1685 1658
         if STANCE == 1:
1686 1659
             own['requestAction'] = 'fak_frfoot'
1687
-        jump()          
1660
+        jump()         
1661
+
1688 1662
     def blfoot():
1689 1663
         lay = grablay + 40
1690 1664
         if STANCE == 0:
@@ -1692,13 +1666,15 @@ def main():
1692 1666
         if STANCE == 1:
1693 1667
             own['requestAction'] = 'fak_blfoot'
1694 1668
         jump() 
1669
+
1695 1670
     def flfoot():
1696 1671
         lay = grablay + 40
1697 1672
         if STANCE == 0:
1698 1673
             own['requestAction'] = 'reg_flfoot'
1699 1674
         if STANCE == 1:
1700 1675
             own['requestAction'] = 'fak_flfoot'
1701
-        jump()         
1676
+        jump()  
1677
+
1702 1678
     def rollsound():
1703 1679
         #onground
1704 1680
         if r_ground.triggered == 1 and grindDar == 0 and own['invert_on'] == 0:
@@ -1766,8 +1742,7 @@ def main():
1766 1742
         if r_ground.triggered == False:
1767 1743
             own.actuators["sroll"].volume = .0001
1768 1744
             cont.deactivate(own.actuators["sroll"])     
1769
-            own.actuators["sroll"].stopSound() 
1770
-            
1745
+            own.actuators["sroll"].stopSound()      
1771 1746
         act = cont.actuators["sroll"]
1772 1747
         own['sroll_vol'] = act.volume
1773 1748
         own['sroll_pitch'] = act.pitch    
@@ -1971,10 +1946,9 @@ def main():
1971 1946
                 num2 = 40
1972 1947
                 if (vel > num1 and vel < num2) or (vel < -num1 and vel > -num2):   
1973 1948
                     own.actuators["grind_rail"].volume = .19
1974
-                    own.actuators["grind_rail"].pitch = 1 
1975
-                    
1976
-                        
1949
+                    own.actuators["grind_rail"].pitch = 1                         
1977 1950
                 cont.activate(own.actuators['grind_rail'])           
1951
+
1978 1952
             if grindSound == "concrete":
1979 1953
             #play sound
1980 1954
                 cont.deactivate(own.actuators['grind_rail'])
@@ -2022,7 +1996,8 @@ def main():
2022 1996
                 cont.activate(own.actuators['grind_cement'])
2023 1997
         else:
2024 1998
             cont.deactivate(own.actuators['grind_cement'])    
2025
-            cont.deactivate(own.actuators['grind_rail'])    
1999
+            cont.deactivate(own.actuators['grind_rail']) 
2000
+
2026 2001
     def record_grindsound():
2027 2002
         dropin = own['dropinTimer']
2028 2003
         lif = own['last_invert_frame']     
@@ -2050,7 +2025,6 @@ def main():
2050 2025
         if own['LAST_GRIND'] == False and grindHit == True:
2051 2026
             own['grindstartFrame'] = own['framenum']
2052 2027
             giniter = 1
2053
-        #print(own['grindstartFrame'])    
2054 2028
         if grindHit == True and own['invert_on'] == 0 and own['footplant_on'] == False and own['manual'] == 0 and lif > 40 and own['dropinTimer'] < 30 and giniter == 0: 
2055 2029
             
2056 2030
             control_bottom = scene.objects['control_bottom']
@@ -2089,19 +2063,7 @@ def main():
2089 2063
                     own['requestAction'] = 'fak_bsboard'
2090 2064
                 elif own['grindType'] == "reg_fsboard":
2091 2065
                     own['grind_stance'] = 0
2092
-                    own['requestAction'] = 'reg_fsboard'
2093
-#                elif own['grindType'] == "reg_tailg":
2094
-#                    own['requestAction'] = 'reg_tailg'
2095
-#                elif own['grindType'] == "reg_tailgR":
2096
-#                    own['requestAction'] = 'reg_tailgr'
2097
-#                elif own['grindType'] == "reg_tailgL":
2098
-#                    own['requestAction'] = 'reg_tailgl'
2099
-#                elif own['grindType'] == "reg_noseg":
2100
-#                    own['requestAction'] = 'reg_noseg'                
2101
-#                elif own['grindType'] == "reg_nosegR":
2102
-#                    own['requestAction'] = 'reg_nosegr'                
2103
-#                elif own['grindType'] == "reg_nosegL":
2104
-#                    own['requestAction'] = 'reg_nosegl'                
2066
+                    own['requestAction'] = 'reg_fsboard'               
2105 2067
                 elif own['grindType'] == "fak_noseg":
2106 2068
                     own['requestAction'] = 'fak_noseg'                
2107 2069
                 elif own['grindType'] == "fak_nosegR": 
@@ -2115,7 +2077,6 @@ def main():
2115 2077
                 elif own['grindType'] == "fak_tailgL":
2116 2078
                     own['requestAction'] = 'fak_tailgl'
2117 2079
                 
2118
-                #33333333333    
2119 2080
                 elif own['grindType'] == "reg_tailg":
2120 2081
                     own['requestAction'] = 'fak_noseg'
2121 2082
                 elif own['grindType'] == "reg_tailgR":
@@ -2128,7 +2089,6 @@ def main():
2128 2089
                     own['requestAction'] = 'fak_tailgr'                
2129 2090
                 elif own['grindType'] == "reg_nosegL":
2130 2091
                     own['requestAction'] = 'fak_tailgl'                        
2131
-                #33333333333
2132 2092
                     
2133 2093
                 elif own['grindType'] == "reg_tailslide":
2134 2094
                     own['requestAction'] = 'reg_tailslide'
@@ -2140,14 +2100,12 @@ def main():
2140 2100
                     own['requestAction'] = 'fak_noseslide'                     
2141 2101
                 
2142 2102
                 elif own['grindType'] == "reg_tailslide" and edge == 1:
2143
-                    #own['requestAction'] = 'reg_tailslide'
2144 2103
                     own['requestAction'] = 'fak_noseslide'  
2145 2104
                     STANCE = 0                
2146 2105
                 elif own['grindType'] == "fak_tailslide":
2147 2106
                     own['requestAction'] = 'fak_tailslide'                
2148 2107
                     own['grind_stance'] = 1
2149 2108
                 elif own['grindType'] == "reg_noseslide" and edge == 1:
2150
-                    #own['requestAction'] = 'reg_noseslide'
2151 2109
                     own['requestAction'] = 'fak_tailslide'  
2152 2110
                     own['grind_stance'] = 0
2153 2111
                 elif own['grindType'] == "fak_noseslide":
@@ -2178,19 +2136,7 @@ def main():
2178 2136
                 elif own['grindType'] == "reg_nosegR":
2179 2137
                     own['requestAction'] = 'reg_nosegr'             
2180 2138
                 elif own['grindType'] == "reg_nosegL":
2181
-                    own['requestAction'] = 'reg_nosegl'             
2182
-#                elif own['grindType'] == "fak_noseg":
2183
-#                    own['requestAction'] = 'fak_noseg'
2184
-#                elif own['grindType'] == "fak_nosegR": 
2185
-#                    own['requestAction'] = 'fak_nosegr'               
2186
-#                elif own['grindType'] == "fak_nosegL":
2187
-#                    own['requestAction'] = 'fak_nosegl'                
2188
-#                elif own['grindType'] == "fak_tailg":
2189
-#                    own['requestAction'] = 'fak_tailg'
2190
-#                elif own['grindType'] == "fak_tailgR": 
2191
-#                    own['requestAction'] = 'fak_tailgr'
2192
-#                elif own['grindType'] == "fak_tailgL":
2193
-#                    own['requestAction'] = 'fak_tailgl' 
2139
+                    own['requestAction'] = 'reg_nosegl'              
2194 2140
                 elif own['grindType'] == "reg_tailslide":
2195 2141
                     own['requestAction'] = 'reg_tailslide'
2196 2142
                 elif own['grindType'] == "reg_noseslide":
@@ -2200,7 +2146,6 @@ def main():
2200 2146
                 elif own['grindType'] == "fak_noseslide":
2201 2147
                     own['requestAction'] = 'fak_noseslide'                                        
2202 2148
                     
2203
-                #3333333333
2204 2149
                 elif own['grindType'] == "fak_noseg":
2205 2150
                     own['requestAction'] = 'reg_tailg'
2206 2151
                 elif own['grindType'] == "fak_nosegR": 
@@ -2212,10 +2157,7 @@ def main():
2212 2157
                 elif own['grindType'] == "fak_tailgR": 
2213 2158
                     own['requestAction'] = 'reg_nosegr'
2214 2159
                 elif own['grindType'] == "fak_tailgL":
2215
-                    own['requestAction'] = 'reg_nosegl' 
2216
-                #3333333    
2217
-                    
2218
-                    
2160
+                    own['requestAction'] = 'reg_nosegl'                     
2219 2161
                     
2220 2162
                 elif own['grindType'] == "fak_tailslide" and edge == 1:
2221 2163
                     own['grind_stance'] = 1
@@ -2237,12 +2179,10 @@ def main():
2237 2179
                 STANCE = 1
2238 2180
                 own['lg_stance'] = 1
2239 2181
                 lg_stance = 1
2240
-                #print('changing stance 1')
2241 2182
             if 'reg' in own['l_actionState']:
2242 2183
                 STANCE = 0 
2243 2184
                 own['lg_stance'] = 0
2244
-                lg_stance = 0
2245
-                #print('changing stance 0')                 
2185
+                lg_stance = 0              
2246 2186
             own['stance'] = STANCE                         
2247 2187
                       
2248 2188
     def rotmult():
@@ -2274,8 +2214,6 @@ def main():
2274 2214
                 own['onramp'] = 0   
2275 2215
         else:
2276 2216
             own['onramp'] = 0   
2277
-    #num = frame - own['last_ramp']
2278
-    #print(num)             
2279 2217
     
2280 2218
     def grindtype(gtype):
2281 2219
         own['grindType'] = gtype
@@ -2315,7 +2253,7 @@ def main():
2315 2253
             own["coping"] = 1
2316 2254
         else:
2317 2255
             own["coping"] = 0    
2318
-    #print(own['dropinTimer'], 'dtimer')
2256
+
2319 2257
     def onboard():
2320 2258
         if own['walk'] == 1 and own['lasty'] == False and own['requestAction'] not in ['reg_dropin', 'fak_dropin']:
2321 2259
             cont.deactivate(cam.actuators['replayCam'])
@@ -2378,6 +2316,7 @@ def main():
2378 2316
                 own.setLinearVelocity((linvelx, linVel.y, linVel.z), 1)
2379 2317
         except:
2380 2318
             pass    
2319
+
2381 2320
     def grindoutair():
2382 2321
         skippy = 0
2383 2322
         linVel = own.getLinearVelocity(True)
@@ -2493,7 +2432,8 @@ def main():
2493 2432
                 own['requestAction'] = 'fak_revert1'           
2494 2433
         own['revert_timer'] = 20 
2495 2434
         cont.activate(own.actuators["revertSound"]) 
2496
-        own['revert_sound'] = 1     
2435
+        own['revert_sound'] = 1 
2436
+
2497 2437
     def revert2():
2498 2438
         own["Q3oncdl"] = 0
2499 2439
         own["Q4oncdl"] = 0
@@ -2518,7 +2458,8 @@ def main():
2518 2458
                 own['requestAction'] = 'fak_revert2'                           
2519 2459
         own['revert_timer'] = 20 
2520 2460
         cont.activate(own.actuators["revertSound"])   
2521
-        own['revert_sound'] = 1      
2461
+        own['revert_sound'] = 1 
2462
+
2522 2463
     def revert3():
2523 2464
         own["Q7oncdl"] = 0
2524 2465
         own["Q8oncdl"] = 0
@@ -2543,7 +2484,8 @@ def main():
2543 2484
                 own['requestAction'] = 'fak_revert1'     
2544 2485
         own['revert_timer'] = 20 
2545 2486
         cont.activate(own.actuators["revertSound"]) 
2546
-        own['revert_sound'] = 1     
2487
+        own['revert_sound'] = 1  
2488
+
2547 2489
     def revert4():
2548 2490
         own["Q7oncdl"] = 0
2549 2491
         own["Q8oncdl"] = 0
@@ -2604,9 +2546,8 @@ def main():
2604 2546
                 newx = linVelocity4.x * .98        
2605 2547
             force = [newx, linVelocity4.y, linVelocity4.z]
2606 2548
             own.setLinearVelocity(force, True)        
2549
+    
2607 2550
     def powerslide_state():
2608
-
2609
-    ####powerslide on#####  
2610 2551
         if own['powerslide_on'] == 1:   
2611 2552
             if own['powerslide'] == "reg2":                               
2612 2553
                 own['requestAction'] = 'reg_fs_powerslide'
@@ -2615,7 +2556,8 @@ def main():
2615 2556
             if own['powerslide'] == "reg1":                               
2616 2557
                 own['requestAction'] = 'reg_powerslide'
2617 2558
             if own['powerslide'] == "fak2":                               
2618
-                own['requestAction'] = 'fak_powerslide'                                    
2559
+                own['requestAction'] = 'fak_powerslide'    
2560
+
2619 2561
     def powerslide_sound():
2620 2562
         sact = own.actuators["powerslide_sound"]
2621 2563
         if own['powerslide_on'] == 1:
@@ -2666,13 +2608,11 @@ def main():
2666 2608
     air() 
2667 2609
     stance()
2668 2610
     turn()
2669
-    #grind()
2670 2611
     rotmult()
2671 2612
     airup()
2672 2613
     onramp()
2673 2614
     speedmult()
2674 2615
     coping()
2675
-
2676 2616
     resetjumpstance()
2677 2617
     grass()
2678 2618
     grindoutair()
@@ -2912,8 +2852,7 @@ def main():
2912 2852
                     grindtype("reg_tailg")
2913 2853
                 if jumpstance == 1:
2914 2854
                     grindtype("fak_tailg")   
2915
-              
2916
-            
2855
+                         
2917 2856
     if q5oncd > 0:
2918 2857
         q5on = 0
2919 2858
         q5oncd = q5oncd - 1
@@ -3013,7 +2952,6 @@ def main():
3013 2952
         q3oncd = q3oncd - 1
3014 2953
         own["Q3oncd"] = q3oncd
3015 2954
 
3016
-
3017 2955
 ###keyboard fliptricks
3018 2956
     if dict['kb_space'] == 3:
3019 2957
         if dict['kb_a'] == 2:
@@ -3034,7 +2972,6 @@ def main():
3034 2972
 
3035 2973
     # hard flip
3036 2974
     # 6 > 5 > 8
3037
-
3038 2975
     if q6oncd > 0 and q5oncd > 0 and q8oncd > 0 and q6oncd <= q5oncd <= q8oncd:
3039 2976
         print ("Hardflip")
3040 2977
         dict['trick_string'] = 'Hardflip'
@@ -3051,7 +2988,6 @@ def main():
3051 2988
 
3052 2989
     # inward heelflip
3053 2990
     # 4 > 5 > 2
3054
-
3055 2991
     if q4oncd > 0 and q5oncd > 0 and q2oncd > 0 and q4oncd <= q5oncd <= q2oncd:
3056 2992
         print ("Inward Heelflip")
3057 2993
         dict['trick_string'] = 'Inward Heelflip'
@@ -3065,9 +3001,9 @@ def main():
3065 3001
         q6oncd = 0
3066 3002
         q7oncd = 0
3067 3003
         q8oncd = 0 
3004
+
3068 3005
     # nollie hard flip
3069 3006
     # 8 > 1 > 6
3070
-
3071 3007
     if q8oncd > 0 and q1oncd > 0 and q6oncd > 0 and q8oncd <= q1oncd <= q6oncd:
3072 3008
         print ("Nollie Hardflip")
3073 3009
         dict['trick_string'] = 'Nollie Hardflip'
@@ -3081,9 +3017,9 @@ def main():
3081 3017
         q6oncd = 0
3082 3018
         q7oncd = 0
3083 3019
         q8oncd = 0 
3020
+    
3084 3021
     # nollie inward heelflip
3085 3022
     # 2 > 1 > 4
3086
-
3087 3023
     if q2oncd > 0 and q1oncd > 0 and q4oncd > 0 and q2oncd <= q1oncd <= q4oncd:
3088 3024
         print ("Nollie Inward Heelflip")
3089 3025
         dict['trick_string'] = 'Nollie Inward Heelflip'
@@ -3117,6 +3053,7 @@ def main():
3117 3053
         q6oncd = 0
3118 3054
         q7oncd = 0
3119 3055
         q8oncd = 0 
3056
+
3120 3057
     #nollie fs 360 shuvit
3121 3058
     if q7oncd > 0 and q8oncd > 0 and q1oncd > 0 and q2oncd > 0 and q3oncd > 0 and q3oncd <= q2oncd <= q1oncd <= q8oncd <= q7oncd:
3122 3059
         #print("q4oncd: ", q4oncd, " q5oncd: ", q5oncd, " q6oncd: ", q6oncd)
@@ -3132,6 +3069,7 @@ def main():
3132 3069
         q6oncd = 0
3133 3070
         q7oncd = 0
3134 3071
         q8oncd = 0 
3072
+
3135 3073
     # varial heelflip
3136 3074
     # 7 < 6 < 2
3137 3075
     if q7oncd > 0 and q6oncd > 0 and q2oncd > 0 and q7oncd < q6oncd < q2oncd:
@@ -3145,7 +3083,8 @@ def main():
3145 3083
         q5oncd = 0
3146 3084
         q6oncd = 0
3147 3085
         q7oncd = 0
3148
-        q8oncd = 0         
3086
+        q8oncd = 0
3087
+
3149 3088
     # varial kickflip 
3150 3089
     # 3 < 4 < 8
3151 3090
     if q3oncd > 0 and q4oncd > 0 and q8oncd > 0 and q3oncd < q4oncd < q8oncd:
@@ -3160,6 +3099,7 @@ def main():
3160 3099
         q6oncd = 0
3161 3100
         q7oncd = 0
3162 3101
         q8oncd = 0 
3102
+
3163 3103
     # nollie varial kickflip
3164 3104
     # 3 < 2 < 6
3165 3105
     if q3oncd > 0 and q2oncd > 0 and q6oncd > 0 and q3oncd <= q2oncd <= q6oncd:
@@ -3175,6 +3115,7 @@ def main():
3175 3115
         q6oncd = 0
3176 3116
         q7oncd = 0
3177 3117
         q8oncd = 0         
3118
+
3178 3119
     # nollie varial heelflip
3179 3120
     # 7 < 8 < 4
3180 3121
     if q7oncd > 0 and q8oncd > 0 and q4oncd > 0 and q7oncd <= q8oncd <= q4oncd:
@@ -3190,6 +3131,7 @@ def main():
3190 3131
         q6oncd = 0
3191 3132
         q7oncd = 0
3192 3133
         q8oncd = 0 
3134
+
3193 3135
     #360 shuvit
3194 3136
     if q3oncd > 0 and q4oncd > 0 and q5oncd > 0 and q6oncd > 0 and q7oncd > 0 and q7oncd >= q6oncd >= q5oncd >= q4oncd >= q3oncd:
3195 3137
     #    print("q4oncd: ", q4oncd, " q5oncd: ", q5oncd, " q6oncd: ", q6oncd)
@@ -3204,7 +3146,8 @@ def main():
3204 3146
         q5oncd = 0
3205 3147
         q6oncd = 0
3206 3148
         q7oncd = 0
3207
-        q8oncd = 0         
3149
+        q8oncd = 0    
3150
+
3208 3151
     #360 fs shuvit    
3209 3152
     if q3oncd > 0 and q4oncd > 0 and q5oncd > 0 and q6oncd >= 0 and q7oncd > 0 and q7oncd <= q6oncd <= q5oncd <= q4oncd <= q3oncd:
3210 3153
         dict['trick_string'] = '360 Frontside shuvit'
@@ -3218,6 +3161,7 @@ def main():
3218 3161
         q6oncd = 0
3219 3162
         q7oncd = 0
3220 3163
         q8oncd = 0 
3164
+        
3221 3165
     #ollie
3222 3166
     if q5oncd > 0 and q1oncd > 0 and q5oncd < q1oncd:
3223 3167
         JUMPSTRENGTH = q1oncd - q5oncd

Loading…
Cancel
Save