Browse Source

misc cleaning

shuvit 5 years ago
parent
commit
9c24f3e14c
2 changed files with 28 additions and 161 deletions
  1. 22
    159
      controller2.py
  2. 6
    2
      menuV3.py

+ 22
- 159
controller2.py View File

@@ -5,7 +5,6 @@ def main():
5 5
     #scale = .3
6 6
     #action layers
7 7
     #0-14 rolling
8
-    #grablay = 400
9 8
     #fliplay = 500
10 9
     #grindlay = 700
11 10
     os = 'Windows'
@@ -22,7 +21,6 @@ def main():
22 21
     import math
23 22
 
24 23
     scene = bge.logic.getCurrentScene()
25
-    objList = scene.objects
26 24
     try:
27 25
         GameLogic.DictObjects
28 26
         init=1
@@ -61,7 +59,6 @@ def main():
61 59
 
62 60
 
63 61
     cont = GameLogic.getCurrentController() 
64
-    obj = bge.logic.getCurrentScene().objects
65 62
     char = bge.constraints.getCharacter
66 63
     own = cont.owner
67 64
     dict = bge.logic.globalDict #Get the global dictionary
@@ -181,11 +178,9 @@ def main():
181 178
     q6oncdl = own["Q6oncdl"]
182 179
     q7oncdl = own["Q7oncdl"]
183 180
     q8oncdl = own["Q8oncdl"]
184
-
181
+    fliplay = 4
185 182
 
186 183
     #setable
187
-    grablay = 600 #this plus 1
188
-    fliplay = 4
189 184
     MAX_VEL = dict['MAX_VEL']
190 185
     SPEEDUP = .055
191 186
     SPEEDPUMP = .14 #.09
@@ -198,7 +193,6 @@ def main():
198 193
     JUMPHEIGHT = dict['JUMPHEIGHT'] #775#750
199 194
     JUMPSTRENGTH = 0
200 195
     own['flip_manual_stance'] = 0
201
-    #CAVEMAN_SPEED = .75
202 196
     LAND_LAYER = 100
203 197
     LAND_END = 20
204 198
 
@@ -317,14 +311,12 @@ def main():
317 311
         if r_ground.triggered == True and skater.isPlayingAction(fliplay) and own['jump_timer'] < 40 and playing_frame < 14 and playing_frame > 3:
318 312
             own['fall'] = 1
319 313
             own['last_fall_frame'] = frame
320
-            #print("fall: ", playing_frame, own['jump_timer'])
321 314
             if STANCE == 0:
322
-                #own['requestAction'] = 'reg_fall1'
323 315
                 own['requestAction'] = 'reg_air-walk_air'
324
-            if STANCE == 1:
325
-                #own['requestAction'] = 'fak_fall1'                
316
+            if STANCE == 1:             
326 317
                 own['requestAction'] = 'fak_air-walk_air'
327 318
     check_fall()
319
+
328 320
     def check_landing():
329 321
         lf_ground = own["lF_ground"]
330 322
         STANCE = own["stance"]
@@ -438,18 +430,12 @@ def main():
438 430
                     own['manual_v2_type'] = 'fak manual' 
439 431
                     
440 432
         if STANCE == 0 and (own['manual_v2_type'] == 'fak manual' or own['actionState'] == 'fak-reg_nmanual'):
441
-            #print('change manual stance')
442 433
             own['manual_v2_type'] = 'reg nose manual'  
443
-            
444 434
         if STANCE == 1 and (own['manual_v2_type'] == 'reg manual' or own['actionState'] == 'reg-fak_nmanual'):
445
-            #print('change manual stance')                        
446 435
             own['manual_v2_type'] = 'fak nose manual'
447
-
448 436
         if STANCE == 0 and (own['manual_v2_type'] == 'fak nose manual' or own['actionState'] == 'fak-reg_manual'):
449
-            #print('change manual stance')
450 437
             own['manual_v2_type'] = 'reg manual' 
451 438
         if STANCE == 1 and (own['manual_v2_type'] == 'reg nose manual' or own['actionState'] == 'reg-fak_manual'):
452
-            #print('change manual stance')                        
453 439
             own['manual_v2_type'] = 'fak manual'               
454 440
  
455 441
     #check manual
@@ -461,11 +447,9 @@ def main():
461 447
         own["reg_manual_timer"] = timer
462 448
         if timer > 20 and rUD < .04:
463 449
             own["reg_manual"] = 0
464
-            #print("reg_man off")
465 450
     if rUD <= dict['man_sens_l'] and (STANCE == 1 or STANCE == 0) and rUD >= -.04:
466 451
         own["reg_manual_timer"] = 0
467 452
         own["reg_manual"] = 0 
468
-        #print("reg_man off2")   
469 453
     #####
470 454
     if own["reg_manual_timer"] > 10 and own["fak_manual"] == 0 and own['reg_nmanual'] == 0:
