Browse Source

spring cleaning

shuvit 6 years ago
parent
commit
5fc576a2f1
6 changed files with 48 additions and 193 deletions
  1. 1
    1
      Record.py
  2. 4
    4
      co_ActionState.py
  3. 29
    149
      controller2.py
  4. 2
    2
      menuV3.py
  5. 3
    3
      npause.py
  6. 9
    34
      walk.py

+ 1
- 1
Record.py View File

@@ -117,7 +117,7 @@ class getData:
117 117
         wheel3 = scene.objects["rollen.002"]
118 118
         wheel4 = scene.objects["rollen.003"]        
119 119
         playing_layer = 0
120
-        for x in range(3020):
120
+        for x in range(7):
121 121
             l1 = deck.isPlayingAction(x)
122 122
             if l1 == True:
123 123
                 playing_layer = x

+ 4
- 4
co_ActionState.py
File diff suppressed because it is too large
View File


+ 29
- 149
controller2.py View File

@@ -355,11 +355,7 @@ def main():
355 355
                 if STANCE == 0:
356 356
                     own['requestAction'] = 'reg_land'
357 357
                 elif STANCE == 1:
358
-                    own['requestAction'] = 'fak_land'                
359
-            killact(2)
360
-            killact(3)
361
-            killact(4)
362
-            killact(5)    
358
+                    own['requestAction'] = 'fak_land'                  
363 359
         lf_ground = r_ground.triggered
364 360
         own["lF_ground"] = lf_ground
365 361
         vib_countdown = own["vib_Countdown"]
@@ -568,86 +564,34 @@ def main():
568 564
         if own["revert_timer"] < 1 and own['manual_v2'] == 0 and playing == 0:
569 565
             own['requestAction'] = 'reg_roll'
570 566
     def reg_stance_off():
571
-        killact(2)   
567
+        pass 
572 568
         
573 569
     def reg_manual_on():
574 570
         own['requestAction'] = 'reg_manual'
575
-        if own["reg_manual_timer"] == 41:
576
-            killact(3000)
577
-            killact(3001)
578
-            killact(3002)    
571
+  
579 572
     def reg_manual_off():
580
-        killact(222)
581
-        killact(223)
582
-        killact(224)  
583
-        killact(3000)
584
-        killact(3001)
585
-        killact(3002)
586
-        killact(10)  
587
-        killact(32)
588
-        killact(11)  
589
-        killact(34) 
573
+        pass 
590 574
         
591 575
     def fak_manual_on():
592
-        #killall()
593 576
         own['requestAction'] = 'fak_manual'
594
-        #print('fuck fuck fuck')
595
-        if own["fak_manual_timer"] == 41:
596
-            killact(3000)
597
-            killact(3001)
598
-            killact(3002)    
577
+ 
599 578
     def fak_manual_off():
600
-        killact(222)
601
-        killact(223)
602
-        killact(224)  
603
-        killact(3000)
604
-        killact(3001)
605
-        killact(3002)
606
-        killact(10)  
607
-        killact(32)
608
-        killact(11)  
609
-        killact(34)  
579
+        pass 
610 580
     #######                     
611 581
     #######
612 582
     #######
613 583
     #######
614 584
     def reg_nmanual_on():
615
-        own['requestAction'] = 'reg_nmanual'
616
-        if own["reg_nmanual_timer"] == 41:
617
-            killact(3000)
618
-            killact(3001)
619
-            killact(3002)    
585
+        own['requestAction'] = 'reg_nmanual'   
620 586
     def reg_nmanual_off():
621
-        killact(222)
622
-        killact(223)
623
-        killact(224)  
624
-        killact(3000)
625
-        killact(3001)
626
-        killact(3002)
627
-        killact(10)  
628
-        killact(32)
629
-        killact(11)  
630
-        killact(34) 
587
+        pass
631 588
         
632 589
     def fak_nmanual_on():
633 590
         own['requestAction'] = 'fak_nmanual'
634
-        if own["fak_nmanual_timer"] == 41:
635
-            killact(3000)
636
-            killact(3001)
637
-            killact(3002)    
591
+   
638 592
     def fak_nmanual_off():
639
-        killact(222)
640
-        killact(223)
641
-        killact(224)  
642
-        killact(3000)
643
-        killact(3001)
644
-        killact(3002)
645
-        killact(10)  
646
-        killact(32)
647
-        killact(11)  
648
-        killact(34)      
593
+        pass      
649 594
         
650
-    
651 595
     if own['l_actionState'] == 'reg_manual_revert_ccw':
