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

+ 2
- 2
menuV3.py View File

646
         #if opt == 'settings':
646
         #if opt == 'settings':
647
             dict['current_list'] = ['resolution', 'graphics', 'player', 'level', 'camera', 'physics']
647
             dict['current_list'] = ['resolution', 'graphics', 'player', 'level', 'camera', 'physics']
648
         if dict['lv0_opt'] == 'replay':
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
         if dict['lv0_opt'] == 'level':
650
         if dict['lv0_opt'] == 'level':
651
             dict['current_list'] = ['Demo Scene', 'Empty Lot', 'Training', 'Spine', 'Warehouse', 'Shop', 'Slavonski Brod (WIP)']  
651
             dict['current_list'] = ['Demo Scene', 'Empty Lot', 'Training', 'Spine', 'Warehouse', 'Shop', 'Slavonski Brod (WIP)']  
652
             
652
             
812
     dict['mlevel'] = 0
812
     dict['mlevel'] = 0
813
     dict['current_opt'] = ''
813
     dict['current_opt'] = ''
814
     dict['pause_menu_text'] = ''
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
 def output(dict):
817
 def output(dict):
818
     try:
818
     try:

+ 3
- 3
npause.py View File

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

+ 9
- 34
walk.py View File

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

Loading…
Cancel
Save