471 455
         own["reg_manual"] = 1
@@ -539,31 +523,18 @@ def main():
539 523
         playing = deck.isPlayingAction(40)
540 524
         if own["revert_timer"] < 1 and own['manual_v2'] == 0 and playing == 0:
541 525
             own['requestAction'] = 'reg_roll'
542
-    def reg_stance_off():
543
-        pass 
544 526
         
545 527
     def reg_manual_on():
546 528
         own['requestAction'] = 'reg_manual'
547
-  
548
-    def reg_manual_off():
549
-        pass 
550 529
         
551 530
     def fak_manual_on():
552 531
         own['requestAction'] = 'fak_manual'
553
- 
554
-    def fak_manual_off():
555
-        pass 
556 532
 
557 533
     def reg_nmanual_on():
558 534
         own['requestAction'] = 'reg_nmanual'   
559
-    def reg_nmanual_off():
560
-        pass
561 535
         
562 536
     def fak_nmanual_on():
563
-        own['requestAction'] = 'fak_nmanual'
564
-   
565
-    def fak_nmanual_off():
566
-        pass      
537
+        own['requestAction'] = 'fak_nmanual'    
567 538
         
568 539
     if own['l_actionState'] == 'reg_manual_revert_ccw':
569 540
         own['manual_v2_type'] = 'fak nose manual'
@@ -609,8 +580,6 @@ def main():
609 580
         playing = deck.isPlayingAction(40)
610 581
         if own['manual_v2'] == 0 and own["revert_timer"] < 1 and playing == 0 and own['gt_cd2'] < 1:   
611 582
             own['requestAction'] = 'fak_roll'
612
-    def fak_stance_off():
613
-        pass
614 583
         
615 584
     def fak_stance_left_on():
616 585
         if own['manual_v2'] == 0 and own["revert_timer"] < 1 and own['gt_cd2'] < 1 and ground_since > 30:
@@ -672,14 +641,10 @@ def main():
672 641
                 reg_nmanual = own['reg_nmanual']
673 642
                 fak_nmanual = own["fak_nmanual"]             
674 643
                 if LAST_STANCE != STANCE or LAST_GROUND != r_ground.triggered:
675
-                    fak_stance_off()
676 644
                     reg_air_off()
677 645
                     fak_air_off()
678 646
                 if reg_manual == 0 and fak_manual == 0:  
679 647
                     last_manual = own['last_reg_manual']
680
-                    if last_manual == 1:
681
-                        reg_manual_off()                   
682
-                        fak_manual_off()
683 648
                     reg_stance_on(inc)
684 649
                 if own['manual_v2_type'] == 'reg manual':    
685 650
                     reg_manual_on()                   
@@ -695,14 +660,10 @@ def main():
695 660
                 reg_nmanual = own['reg_nmanual']
696 661
                 fak_nmanual = own["fak_nmanual"]
697 662
                 if LAST_STANCE != STANCE or LAST_GROUND != r_ground.triggered:    
698
-                    reg_stance_off()
699 663
                     reg_air_off()
700 664
                     fak_air_off 
701 665
                 if fak_manual == 0:                    
702 666
                     last_manual = own['last_fak_manual']
703
-                    if last_manual == 1:
704
-                        fak_manual_off()
705
-                        reg_manual_off()
706 667
                     fak_stance_on(inc)                    
707 668
                 if own['manual_v2_type'] == 'fak manual':
708 669
                     fak_manual_on()
@@ -735,8 +696,6 @@ def main():
735 696
             if STANCE == 0:
736 697
                 if LAST_STANCE != STANCE or LAST_GROUND != r_ground.triggered:                
737 698
                     fak_air_off()
738
-                    reg_stance_off()
739
-                    fak_stance_off()
740 699
                     reg_stance_left_off() 
741 700
                     reg_stance_right_off()
742 701
                     fak_stance_left_off()  
@@ -744,28 +703,20 @@ def main():
744 703
                 reg_air_on()
745 704
             if STANCE == 1:
746 705
                 if LAST_STANCE != STANCE or LAST_GROUND != r_ground.triggered:
747
-                    reg_air_off()  
748
-                    reg_stance_off()
749
-                    fak_stance_off()  
706
+                    reg_air_off()   
750 707
                     reg_stance_left_off()
751 708
                     reg_stance_right_off()
752 709
                     fak_stance_left_off()  
753 710
                     fak_stance_right_off()  
754 711
                 fak_air_on()
755
-        if grindHit == True:
756
-            reg_stance_off()
757
-            fak_stance_off()        
712
+       
758 713
                            
759 714
     ###################
760 715
     #trick definitions#
761 716
     ###################
762 717
     def jump():
763 718
         #print("jump funct")