652 596
         own['manual_v2_type'] = 'fak nose manual'
653 597
         fak_nmanual_on()  
@@ -660,11 +604,9 @@ def main():
660 604
         
661 605
     def reg_stanceinc_on():
662 606
         pass
663
-        #skater.playAction("nreg", 1,60, layer=3, blendin=2, layer_weight=0, play_mode=1, speed=.5)        
664
-        #deck.playAction("a_reg", 1,40, layer=3, blendin=0, blend_mode=0, play_mode=1, speed=.5)
665
-        #trucks.playAction("a_reg", 1,40, layer=3, blendin=2, layer_weight=0, play_mode=1, speed=.5)
607
+
666 608
     def reg_stanceinc_off():
667
-        killact(3)   
609
+        pass  
668 610
         
669 611
                     
670 612
     def reg_stance_left_on():
@@ -684,15 +626,14 @@ def main():
684 626
             playing_action_frame = skater.getActionFrame(LAND_LAYER)
685 627
             if LAST_RIGHT == 0 or (playing_action_frame > (LAND_END - 2) and playing_action_frame < (LAND_END - 1)):
686 628
                 LAST_RIGHT = 1
687
-            own["LAST_RIGHT"] = 1 
688
-                  
629
+            own["LAST_RIGHT"] = 1                   
689 630
        
690 631
     def fak_stance_on():
691 632
         playing = deck.isPlayingAction(40)
692 633
         if own['manual_v2'] == 0 and own["revert_timer"] < 1 and playing == 0 and own['gt_cd2'] < 1:
693 634
             own['requestAction'] = 'fak_roll'
694 635
     def fak_stance_off():
695
-        killact(3)
636
+        pass
696 637
         
697 638
     def fak_stance_left_on():
698 639
         if own['manual_v2'] == 0 and own["revert_timer"] < 1 and own['gt_cd2'] < 1 and ground_since > 30:
@@ -703,8 +644,6 @@ def main():
703 644
                 LAST_LEFT_FAK = 1
704 645
             own["LAST_LEFT_FAK"] = 1                      
705 646
     def fak_stance_left_off():
706
-        killact(12)  
707
-        killact(36)
708 647
         LAST_LEFT_FAK = own["LAST_LEFT_FAK"]
709 648
         own["LAST_LEFT_FAK"] = 0
710 649
         
@@ -714,8 +653,6 @@ def main():
714 653
             LAST_RIGHT_FAK = own["LAST_RIGHT_FAK"]
715 654
             own["LAST_RIGHT_FAK"] = 1        
716 655
     def fak_stance_right_off():
717
-        killact(13) 
718
-        killact(37)
719 656
         LAST_RIGHT_FAK = own["LAST_RIGHT_FAK"]
720 657
         own["LAST_RIGHT_FAK"] = 0    
721 658
         
@@ -725,18 +662,16 @@ def main():
725 662
             own['requestAction'] = 'reg_air'        
726 663
 
727 664
     def reg_air_off():
728
-        killact(4)    
665
+        pass   
729 666
     def fak_air_on():
730 667
         flipping = skater.isPlayingAction(fliplay)
731 668
         if flipping == False:
732 669
             own['requestAction'] = 'fak_air' 
733 670
       
734 671
     def fak_air_off():
735
-        killact(5)
672
+        pass
736 673
     #$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$    
737
-    def stance():
738
-    #    turnsens = .04
739
-    #    turnblend = 10    
674
+    def stance():  
740 675
         rotation = .96
741 676
         turnsens = 0.06
742 677
         if rot.z < .9: inc = 1
@@ -745,7 +680,6 @@ def main():
745 680
         #print(flipping)
746 681
         #ground
747 682
         ground_since = own["framenum"] - own['lF_air_frame']
748
-        #if r_ground.triggered == True and grindHit == False and flipping == False and own["wallride"] == None and own['revert_timer'] < 2 and ground_since > 40:
749 683
         if r_ground.triggered == True and grindHit == False and flipping == False and own["wallride"] == None and own['revert_timer'] < 2:    
750 684
             if STANCE == 0:
751 685
                 reg_manual = own['reg_manual']
@@ -843,8 +777,7 @@ def main():
843 777
     ###################
844 778
     def jump():
845 779
         #print("jump funct")
846
-        jump_timer = own['jump_timer']
847
-        
780
+        jump_timer = own['jump_timer']       
848 781
         reg_manual_off()
849 782
         fak_manual_off()
850 783
         reg_nmanual_off()
@@ -907,25 +840,21 @@ def main():
907 840
                 own['grind_jump'] = 1