764
-        jump_timer = own['jump_timer']       
765
-        reg_manual_off()
766
-        fak_manual_off()
767
-        reg_nmanual_off()
768
-        fak_nmanual_off()    
719
+        jump_timer = own['jump_timer']          
769 720
         cont.deactivate(wallrideconstL)
770 721
         cont.deactivate(wallrideconstR) 
771 722
         own['last_jump_frame'] = frame    
@@ -1407,7 +1358,6 @@ def main():
1407 1358
         dict['trick_string'] = 'Frigid'
1408 1359
         if GRAB_ON == True and GRAB_PLAYED == False and r_ground.triggered == 0:         
1409 1360
             own['requestAction'] = 'reg_frigid'
1410
-            grablay2 = grablay + 1
1411 1361
             GRAB_PLAYED = True
1412 1362
             own["GRAB_PLAYED)"] = GRAB_PLAYED
1413 1363
     def reg_fsonefoot_grab_on():
@@ -1416,7 +1366,6 @@ def main():
1416 1366
         dict['trick_string'] = 'FS One Foot'
1417 1367
         if GRAB_ON == True and GRAB_PLAYED == False and r_ground.triggered == 0:         
1418 1368
             own['requestAction'] = 'reg_fsonefoot'
1419
-            grablay2 = grablay + 1
1420 1369
             GRAB_PLAYED = True
1421 1370
             own["GRAB_PLAYED)"] = GRAB_PLAYED
1422 1371
     def reg_onefoot_grab_on():
@@ -1425,7 +1374,6 @@ def main():
1425 1374
         dict['trick_string'] = 'One Foot'
1426 1375
         if GRAB_ON == True and GRAB_PLAYED == False and r_ground.triggered == 0:         
1427 1376
             own['requestAction'] = 'reg_onefoot'
1428
-            grablay2 = grablay + 1
1429 1377
             GRAB_PLAYED = True
1430 1378
             own["GRAB_PLAYED)"] = GRAB_PLAYED
1431 1379
 
@@ -1435,7 +1383,6 @@ def main():
1435 1383
         dict['trick_string'] = 'Frigid'
1436 1384
         if GRAB_ON == True and GRAB_PLAYED == False and r_ground.triggered == 0:         
1437 1385
             own['requestAction'] = 'fak_frigid'
1438
-            grablay2 = grablay + 1
1439 1386
             GRAB_PLAYED = True
1440 1387
             own["GRAB_PLAYED)"] = GRAB_PLAYED
1441 1388
     def fak_fsonefoot_grab_on():
@@ -1444,7 +1391,6 @@ def main():
1444 1391
         dict['trick_string'] = 'FS One Foot'
1445 1392
         if GRAB_ON == True and GRAB_PLAYED == False and r_ground.triggered == 0:         
1446 1393
             own['requestAction'] = 'fak_fsonefoot'
1447
-            grablay2 = grablay + 1
1448 1394
             GRAB_PLAYED = True
1449 1395
             own["GRAB_PLAYED)"] = GRAB_PLAYED
1450 1396
     def fak_onefoot_grab_on():
@@ -1453,7 +1399,6 @@ def main():
1453 1399
         dict['trick_string'] = 'One Foot'
1454 1400
         if GRAB_ON == True and GRAB_PLAYED == False and r_ground.triggered == 0:         
1455 1401
             own['requestAction'] = 'fak_onefoot'
1456
-            grablay2 = grablay + 1
1457 1402
             GRAB_PLAYED = True
1458 1403
             own["GRAB_PLAYED)"] = GRAB_PLAYED
1459 1404
 
@@ -1464,7 +1409,6 @@ def main():
1464 1409
         dict['trick_string'] = 'Judo'
1465 1410
         if GRAB_ON == True and GRAB_PLAYED == False and r_ground.triggered == 0:         
1466 1411
             own['requestAction'] = 'reg_judo'
1467
-            grablay2 = grablay + 1
1468 1412
             GRAB_PLAYED = True
1469 1413
             own["GRAB_PLAYED)"] = GRAB_PLAYED
1470 1414
 
@@ -1474,7 +1418,6 @@ def main():
1474 1418
         dict['trick_string'] = 'Judo'
1475 1419
         if GRAB_ON == True and GRAB_PLAYED == False and r_ground.triggered == 0:         
1476 1420
             own['requestAction'] = 'fak_judo'
1477
-            grablay2 = grablay + 1
1478 1421
             GRAB_PLAYED = True
1479 1422
             own["GRAB_PLAYED)"] = GRAB_PLAYED            
1480 1423
                 
@@ -1484,9 +1427,6 @@ def main():
1484 1427
         dict['trick_string'] = 'Mute'
1485 1428
         if GRAB_ON == True and GRAB_PLAYED == False and r_ground.triggered == 0:         
1486 1429
             own['requestAction'] = 'frontside_grab'
1487
-            #skater.playAction("reg_fg", 10,30, layer=400, priority=5, play_mode=1, speed=.5)
1488
-            grablay2 = grablay + 1
1489
-
1490 1430
             GRAB_PLAYED = True
1491 1431
             own["GRAB_PLAYED)"] = GRAB_PLAYED
1492 1432
                 
@@ -1717,16 +1657,13 @@ def main():
1717 1657
             own['requestAction'] = 'reg_push_goof'
1718 1658
 
1719 1659
     def brfoot():
1720
-        lay = grablay + 40
1721 1660
         if STANCE == 0:
1722 1661
             own['requestAction'] = 'reg_brfoot'
1723
-
1724 1662
         if STANCE == 1:
1725 1663
             own['requestAction'] = 'fak_brfoot' 
1726 1664
         jump()   
1727 1665
 
1728 1666
     def frfoot():
1729
-        lay = grablay + 40
1730 1667
         if STANCE == 0:
1731 1668
             own['requestAction'] = 'reg_frfoot'
1732 1669
         if STANCE == 1:
@@ -1734,7 +1671,6 @@ def main():
1734 1671
         jump()         
1735 1672
 
1736 1673
     def blfoot():
1737
-        lay = grablay + 40
1738 1674
         if STANCE == 0:
1739 1675
             own['requestAction'] = 'reg_blfoot'
1740 1676
         if STANCE == 1:
@@ -1742,7 +1678,6 @@ def main():
1742 1678
         jump() 
1743 1679
 
1744 1680
     def flfoot():
1745
-        lay = grablay + 40
1746 1681
         if STANCE == 0:
1747 1682
             own['requestAction'] = 'reg_flfoot'
1748 1683
         if STANCE == 1:
@@ -2675,13 +2610,7 @@ def main():
2675 2610
             own['powerslide_on'] = 0
2676 2611
             own['powerslide_counter'] = 0
2677 2612
             if own['last_powerslide_on'] == 0:    
2678
-                own['powerslide'] = None
2679
-    def killmanuals():
2680
-        if own['last_manual_v2'] == 1 and own['manual_v2'] == 0:    
2681
-            fak_manual_off()
2682
-            reg_manual_off()                
2683
-            fak_nmanual_off()
2684
-            reg_nmanual_off()                
2613
+                own['powerslide'] = None              
2685 2614
 
2686 2615
     def killopos():
2687 2616
         pass    
@@ -2708,7 +2637,6 @@ def main():
2708 2637
     check_powerslide()
2709 2638
     powerslide_state()
2710 2639
     powerslide_sound()
2711
-    killmanuals()
2712 2640
     killopos()
2713 2641
     grind()
2714 2642
     #onboard()    
@@ -2730,7 +2658,6 @@ def main():
2730 2658
         lq6on = 1
2731 2659
         q6oncdl = countdown
2732 2660
         own["Q6oncdl"] = q6oncdl
2733
-        #print("lq6on")
2734 2661
     elif q6oncdl > 0:
2735 2662
         lq6on = 0
2736 2663
         q6oncdl = q6oncdl - 1
@@ -2740,7 +2667,6 @@ def main():
2740 2667
         lq8on = 1
2741 2668
         q8oncdl = countdown
2742 2669
         own["Q8oncdl"] = q8oncdl
2743
-        #print("lq8on")
2744 2670
     elif q8oncdl > 0:
2745 2671
         lq8on = 0
2746 2672
         q8oncdl = q8oncdl - 1
@@ -2750,7 +2676,6 @@ def main():
2750 2676
         lq2on = 1
2751 2677
         q2oncdl = countdown
2752 2678
         own["Q2oncdl"] = q2oncdl
2753
-        #print("lq2on")
2754 2679
     elif q2oncdl > 0:
2755 2680
         lq2on = 0
2756 2681
         q2oncdl = q2oncdl - 1
@@ -2760,7 +2685,6 @@ def main():
2760 2685
         lq4on = 1
2761 2686
         q4oncdl = countdown
2762 2687
         own["Q4oncdl"] = q4oncdl
2763
-        #print("lq4on")
2764 2688
     elif q4oncdl > 0:
2765 2689
         lq4on = 0
2766 2690
         q4oncdl = q4oncdl - 1
@@ -2770,7 +2694,6 @@ def main():
2770 2694
         lq5on = 1
2771 2695
         q5oncdl = countdown
2772 2696
         own["Q5oncdl"] = q5oncdl
2773
-        #print("lq5on")
2774 2697
     elif q5oncdl > 0:
2775 2698
         lq5on = 0
2776 2699
         q5oncdl = q5oncdl - 1
@@ -2779,8 +2702,7 @@ def main():
2779 2702
     if lUD < -0.070 and lq8on !=1 and lq2on != 1:
2780 2703
         lq1on = 1
2781 2704
         q1oncdl = countdown