908 841
                 if lLR > turnsens or lLR < -turnsens or lUD > turnsens or lUD < -turnsens:
909 842
                     own['grindjumpturn'] = True
910
-                    #print("turn on grindjumpturn")
911 843
         num = 1            
912 844
         if num ==1:                
913 845
             rString = "R"        
914 846
             lString = "L"
915 847
             cont.deactivate(wallrideconstL)
916 848
             cont.deactivate(wallrideconstR)
917
-            #print("deactivating constraints")
918 849
             if own["wallride"] == "R":
919 850
                 force = [0,170,0]
920 851
                 own.applyForce(force, True)
921
-                #print("****walljumpforce R")
922 852
                 cont.activate(own.actuators["pop2"])
923 853
                 jump_timer = 60
924 854
                 own['jump_timer'] = jump_timer            
925 855
             if own["wallride"] == "L":
926 856
                 force = [0,-170,0] #325
927 857
                 own.applyForce(force, True)                    
928
-                #print("****walljumpforce L")
929 858
                 cont.activate(own.actuators["pop2"])
930 859
                 jump_timer = 60
931 860
                 own['jump_timer'] = jump_timer
@@ -955,11 +884,9 @@ def main():
955 884
         velocity = own['velocity']
956 885
         #regular
957 886
         local = True
958
-        downforce = -.1
959
-        
887
+        downforce = -.1        
960 888
         lF_air_frame = own['lF_air_frame']
961 889
         frames_since_ground = own['framenum'] - own['lF_air_frame']     
962
-
963 890
         if linVelocity.x < MAX_VEL and linVelocity.x >= -0 and STANCE == 1 and grindHit == False and frames_since_ground > 30 and own['last_manual_v2'] == 0:            
964 891
             countdown = COUNTDOWN
965 892
             yvel = linVelocity.x + SPEEDPUMP
@@ -1018,8 +945,7 @@ def main():
1018 945
                     own['requestAction'] = 'reg_opos'
1019 946
             elif (r_ground.triggered == 1) and STANCE == True and own['manual'] == 0:
1020 947
                 if grindold == 0:
1021
-                    own['requestAction'] = 'fak_opos'
1022
-         
948
+                    own['requestAction'] = 'fak_opos'         
1023 949
             own["last_Opos"] = True
1024 950
         
1025 951
     def noposin():  
@@ -1504,9 +1430,6 @@ def main():
1504 1430
 
1505 1431
             GRAB_PLAYED = True
1506 1432
             own["GRAB_PLAYED)"] = GRAB_PLAYED
1507
-        elif r_ground.triggered == 1:
1508
-            killact(400)
1509
-            killact(401)
1510 1433
                 
1511 1434
     def backside_grab_on():
1512 1435
         GRAB_PLAYED = own["GRAB_PLAYED"]
@@ -1518,9 +1441,7 @@ def main():
1518 1441
         elif GRAB_ON == True and GRAB_PLAYED == False and r_ground.triggered == 0:
1519 1442
             own['requestAction'] = 'backside_grab'        
1520 1443
             GRAB_PLAYED = True
1521
-            own["GRAB_PLAYED)"] = GRAB_PLAYED
1522
-        elif r_ground.triggered == 1:
1523
-            killact(402)              
1444
+            own["GRAB_PLAYED)"] = GRAB_PLAYED            
1524 1445
             
1525 1446
     def fakfrontside_grab_on():
1526 1447
         GRAB_PLAYED = own["GRAB_PLAYED"]
@@ -1533,8 +1454,6 @@ def main():
1533 1454
             own['requestAction'] = 'fak_frontside_grab' 
1534 1455
             GRAB_PLAYED = True
1535 1456
             own["GRAB_PLAYED)"] = GRAB_PLAYED
1536
-        elif r_ground.triggered == 1:        
1537
-            killact(403)
1538 1457
         
1539 1458
     def fakbackside_grab_on():
1540 1459
         GRAB_PLAYED = own["GRAB_PLAYED"]
@@ -1543,8 +1462,6 @@ def main():
1543 1462
             own['requestAction'] = 'fak_backside_grab' 
1544 1463
             GRAB_PLAYED = True
1545 1464
             own["GRAB_PLAYED)"] = GRAB_PLAYED
1546
-        elif r_ground.triggered == 1:
1547
-            killact(404)
1548 1465
             
1549 1466
     #nose/tail grabs        
1550 1467
     def frontside_nose_grab_on():
@@ -1554,19 +1471,13 @@ def main():
1554 1471
             own['requestAction'] = 'frontside_nose_grab' 