2782
-        own["Q1oncdl"] = q1oncdl
2783
-        #print("lq1on")              
2705
+        own["Q1oncdl"] = q1oncdl           
2784 2706
     elif q1oncdl > 0:
2785 2707
         lq1on = 0
2786 2708
         q1oncdl = q1oncdl - 1
@@ -2789,8 +2711,7 @@ def main():
2789 2711
     if lLR < -0.070 and lq8on != 1 and lq6on != 1:
2790 2712
         lq7on = 1
2791 2713
         q7oncdl = countdown
2792
-        own["Q7oncdl"] = q7oncdl
2793
-        #print("lq7on")       
2714
+        own["Q7oncdl"] = q7oncdl     
2794 2715
     elif q7oncdl > 0:
2795 2716
         lq7on = 0
2796 2717
         q7oncdl = q7oncdl - 1
@@ -2800,12 +2721,11 @@ def main():
2800 2721
         lq3on = 1
2801 2722
         q3oncdl = countdown
2802 2723
         own["Q3oncdl"] = q3oncdl
2803
-        #print("lq3on") 
2804 2724
     elif q3oncdl > 0:
2805 2725
         lq3on = 0
2806 2726
         q3oncdl = q3oncdl - 1
2807 2727
         own["Q3oncdl"] = q3oncdl       
2808
-    #34567
2728
+
2809 2729
     own['set_revert_timer'] = 0
2810 2730
     ground_since = own["framenum"] - own['lF_air_frame']
2811 2731
     if ground_since > 80 and frames_since_grinding > 40:
@@ -3011,16 +2931,13 @@ def main():
3011 2931
         q1on = 0
3012 2932
         q1oncd = q1oncd - 1
3013 2933
         own["Q1oncd"] = q1oncd
3014
-        own["last_nOpos"] = False   
3015
-    #print(q1oncd)       
2934
+        own["last_nOpos"] = False      
3016 2935
     #q7
3017 2936
     if rLR < -0.070:
3018 2937
         if q8on == 0 and q6on == 0:
3019 2938
             q7on = 1
3020 2939
             q7oncd = countdown
3021
-            own["Q7oncd"] = q7oncd
3022
-            #print("q7on")
3023
-           
2940
+            own["Q7oncd"] = q7oncd           
3024 2941
     elif q7oncd > 0:
3025 2942
         q7on = 0
3026 2943
         q7oncd = q7oncd - 1
@@ -3118,11 +3035,6 @@ def main():
3118 3035
         q6oncd = 0
3119 3036
         q7oncd = 0
3120 3037
         q8oncd = 0 
3121
-    # 360 flip
3122
-    # 3 > 4 > 5 > 8
3123
-
3124
-    # laser flip
3125
-    # 7 > 6 > 5 > 2  
3126 3038
 
3127 3039
     #nollie 360 shuvit
3128 3040
     if q7oncd > 0 and q8oncd > 0 and q1oncd > 0 and q2oncd > 0 and q3oncd > 0 and q7oncd <= q8oncd <= q1oncd <= q2oncd <= q3oncd:
@@ -3353,7 +3265,6 @@ def main():
3353 3265
     if q7oncd > 0 and q1oncd > 0 and q8oncd > 0 and q1oncd <= q8oncd <= q7oncd:# and q3oncd == 0:
3354 3266
         nollie_shuvit()
3355 3267
         print('nollie shuvit')
3356
-        #nollie_fsshuvit()
3357 3268
         reset_rtimers()   
3358 3269
         q1oncd = 0
3359 3270
         q2oncd = 0
@@ -3387,14 +3298,7 @@ def main():
3387 3298
         q5oncd = 0
3388 3299
         q6oncd = 0
3389 3300
         q7oncd = 0
3390
-        q8oncd = 0 
3391
-    #360 shuvit
3392
-
3393
-    # 360 shuvit
3394
-    # 3 > 4 > 5 >6 > 7
3395
-
3396
-    # fs 360 shuvit
3397
-    # 7 > 6 > 5 > 4 > 3     
3301
+        q8oncd = 0     
3398 3302
 
3399 3303
     def hippy_jump():
3400 3304
         STANCE = own["stance"]
@@ -3446,7 +3350,6 @@ def main():
3446 3350
 
3447 3351
     hippy_jump()    
3448 3352
     if ((since_a > cush and aBut == 1 and lasta == 1) or dict['kb_ua'] == 2) and (lTrig < 0.02 and rTrig < 0.02) and own['last_hippy'] == 0:
3449
-        #print('push')
3450 3353
         if xBut == 0 and hippy == 0 and (lastaBut_ground == True or dict['kb_ua'] == 2):
3451 3354
             push()
3452 3355
     if since_x > cush and xBut == 1 and lastx == 1 and (lTrig < 0.02 and rTrig < 0.02) and own['last_hippy'] == 0:
@@ -3537,10 +3440,7 @@ def main():
3537 3440
             if STANCE == False:
3538 3441
                 reg_frigid_grab_on()        
3539 3442
             else:
3540
-                fak_judo_grab_on()                  
3541
-                
3542
-                
3543
-                           
3443
+                fak_judo_grab_on()                                      
3544 3444
 
3545 3445
     #backside grab
3546 3446
     if lTrig > 0.02 and r_ground.triggered == 0 and flipping == False:    
@@ -3578,12 +3478,6 @@ def main():
3578 3478
                 reg_onefoot_grab_on()        
3579 3479
             else:
3580 3480
                 fak_frigid_grab_on()                    
3581
-                 
3582
-#        else:
3583
-#            if STANCE == False:
3584
-#                reg_judo_grab_on()
3585
-#            elif STANCE == True:
3586
-#                fak_judo_grab_on()            
3587 3481
                                             
3588 3482
             
3589 3483
     #kill grabs        
@@ -3682,13 +3576,11 @@ def main():
3682 3576
         own.actuators["sroll"].volume = .0001
3683 3577
         cont.deactivate(own.actuators["sroll"])
3684 3578
         own.actuators["sroll"].stopSound()
3685
-    if stBut == False and own['last_stBut'] == True:
3579
+    if (stBut == False and dict['last_stBut'] == True) or dict['kb_en'] == 1:
3686 3580
         if own['pause_on'] == True:
3687 3581
             own['pause_on'] = False   
3688 3582
         else:
3689 3583
             own['pause_on'] = True           
3690
-        
3691
-    own['last_stBut'] = stBut
3692 3584
          
3693 3585
     def ylimit():
3694 3586
         lgf = own['last_grind_frame']
@@ -3745,7 +3637,7 @@ def main():
3745 3637
     def move_followcam():
3746 3638
         if own['camera'] == 2:
3747 3639
             #if rtsBut == False and own['lastrts'] == True:
3748
-            if own['lastbkBut'] == True and bkBut == False:
3640
+            if dict['last_bkBut'] == True and bkBut == False:
3749 3641
                 #print("activate move followcam") 
3750 3642
                 if own['move_followcam'] == False:
3751 3643
                     own['move_followcam'] = True
@@ -3857,7 +3749,7 @@ def main():
3857 3749
                     cont.deactivate(followcam.actuators["rotright"])                       
3858 3750
     def move_flycam():
3859 3751
         if own['camera'] == 1:
3860
-            if own['lastbkBut'] == True and bkBut == False: 
3752
+            if dict['last_bkBut'] == True and bkBut == False: 
3861 3753
                 if own['move_freecam'] == False:
3862 3754
                     own['move_freecam'] = True
3863 3755
                 else:
@@ -4034,7 +3926,6 @@ def main():
4034 3926
         if grindHit == False:
4035 3927
             cont.deactivate(own.actuators['grindoutRight'])
4036 3928
             cont.deactivate(own.actuators['grindoutLeft'])  
4037
-        #ground_since = own["framenum"] - own['lF_air_frame'] 
4038 3929
         if (grindHit == True and jumping == None and sincegrinding > 20 and ground_since > 20)or own['invert_on'] == True and own['last_grind'] == 1:
4039 3930
             outloc = 0.022
4040 3931
             bsoutloc = .07
@@ -4152,44 +4043,35 @@ def main():
4152 4043
         outvel = own.linearVelocity
4153 4044
         if own["coping"] == 1:
4154 4045
             reg_rot = reg_rot *3
4155
-            #print('coping on')
4156 4046
         if own['gt_cd2'] > 50 and own['jump_timer'] < 20:
4157 4047
             if own['grind_out_type'] == 'reg right':
4158
-                #print("do reg right")
4159 4048
                 own.applyMovement([0,reg_move,0], True)
4160 4049
                 own.applyRotation([0,0,-reg_rot],True)
4161 4050
             if own['grind_out_type'] == 'fak right':
4162 4051
                 own.applyMovement([0,-reg_move,0], True)
4163 4052
                 own.applyRotation([0,0,-reg_rot],True)
4164
-                #print("do fak right") 
4165 4053
             if own['grind_out_type'] == 'reg left':
4166
-                #print("do reg left")
4167 4054
                 own.applyMovement([0,-reg_move,0], True)
4168 4055
                 own.applyRotation([0,0,reg_rot],True)           
4169 4056
             if own['grind_out_type'] == 'fak left':
4170 4057
                 own.applyMovement([0,reg_move,0], True)
4171 4058
                 own.applyRotation([0,0,reg_rot],True)
4172
-                #print("do fak left") 
4173 4059
             if own['grind_out_type'] == 'reg fak right':
4174 4060
                 if own['gt_cd2'] > 55:
4175 4061
                     own.applyMovement([0,reg_move2,0], True)
4176 4062
                 own.applyRotation([0,0,reg_rot2],True)            
4177
-                #print("do reg fak right")
4178 4063
             if own['grind_out_type'] == 'fak fak right':
4179 4064
                 if own['gt_cd2'] > 55:
4180 4065
                     own.applyMovement([0,-reg_move2,0], True)
4181 4066
                 own.applyRotation([0,0,reg_rot2],True)            
4182
-                #print("do fak fak right") 
4183 4067
             if own['grind_out_type'] == 'reg fak left':
4184 4068
                 if own['gt_cd2'] > 55:
4185 4069
                     own.applyMovement([0,-reg_move2,0], True)
4186
-                own.applyRotation([0,0,-reg_rot2],True)             
4187
-                #print("do reg fak left")                        
4070
+                own.applyRotation([0,0,-reg_rot2],True)                                
4188 4071
             if own['grind_out_type'] == 'fak fak left':
4189 4072
                 if own['gt_cd2'] > 55:
4190 4073
                     own.applyMovement([0,reg_move2,0], True)
4191 4074
                 own.applyRotation([0,0,-reg_rot2],True)            
4192
-                #print("do fak fak left")
4193 4075
             if own['grind_out_type'] == 'reg right' or own['grind_out_type'] == 'reg left' or own['grind_out_type'] == 'fak right' or own['grind_out_type'] == 'fak left':   
4194 4076
                 own.setLinearVelocity([outvel.x * 1.01, outvel.y, outvel.z], True)
4195 4077
             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':
@@ -4204,7 +4086,6 @@ def main():
4204 4086
                         STANCE = False
4205 4087
             if own['grind_out_type'] == 'bs reg back' or own['grind_out_type'] == 'bs fak forward':
4206 4088
                 if own['gt_cd2'] > 50:
4207
-                    #print('a')
4208 4089
                     if STANCE == True:
4209 4090
                         own.applyForce([bsforce, 0, 0], True)
4210 4091
                     if STANCE == False:
@@ -4212,7 +4093,6 @@ def main():
4212 4093
                     own.applyMovement([bs_dloc,0,0], True)    
4213 4094
             if own['grind_out_type'] == 'bs fak back' or own['grind_out_type'] == 'bs reg forward':
4214 4095
                 if own['gt_cd2'] > 50:
4215
-                    #print('b')
4216 4096
                     if STANCE == True:
4217 4097
                         own.applyForce([-bsforce, 0, 0], True)
4218 4098
                     if STANCE == False:
@@ -4281,7 +4161,6 @@ def main():
4281 4161
             cont.deactivate(wallrideconstR)   
4282 4162
 
4283 4163
     def wallride_sound():
4284
-        
4285 4164
         sact = own.actuators["wallSound"]
4286 4165
         if own["wallride"] != None and (own['actionState'] == 'reg_wall_r' or own['actionState'] == 'reg_wall_l' or own['actionState'] == 'fak_wall_r' or own['actionState'] == 'fak_wall_l'):
4287 4166
             sact.volume = .2
@@ -4301,15 +4180,16 @@ def main():
4301 4180
             own["Q5oncd"] = 0
4302 4181
             own["Q6oncd"] = 0
4303 4182
             own["Q7oncd"] = 0
4304
-            own["Q8oncd"] = 0  
4183
+            own["Q8oncd"] = 0 
4184
+
4305 4185
     def grindout_cleanup():             
4306 4186
         lgf = own['last_grind_frame']
4187
+
4307 4188
     def trans_jump():
4308 4189
         if own['jump_from_trans'] == 1:
4309 4190
             ground_ray = cont.sensors['ground_look']                        
4310 4191
             jump_obj = own['trans_jump_obj']
4311 4192
             jump_obj = scene.objects[str(own['trans_jump_obj'])]
4312
-            #print(jump_obj)
4313 4193
             worldVect = [1, 0, 0]
4314 4194
             vect = jump_obj.getAxisVect(worldVect)      
4315 4195
             go = jump_obj.worldOrientation
@@ -4328,35 +4208,21 @@ def main():
4328 4208
 
4329 4209
     def air_mover():
4330 4210
         if r_ground.triggered == False and jump_timer > 53 and frames_since_grinding > 50:
4331
-            #if grindDar2.positive:
4332
-                #print('grinddaring')
4333 4211
             if lUD > 0.075:
4334 4212
                 if STANCE == 0:
4335 4213
                     force2 = [120, 0, 10]
4336
-                    #own.applyRotation([0,.5,0], True)
4337 4214
                 if STANCE == 1:
4338 4215
                     force2 = [-120, 0, 10]            
4339
-                
4340 4216
                 own.applyForce(force2, True)
4341 4217
                 own['no_grind_pull'] = 1
4342 4218
         if r_ground.triggered == False and jump_timer > 53 and frames_since_grinding > 50:
4343
-            #if grindDar2.positive:
4344
-                #print('grinddaring')
4345 4219
             if lUD < -0.075:
4346
-#                if STANCE == 0:
4347
-#                    force2 = [-120, 0, 10]
4348
-#                    #own.applyRotation([0,.5,0], True)
4349
-#                if STANCE == 1:
4350
-#                    force2 = [120, 0, 10]            
4351
-#                
4352
-#                own.applyForce(force2, True)
4353 4220
                 own['no_grind_pull'] = 1                
4354 4221
         if r_ground.triggered == False and jump_timer > 10 and lUD > 0.075 and frames_since_grinding > 50:
4355 4222
             if STANCE == 0:
4356 4223
                 force2 = [7, 0, 10]
4357 4224
             if STANCE == 1:
4358 4225
                 force2 = [-7, 0, 10]            
4359
-            
4360 4226
             own.applyForce(force2, True)
4361 4227
             own.applyForce([0,0,5], False)
4362 4228
             own['air_mover'] = True
@@ -4447,7 +4313,6 @@ def main():
4447 4313
     own['lastrts'] = rtsBut
4448 4314
     own["lF_ground2"] = own["lF_ground"]
4449 4315
     own['last_invert'] = invert_on
4450
-    own['lastbkBut'] = bkBut
4451 4316
     own['grab_type'] = grab_type
4452 4317
     own['last_last_manual'] = own['last_manual']
4453 4318
     own['last_manual'] = own['manual']
@@ -4475,7 +4340,5 @@ def main():
4475 4340
         own.applyForce(force2, True)
4476 4341
     if (grindDar == False and r_ground.triggered and own['grindTouch'] == False) or own['jump_timer'] > 40:
4477 4342
         own['grindType'] = ''
4478
-        
4479
-    #print('q1:', q1oncd, 'q2:', q2oncd, 'q3:', q3oncd, 'q4:', q4oncd, 'q5:', q5oncd, 'q6:', q6oncd, 'q7:', q7oncd, 'q8:', q8oncd)   
4480 4343
     
4481 4344
     dict['walk'] = 0  

+ 6
- 2
menuV3.py View File

@@ -1076,7 +1076,7 @@ def get_c_list(dict):
1076 1076
     if dict['mlevel'] == 1:
1077 1077
         if dict['lv0_opt'] == 'settings':
1078 1078
         #if opt == 'settings':
1079
-            dict['current_list'] = ['resolution', 'graphics', 'player', 'level', 'camera', 'physics']
1079
+            dict['current_list'] = ['resolution', 'graphics', 'player', 'deck', 'level', 'camera', 'physics']
1080 1080
         if dict['lv0_opt'] == 'replay':
1081 1081
             dict['current_list'] = ['enter replay (press back button)', 'recorder on', 'record length (n/a)'] 
1082 1082
         if dict['lv0_opt'] == 'level':
@@ -1093,7 +1093,11 @@ def get_c_list(dict):
1093 1093
     if dict['mlevel'] == 2:
1094 1094
         if dict['lv1_opt'] == 'player':
1095 1095
         #if opt == 'settings':
1096
-            dict['current_list'] = ['character', 'shirt color r', 'shirt color g', 'shirt color b', 'shirt logo', 'shoe color r', 'shoe color g', 'shoe color b', 'deck graphic', 'deck color r', 'deck color g', 'deck color b', 'trucks color r', 'trucks color g', 'trucks color b', 'wheel color r', 'wheel color g', 'wheel color b', 'wheel1 color r', 'wheel1 color g', 'wheel1 color b', 'wheel2 color r', 'wheel2 color g', 'wheel2 color b', 'wheel3 color r', 'wheel3 color g', 'wheel3 color b', 'wheel4 color r', 'wheel4 color g', 'wheel4 color b']            
1096
+            dict['current_list'] = ['character', 'shirt color r', 'shirt color g', 'shirt color b', 'shirt logo', 'shoe color r', 'shoe color g', 'shoe color b'] 
1097
+    if dict['mlevel'] == 2:
1098
+        if dict['lv1_opt'] == 'deck':
1099
+        #if opt == 'settings':
1100
+            dict['current_list'] = ['deck graphic', 'deck color r', 'deck color g', 'deck color b', 'trucks color r', 'trucks color g', 'trucks color b', 'wheel color r', 'wheel color g', 'wheel color b', 'wheel1 color r', 'wheel1 color g', 'wheel1 color b', 'wheel2 color r', 'wheel2 color g', 'wheel2 color b', 'wheel3 color r', 'wheel3 color g', 'wheel3 color b', 'wheel4 color r', 'wheel4 color g', 'wheel4 color b']                        
1097 1101
 
1098 1102
     if dict['mlevel'] == 2:
1099 1103
         if dict['lv1_opt'] == 'level':

Loading…
Cancel
Save