1555 1472
             GRAB_PLAYED = True
1556 1473
             own["GRAB_PLAYED)"] = GRAB_PLAYED
1557
-        elif r_ground.triggered == 1:
1558
-            killact(400)
1559
-        #print("frontside nosegrab on")
1560 1474
     def frontside_tail_grab_on():
1561 1475
         GRAB_PLAYED = own["GRAB_PLAYED"]
1562 1476
         GRAB_ON = own["GRAB_ON"]
1563 1477
         if GRAB_ON == True and GRAB_PLAYED == False and r_ground.triggered == 0: 
1564 1478
             own['requestAction'] = 'frontside_tail_grab' 
1565 1479
             GRAB_PLAYED = True
1566
-            own["GRAB_PLAYED)"] = GRAB_PLAYED
1567
-        elif r_ground.triggered == 1:
1568
-            killact(400)    
1569
-        #print("frontside tailgrab on")  
1480
+            own["GRAB_PLAYED)"] = GRAB_PLAYED     
1570 1481
     def backside_nose_grab_on():
1571 1482
         GRAB_PLAYED = own["GRAB_PLAYED"]
1572 1483
         GRAB_ON = own["GRAB_ON"]
@@ -1581,10 +1492,7 @@ def main():
1581 1492
         elif GRAB_ON == True and GRAB_PLAYED == False and r_ground.triggered == 0:   
1582 1493
             own['requestAction'] = 'backside_nose_grab' 
1583 1494
             GRAB_PLAYED = True
1584
-            own["GRAB_PLAYED)"] = GRAB_PLAYED
1585
-        elif r_ground.triggered == 1:
1586
-            killact(405)    
1587
-        #print("backside nosegrab on")
1495
+            own["GRAB_PLAYED)"] = GRAB_PLAYED 
1588 1496
     def backside_tail_grab_on():
1589 1497
         GRAB_PLAYED = own["GRAB_PLAYED"]
1590 1498
         GRAB_ON = own["GRAB_ON"]
@@ -1592,9 +1500,6 @@ def main():
1592 1500
             own['requestAction'] = 'backside_tail_grab' 
1593 1501
             GRAB_PLAYED = True
1594 1502
             own["GRAB_PLAYED)"] = GRAB_PLAYED
1595
-        elif r_ground.triggered == 1:
1596
-            killact(411)    
1597
-        #print("backside tailgrab on")
1598 1503
     #switch    
1599 1504
     def fak_frontside_nose_grab_on():
1600 1505
         GRAB_PLAYED = own["GRAB_PLAYED"]
@@ -1603,9 +1508,7 @@ def main():
1603 1508
             own['requestAction'] = 'fak_frontside_nose_grab' 
1604 1509
             GRAB_PLAYED = True
1605 1510
             own["GRAB_PLAYED)"] = GRAB_PLAYED
1606
-        elif r_ground.triggered == 1:
1607
-            killact(406)      
1608
-        #print("fak frontside nosegrab on")
1511
+
1609 1512
     def fak_frontside_tail_grab_on():
1610 1513
         GRAB_PLAYED = own["GRAB_PLAYED"]
1611 1514
         GRAB_ON = own["GRAB_ON"]
@@ -1613,9 +1516,7 @@ def main():
1613 1516
             own['requestAction'] = 'fak_frontside_tail_grab' 
1614 1517
             GRAB_PLAYED = True
1615 1518
             own["GRAB_PLAYED)"] = GRAB_PLAYED
1616
-        elif r_ground.triggered == 1:
1617
-            killact(412)    
1618
-        #print("fak frontside tailgrab on")  
1519
+ 
1619 1520
     def fak_backside_nose_grab_on():
1620 1521
         GRAB_PLAYED = own["GRAB_PLAYED"]
1621 1522
         GRAB_ON = own["GRAB_ON"]
@@ -1623,9 +1524,7 @@ def main():
1623 1524
             own['requestAction'] = 'fak_backside_nose_grab' 
1624 1525
             GRAB_PLAYED = True
1625 1526
             own["GRAB_PLAYED)"] = GRAB_PLAYED
1626
-        elif r_ground.triggered == 1:
1627
-            killact(408)         
1628
-        #print("fak backside nosegrab on")
1527
+
1629 1528
     def fak_backside_tail_grab_on():
1630 1529
         GRAB_PLAYED = own["GRAB_PLAYED"]
1631 1530
         GRAB_ON = own["GRAB_ON"]
@@ -1633,9 +1532,7 @@ def main():
1633 1532
             own['requestAction'] = 'fak_backside_tail_grab' 
1634 1533
             GRAB_PLAYED = True
1635 1534
             own["GRAB_PLAYED)"] = GRAB_PLAYED
1636
-        elif r_ground.triggered == 1:
1637
-            killact(410)    
1638
-        #print("fak backside tailgrab on")         
1535
+    
1639 1536
     #--------------------
1640 1537
             
1641 1538
     def SWAG():
@@ -1758,7 +1655,6 @@ def main():
1758 1655
         jump()    
1759 1656
     def frfoot():
1760 1657
         lay = grablay + 40
1761
-        killact(5)
1762 1658
         if STANCE == 0:
1763 1659
             own['requestAction'] = 'reg_frfoot'
1764 1660
         if STANCE == 1:
@@ -1766,7 +1662,6 @@ def main():
1766 1662
         jump()          
1767 1663
     def blfoot():
1768 1664
         lay = grablay + 40
1769
-        killact(5)
1770 1665
         if STANCE == 0:
1771 1666
             own['requestAction'] = 'reg_blfoot'
1772 1667
         if STANCE == 1:
@@ -1774,7 +1669,6 @@ def main():
1774 1669
         jump() 
1775 1670
     def flfoot():
1776 1671
         lay = grablay + 40
1777
-        killact(5)
1778 1672
         if STANCE == 0:
1779 1673
             own['requestAction'] = 'reg_flfoot'
1780 1674
         if STANCE == 1:
@@ -2504,15 +2398,11 @@ def main():
2504 2398
         wr = own["wallride"]
2505 2399
         jump_timer = own['jump_timer']
2506 2400
         if rUD > .040 and r_ground.triggered == False and GRAB_ON == False and wr == None and jump_timer < 30:
2507
-            killact(2)
2508
-            killact(4)
2509 2401
             if STANCE == 0:
2510 2402
                 own['requestAction'] = 'reg_air_tail' 
2511 2403
             else:
2512 2404
                 own['requestAction'] = 'fak_air_tail' 
2513 2405
         elif rUD < -.040 and r_ground.triggered == False and GRAB_ON == False and wr == None and jump_timer < 30:
2514
-            killact(2)
2515
-            killact(4)
2516 2406
             if STANCE == 0:
2517 2407
                 own['requestAction'] = 'reg_air_nose' 
2518 2408
             else:
@@ -2530,7 +2420,6 @@ def main():
2530 2420
         local = True
2531 2421
         rot = [ 0.0, 0.0, 3.14]
2532 2422
         own.applyRotation(rot,local)
2533
-        
2534 2423
         framenum = own['framenum']
2535 2424
         last_ground_frame = own['lF_ground_frame']
2536 2425
         lF_air_frame = own['lF_air_frame']
@@ -3435,7 +3324,6 @@ def main():
3435 3324
             if STANCE == 1:
3436 3325
                 own['requestAction'] = 'fak_hippy_in'
3437 3326
         if own['hippy'] == 0 and own['last_hippy'] == 1:
3438
-            killact(1100)
3439 3327
             if rLR > turnsens:
3440 3328
                 local = True
3441 3329
                 rot = [ 0.0, 0.0, 3.14]
@@ -3642,9 +3530,6 @@ def main():
3642 3530
     invert() 
3643 3531
     footplant()
3644 3532
         
3645
-    if own['invert_on'] == 0: 
3646
-        killact(900)
3647
-        
3648 3533
     def reset_pos():
3649 3534
         #reset
3650 3535
         if ddPad == 1:   
@@ -4241,9 +4126,7 @@ def main():
4241 4126
             if own["wallride"] != "R":
4242 4127
                 own["wallride"] = None
4243 4128
             cont.deactivate(wallrideconstL) 
4244
-            killact(3000)
4245
-            killact(3001)
4246
-            killact(3002)       
4129
+      
4247 4130
         if wallrideR.triggered and wallride_off == 0:
4248 4131
             own['jump_timer'] = 0
4249 4132
             if r_ground.triggered == False:
@@ -4258,10 +4141,7 @@ def main():
4258 4141
         else:
4259 4142
             if own["wallride"] != "L":
4260 4143
                 own["wallride"] = None
4261
-            cont.deactivate(wallrideconstR) 
4262
-            killact(3003)
4263
-            killact(3004)
4264
-            killact(3005)   
4144
+            cont.deactivate(wallrideconstR)   
4265 4145
 
4266 4146
     def wallride_sound():
4267 4147
         

+ 2
- 2
menuV3.py View File

@@ -646,7 +646,7 @@ def get_c_list(dict):
646 646
         #if opt == 'settings':
647 647
             dict['current_list'] = ['resolution', 'graphics', 'player', 'level', 'camera', 'physics']
648 648
         if dict['lv0_opt'] == 'replay':
649
-            dict['current_list'] = ['enter replay (n/a)', 'recorder on', 'record length (n/a)'] 
649
+            dict['current_list'] = ['enter replay (press back button)', 'recorder on', 'record length (n/a)'] 
650 650
         if dict['lv0_opt'] == 'level':
651 651
             dict['current_list'] = ['Demo Scene', 'Empty Lot', 'Training', 'Spine', 'Warehouse', 'Shop', 'Slavonski Brod (WIP)']  
652 652
             
@@ -812,7 +812,7 @@ def init(own, dict):
812 812
     dict['mlevel'] = 0
813 813
     dict['current_opt'] = ''
814 814
     dict['pause_menu_text'] = ''
815
-    dict['menu_end_points'] = ['exit', 'restart', 'shirt color r', 'shirt color g', 'shirt color b', 'shoe color r', 'shoe color g', 'shoe color b','deck color r', 'deck color g', 'deck color b', 'shirt logo', 'brightness / contrast on', 'brightness value', 'contrast value', 'hdr on', 'avgL', 'hdr strength', 'ao on', 'ao radius', 'ao width', 'ao only', 'dof on', 'sun strength', 'sun rot x', 'sun rot y', 'shadow on', 'ambient strength', 'Demo Scene', 'Empty Lot', 'Park A', 'Training', 'Spine', 'Warehouse', 'Shop', '1920x1080', '1280x720', '1024x768', '800x600', 'fullscreen', 'bloom on', 'cam height', 'focal length', 'min dist', 'max dist', 'enter replay', 'recorder on', 'record length', 'enter replay (n/a)', 'recorder on', 'record length (n/a)']
815
+    dict['menu_end_points'] = ['exit', 'restart', 'shirt color r', 'shirt color g', 'shirt color b', 'shoe color r', 'shoe color g', 'shoe color b','deck color r', 'deck color g', 'deck color b', 'shirt logo', 'brightness / contrast on', 'brightness value', 'contrast value', 'hdr on', 'avgL', 'hdr strength', 'ao on', 'ao radius', 'ao width', 'ao only', 'dof on', 'sun strength', 'sun rot x', 'sun rot y', 'shadow on', 'ambient strength', 'Demo Scene', 'Empty Lot', 'Park A', 'Training', 'Spine', 'Warehouse', 'Shop', '1920x1080', '1280x720', '1024x768', '800x600', 'fullscreen', 'bloom on', 'cam height', 'focal length', 'min dist', 'max dist', 'enter replay', 'recorder on', 'record length', 'enter replay (press back button)', 'recorder on', 'record length (n/a)']
816 816
     
817 817
 def output(dict):
818 818
     try:

+ 3
- 3
npause.py View File

@@ -88,21 +88,21 @@ def main():
88 88
 
89 89
     if pause_state == 1: 
90 90
         if mcam['playback'] == False:       
91
-            layer = 450
91
+            layer = 2
92 92
             if skater.isPlayingAction(layer):
93 93
                 skater.stopAction(layer)
94 94
             if deck.isPlayingAction(layer):    
95 95
                 deck.stopAction(layer)
96 96
             if trucks.isPlayingAction(layer):    
97 97
                 trucks.stopAction(layer)
98
-            layer = 460
98
+            layer = 3
99 99
             if skater.isPlayingAction(layer):
100 100
                 skater.stopAction(layer)
101 101
             if deck.isPlayingAction(layer):    
102 102
                 deck.stopAction(layer)
103 103
             if trucks.isPlayingAction(layer):    
104 104
                 trucks.stopAction(layer)
105
-            layer = 470
105
+            layer = 4
106 106
             if skater.isPlayingAction(layer):
107 107
                 skater.stopAction(layer)
108 108
             if deck.isPlayingAction(layer):    

+ 9
- 34
walk.py View File

@@ -4,11 +4,9 @@
4 4
 import bge
5 5
 import GameLogic
6 6
 import ctypes
7
-#import bpy
8 7
 import random
9 8
 import math
10 9
 
11
-#build global dict (move this to separate script that runs once)
12 10
 scene = bge.logic.getCurrentScene()
13 11
 objList = scene.objects
14 12
 
@@ -173,7 +171,6 @@ if own['walk_timer'] < 50:
173 171
     own.setLinearVelocity([velx, 0, vel.z], True)
174 172
 else:
175 173
     own.setLinearVelocity([0, 0, vel.z], True)
176
-    #print("set 0 vel")
177 174
     
178 175
 wf = 1
179 176
 if own['last_walk_frame'] - own['last_roll_frame'] > 55:
@@ -182,13 +179,14 @@ if own['last_walk_frame'] - own['last_roll_frame'] > 55:
182 179
 if ((lup == 1 and aBut == 0) or (dict['kb_ua'] == 2 and dict['kb_lsh'] == 0)) and (r_ground.positive or own['stair_counter'] > 0) and xBut == 0 and wf == 0 and dict['kb_space'] == 0:
183 180
     own['walking'] = "regular"
184 181
     walking = "regular"
182
+    
185 183
 elif ((lup == 1 and aBut == 1) or (dict['kb_lsh'] == 2 and dict['kb_ua'] == 2)) and yBut == False and (r_ground.positive or own['stair_counter'] > 0) and xBut == 0 and wf == 0 and dict['kb_space'] != 2:
186 184
     own['walking'] = "fast"
187 185
     walking = "fast"
188 186
 else:
189 187
     own['walking'] = None
190 188
     walking = None
191
-#print(own['walk_timer'])    
189
+   
192 190
 if walking == "regular":
193 191
     cont.deactivate(own.actuators['forward2']) 
194 192
     cont.deactivate(own.actuators['backward2'])    
@@ -202,8 +200,7 @@ if walking == "fast":
202 200
     if stance == 0:
203 201
         cont.activate(own.actuators['forward2'])
204 202
     else:
205
-        cont.activate(own.actuators['backward2'])            
206
-        
203
+        cont.activate(own.actuators['backward2'])                 
207 204
 
208 205
 if walking == None:
209 206
     cont.deactivate(own.actuators['forward2']) 
@@ -214,8 +211,7 @@ if walking == None:
214 211
         velx = vel.x * .95             
215 212
         own.setLinearVelocity([velx, 0, vel.z], True)
216 213
     else:
217
-        own.setLinearVelocity([0, 0, vel.z], True)
218
-        #print("set 0 vel")    
214
+        own.setLinearVelocity([0, 0, vel.z], True) 
219 215
     
220 216
 #old walking
221 217
 if (lup == 1 and aBut == 0) or (dict['kb_ua'] == 2 and dict['kb_lsh'] == 0)  and yBut == False and (r_ground.positive or own['stair_counter'] > 0) and xBut == 0:
@@ -247,11 +243,7 @@ elif ((lup == 1 and aBut == 1) or (dict['kb_lsh'] == 2 and dict['kb_ua'] == 2))
247 243
             skater.playAction("reg_nwalk_nb.001", 0,35, layer=25, play_mode=1, speed=1)
248 244
         else:
249 245
             own['requestAction'] = 'reg_walkFast'
250
-
251
-    else:
252
-        killact(25) 
253
-        killact(305)
254
-        killact(306)           
246
+         
255 247
     if stance == 1 and skater.isPlayingAction(fliplay) == False:        
256 248
         if own['throw_deck'] == True:
257 249
             own['requestAction'] = 'fak_walkFast_nb'
@@ -273,11 +265,8 @@ if lLeft == 1 or dict['kb_la'] == 2:
273 265
 else:
274 266
     cont.deactivate(own.actuators['left'])        
275 267
 
276
-
277
-
278 268
 #in air        
279 269
 if (lup == 1 or dict['kb_ua'] != 0) and r_ground.positive == False:
280
-    
281 270
     if stance == 0:
282 271
         cont.deactivate(own.actuators['forward'])
283 272
         cont.deactivate(own.actuators['forward2'])
@@ -296,7 +285,6 @@ if (lup == 1 or dict['kb_ua'] != 0) and r_ground.positive == False:
296 285
         killact(7)        
297 286
         velx = linvel.x + 1
298 287
         own.setLinearVelocity([1.5, linvel.y, linvel.z], 1)  
299
-        
300 288
     own['lF_air_frame'] = own['framenum']         
301 289
 #---------------
302 290
 if rLR > .05:
@@ -327,7 +315,6 @@ def onboard():
327 315
         print("start walking")
328 316
         own['walk_idling'] = 0
329 317
         if own['framenum'] > 100 and own['fall'] == False:
330
-            #pass
331 318
             cont.activate(own.actuators['pop'])
332 319
         own['getoffboard'] = False
333 320
         fliplay = 301
@@ -357,8 +344,7 @@ def onboard():
357 344
             trucks.stopAction(truckon)
358 345
             own['requestAction'] = 'fak_offboard'                          
359 346
 def jump():
360
-    if xBut == True or dict['kb_space'] == 1:
361
-    #if xBut == True:    
347
+    if xBut == True or dict['kb_space'] == 1: 
362 348
         if own['lastx'] == 0:
363 349
             killact(3)
364 350
             killact(4)
@@ -483,7 +469,6 @@ def nextframe():
483 469
             
484 470
 def checkidle():
485 471
     idle = cont.sensors["idle"]
486
-    #print(idle.positive)
487 472
     idle_frame = own["walk_idle_frame"]
488 473
     if idle.positive:
489 474
         own["walk_idle_frame"] = 0
@@ -589,7 +574,6 @@ def idle_anim():
589 574
                     elif STANCE == 1 and own['throw_deck'] == 1:
590 575
                         own['requestAction'] = 'fak_idle6'
591 576
 
592
-
593 577
 def reset_pos():
594 578
     #reset
595 579
     if ddPad == 1:   
@@ -611,8 +595,7 @@ def reset_pos():
611 595
         else: 
612 596
             own.setLinearVelocity([-.1,0,0], 1)         
613 597
             
614
-    if udPad == 1:
615
-        
598
+    if udPad == 1:        
616 599
         own['spawn_pos'] = [own.worldPosition[0], own.worldPosition[1], own.worldPosition[2]] 
617 600
         own['spawn_rot'] = [[own.worldOrientation[0][0],own.worldOrientation[0][1],own.worldOrientation[0][2]], [own.worldOrientation[1][0],own.worldOrientation[1][1],own.worldOrientation[1][2]], own.worldOrientation[2][2]]
618 601
         own['spawn_cam_pos'] = [cam.worldPosition[0], cam.worldPosition[1], cam.worldPosition[2]] 
@@ -739,8 +722,7 @@ def focus_deck():
739 722
               
740 723
 def fall():
741 724
     if own['fall'] == True:
742
-        falldeck()
743
-        
725
+        falldeck()        
744 726
         if STANCE == 1:
745 727
             own['requestAction'] = 'fak_air-walk_air'            
746 728
             own.setLinearVelocity([3,2,0], True)
@@ -762,7 +744,6 @@ def sit():
762 744
             if 'sit' in r_ground.hitObject:
763 745
                 print("sit")
764 746
                 own['sit'] = 1
765
-                #killall()
766 747
                 killact(3)
767 748
                 if STANCE == 0:
768 749
                     own['requestAction'] = 'reg_sit'
@@ -783,7 +764,6 @@ def sit():
783 764
                 own.alignAxisToVect(sit_vect, 0, .2)                    
784 765
         except:
785 766
             pass    
786
-
787 767
                       
788 768
 def switchcam():
789 769
     if ltsBut == False and own['lastlts'] == True and rtsBut == False:
@@ -1064,8 +1044,7 @@ def onground():
1064 1044
                 #print('moving away from rail')
1065 1045
 
1066 1046
     else:
1067
-        #print('in air')    
1068
-        
1047
+        #print('in air')            
1069 1048
         if  own['framenum'] - own['lF_ground_frame'] > 10:
1070 1049
             if STANCE == 0:            
1071 1050
                 own['requestAction'] = 'reg_walk_air'
@@ -1073,7 +1052,6 @@ def onground():
1073 1052
                 own['requestAction'] = 'fak_walk_air' 
1074 1053
     #if control bottom is touching ground object, turn ground on            
1075 1054
     if cb.positive:
1076
-        #if own['framenum'] - own['lF_ground_frame'] > 30:
1077 1055
         if own['framenum'] - own['last_fall_frame'] < 90:
1078 1056
             own['lF_ground_frame'] = own['framenum']
1079 1057
                                     
@@ -1107,8 +1085,6 @@ wheel1.stopAction(2)
1107 1085
 wheel2.stopAction(2)
1108 1086
 wheel3.stopAction(2)
1109 1087
 wheel4.stopAction(2)
1110
-
1111
-
1112 1088
 own['lasty'] = yBut
1113 1089
 own['lastb'] = bBut  
1114 1090
 own['lasta'] = aBut
@@ -1117,6 +1093,5 @@ own['lastlts'] = ltsBut
1117 1093
 own['lastrts'] = rtsBut        
1118 1094
 own['lastbkBut'] = bkBut
1119 1095
 own['dropinCol'] = dropinCol
1120
-#if own['actionTimer'] < 1:
1121 1096
 own['walk'] = 1
1122 1097
     

Loading…
Cancel
Save