Browse Source

anim_cleanup1

shuvit 6 years ago
parent
commit
3ea40b2abf
1 changed files with 6 additions and 1061 deletions
  1. 6
    1061
      controller2.py

+ 6
- 1061
controller2.py View File

36
 reduction = 400000
36
 reduction = 400000
37
 axisTh = 0.03 
37
 axisTh = 0.03 
38
 
38
 
39
-
40
-
41
-
42
-############
43
-##vibration#
44
-############
45
-## Define necessary structures
46
-#class XINPUT_VIBRATION(ctypes.Structure):
47
-#    _fields_ = [("wLeftMotorSpeed", ctypes.c_ushort), ("wRightMotorSpeed", ctypes.c_ushort)]
48
-#xinput = ctypes.windll.xinput1_3 # Load Xinput.dll
49
-## Set up function argument types and return type
50
-#XInputSetState = xinput.XInputSetState
51
-#XInputSetState.argtypes = [ctypes.c_uint, ctypes.POINTER(XINPUT_VIBRATION)]
52
-#XInputSetState.restype = ctypes.c_uint
53
-## Now we're ready to call it. Set left motor to 100%, right motor to 50%
54
-## for controller 0
55
-##vibration = XINPUT_VIBRATION(65535, 32768)
56
-##XInputSetState(0, ctypes.byref(vibration))
57
-## You can also create a helper function like this:
58
-#def set_vibration(controller, left_motor, right_motor):
59
-#    vibration = XINPUT_VIBRATION(int(left_motor * 65535), int(right_motor * 65535))
60
-#    XInputSetState(controller, ctypes.byref(vibration))  
61
-## ... and use it like so
62
-##set_vibration(0, 0.2, 0.2)
63
-################
64
-##end vibration#
65
-################
66
-
67
 #initialize quadrant variables
39
 #initialize quadrant variables
68
 q1on = 0
40
 q1on = 0
69
 q2on = 0
41
 q2on = 0
444
         own["vib_Countdown"] = 14
416
         own["vib_Countdown"] = 14
445
         cont.activate(own.actuators["Vibration"])
417
         cont.activate(own.actuators["Vibration"])
446
         #print("vibrate")
418
         #print("vibrate")
447
-        #killall() 
448
-        #if own["reg_nmanual"] == 0 and own["fak_nmanual"] == 0 and own["reg_manual"] == 0 and own["fak_manual"] == 0:
449
         if own['manual_v2'] == 0 and grindDar == 0:           
419
         if own['manual_v2'] == 0 and grindDar == 0:           
450
             if STANCE == 0:
420
             if STANCE == 0:
451
                 own['requestAction'] = 'reg_land'
421
                 own['requestAction'] = 'reg_land'
452
-                #skater.playAction("reg_land", 1,20, layer=LAND_LAYER, blendin=5, priority=7, layer_weight=0, play_mode=0, speed=.5)
453
             elif STANCE == 1:
422
             elif STANCE == 1:
454
                 own['requestAction'] = 'fak_land'                
423
                 own['requestAction'] = 'fak_land'                
455
-                #skater.playAction("fak_land", 1,20, layer=LAND_LAYER, blendin=5, priority=7, layer_weight=0, play_mode=0, speed=.5)
456
         killact(2)
424
         killact(2)
457
         killact(3)
425
         killact(3)
458
         killact(4)
426
         killact(4)
469
     if vib_countdown == 1:
437
     if vib_countdown == 1:
470
         stopAnims()
438
         stopAnims()
471
         stance()
439
         stance()
472
-    # if touched == False and lf_ground == True:    
473
-    #     if own['jump_stance'] != 3:
474
-    #         own['jump_stance'] = 3    
475
         
440
         
476
 
441
 
477
 #air anim
442
 #air anim
630
 
595
 
631
 
596
 
632
 def reg_stance_left_off():
597
 def reg_stance_left_off():
633
-    killact(10)  
634
-    killact(32)
635
     LAST_LEFT = own["LAST_LEFT"]
598
     LAST_LEFT = own["LAST_LEFT"]
636
-    if LAST_LEFT == 1 and rUD < .06:
637
-        skater.playAction("nreg_left", 30,40, layer=33, blendin=10, layer_weight=0, play_mode=0, speed=2)
638
-        #deck.playAction("a_reg_left", 30,40, layer=33, play_mode=0, speed=2)
639
-        #deck.playAction("a_reg_right", 30,40, layer=501, play_mode=0, speed=.5)
640
     own["LAST_LEFT"] = 0   
599
     own["LAST_LEFT"] = 0   
641
 
600
 
642
 def reg_stance_right_off():
601
 def reg_stance_right_off():
643
-    killact(11) 
644
-    killact(34)
645
     LAST_RIGHT = own["LAST_RIGHT"]
602
     LAST_RIGHT = own["LAST_RIGHT"]
646
-    #if LAST_RIGHT == 1 and rUD < .06:
647
-        #skater.playAction("nreg_right", 30,40, layer=35, blendin=10, layer_weight=0, play_mode=0, speed=2)
648
-        #deck.playAction("a_reg_left", 30,40, layer=33, blendin=10, layer_weight=0, priority=7, play_mode=0, speed=.5)
649
-        #deck.playAction("a_reg_right", 30,40, layer=501, play_mode=0, speed=.5)
650
     own["LAST_RIGHT"] = 0  
603
     own["LAST_RIGHT"] = 0  
651
     
604
     
652
 def reg_stance_on():
605
 def reg_stance_on():
654
     playing = deck.isPlayingAction(40)
607
     playing = deck.isPlayingAction(40)
655
     if own["revert_timer"] < 1 and own['manual_v2'] == 0 and playing == 0:
608
     if own["revert_timer"] < 1 and own['manual_v2'] == 0 and playing == 0:
656
         own['requestAction'] = 'reg_roll'
609
         own['requestAction'] = 'reg_roll'
657
-#        skater.playAction("nreg", 1,60, layer=2, blendin=4, layer_weight=0, play_mode=1, speed=.5)
658
-#        deck.playAction("a_reg", 1,40, layer=2, blendin=0, blend_mode=0, play_mode=1, speed=.5)
659
-#        trucks.playAction("a_reg", 1,40, layer=2, blendin=2, layer_weight=0, play_mode=1, speed=.5)
660
 def reg_stance_off():
610
 def reg_stance_off():
661
     killact(2)   
611
     killact(2)   
662
     
612
     
663
 def reg_manual_on():
613
 def reg_manual_on():
664
     own['requestAction'] = 'reg_manual'
614
     own['requestAction'] = 'reg_manual'
665
-#    skater.playAction("reg_manual", 10,70, layer=222, blendin=0, layer_weight=.1, play_mode=1, speed=.5)                
666
-#    deck.playAction("a_reg_manual", 10,70, layer=222, blendin=0, layer_weight=.9, play_mode=1, speed=.5)
667
-#    trucks.playAction("a_reg_manual", 10,70, layer=222, blendin=0, layer_weight=.9, play_mode=1, speed=.5)
668
-#    if own["last_reg_manual"] == 0:
669
-#        reg_stance_left_off()
670
-#        reg_stance_right_off()
671
-#        skater.playAction("reg_manual", 1,10, layer=3000, blendin=2, layer_weight=.8, play_mode=0, speed=.5)                
672
-#        deck.playAction("a_reg_manual", 1,10, layer=3000, blendin=2, layer_weight=.8, play_mode=0, speed=.5)
673
-#        trucks.playAction("a_reg_manual", 1,10, layer=3000, blendin=2, layer_weight=.8, play_mode=0, speed=.5)        
674
     if own["reg_manual_timer"] == 41:
615
     if own["reg_manual_timer"] == 41:
675
         killact(3000)
616
         killact(3000)
676
         killact(3001)
617
         killact(3001)
690
 def fak_manual_on():
631
 def fak_manual_on():
691
     #killall()
632
     #killall()
692
     own['requestAction'] = 'fak_manual'
633
     own['requestAction'] = 'fak_manual'
693
-#    skater.playAction("fak_manual", 10,70, layer=222, blendin=0, layer_weight=.1, play_mode=1, speed=.5)                
694
-#    deck.playAction("a_fak_manual", 10,70, layer=222, blendin=0, layer_weight=.9, play_mode=1, speed=.5)
695
-#    trucks.playAction("a_fak_manual", 10,70, layer=222, blendin=0, layer_weight=.9, play_mode=1, speed=.5)
696
-#    if own["last_fak_manual"] == 0:
697
-#        fak_stance_left_off()
698
-#        fak_stance_right_off()
699
-#        skater.playAction("fak_manual", 1,10, layer=3000, blendin=2, layer_weight=.8, play_mode=0, speed=.5)                
700
-#        deck.playAction("a_fak_manual", 1,10, layer=3000, blendin=2, layer_weight=.8, play_mode=0, speed=.5)
701
-#        trucks.playAction("a_fak_manual", 1,10, layer=3000, blendin=2, layer_weight=.8, play_mode=0, speed=.5)        
702
     if own["fak_manual_timer"] == 41:
634
     if own["fak_manual_timer"] == 41:
703
         killact(3000)
635
         killact(3000)
704
         killact(3001)
636
         killact(3001)
720
 #######
652
 #######
721
 def reg_nmanual_on():
653
 def reg_nmanual_on():
722
     own['requestAction'] = 'reg_nmanual'
654
     own['requestAction'] = 'reg_nmanual'
723
-#    skater.playAction("reg_nmanual", 12,70, layer=222, blendin=0, layer_weight=.1, play_mode=1, speed=.5)                
724
-#    deck.playAction("a_fak_manual", 12,70, layer=222, blendin=0, layer_weight=.9, play_mode=1, speed=.5)
725
-#    trucks.playAction("a_fak_manual", 12,70, layer=222, blendin=0, layer_weight=.9, play_mode=1, speed=.5)
726
-#    if own["last_reg_nmanual"] == 0:
727
-#        reg_stance_left_off()
728
-#        reg_stance_right_off()
729
-#        skater.playAction("reg_nmanual", 1,11, layer=3000, blendin=2, layer_weight=.8, play_mode=0, speed=.5)                
730
-#        deck.playAction("a_fak_manual", 1,11, layer=3000, blendin=2, layer_weight=.8, play_mode=0, speed=.5)
731
-#        trucks.playAction("a_fak_manual", 1,11, layer=3000, blendin=2, layer_weight=.8, play_mode=0, speed=.5)        
732
     if own["reg_nmanual_timer"] == 41:
655
     if own["reg_nmanual_timer"] == 41:
733
         killact(3000)
656
         killact(3000)
734
         killact(3001)
657
         killact(3001)
746
     killact(34) 
669
     killact(34) 
747
     
670
     
748
 def fak_nmanual_on():
671
 def fak_nmanual_on():
749
-    #killall()
750
     own['requestAction'] = 'fak_nmanual'
672
     own['requestAction'] = 'fak_nmanual'
751
-#    skater.playAction("fak_nmanual", 12,70, layer=222, blendin=0, layer_weight=.1, play_mode=1, speed=.5)                
752
-#    deck.playAction("a_reg_manual", 12,70, layer=222, blendin=0, layer_weight=.9, play_mode=1, speed=.5)
753
-#    trucks.playAction("a_reg_manual", 12,70, layer=222, blendin=0, layer_weight=.9, play_mode=1, speed=.5)
754
-#    if own["last_fak_nmanual"] == 0:
755
-#        fak_stance_left_off()
756
-#        fak_stance_right_off()
757
-#        skater.playAction("fak_nmanual", 1,11, layer=3000, blendin=2, layer_weight=.8, play_mode=0, speed=.5)                
758
-#        deck.playAction("a_reg_manual", 1,11, layer=3000, blendin=2, layer_weight=.8, play_mode=0, speed=.5)
759
-#        trucks.playAction("a_reg_manual", 1,11, layer=3000, blendin=2, layer_weight=.8, play_mode=0, speed=.5)        
760
     if own["fak_nmanual_timer"] == 41:
673
     if own["fak_nmanual_timer"] == 41:
761
         killact(3000)
674
         killact(3000)
762
         killact(3001)
675
         killact(3001)
784
     
697
     
785
                 
698
                 
786
 def reg_stance_left_on():
699
 def reg_stance_left_on():
787
-    #if own["reg_manual"] == 0 and own["fak_manual"] == 0 and own["reg_nmanual"] == 0 and own["fak_nmanual"] == 0 :
788
     if own['manual_v2'] == 0 and own["revert_timer"] < 1:
700
     if own['manual_v2'] == 0 and own["revert_timer"] < 1:
789
         own['requestAction'] = 'reg_turnLeft'    
701
         own['requestAction'] = 'reg_turnLeft'    
790
-#        skater.playAction("nreg_left", 10,30, layer=10, blendin=10, layer_weight=0, play_mode=1, speed=.5) 
791
-#        deck.playAction("a_reg_left", 10,30, layer=10, blendin=2, layer_weight=0, play_mode=1, speed=.5)
792
         LAST_LEFT = own["LAST_LEFT"]
702
         LAST_LEFT = own["LAST_LEFT"]
793
-        #layer 100 is frame 20
794
         playing_action_frame = skater.getActionFrame(LAND_LAYER)
703
         playing_action_frame = skater.getActionFrame(LAND_LAYER)
795
-        #print(playing_action_frame, "PAF")
796
         if LAST_LEFT == 0 or (playing_action_frame > (LAND_END - 2) and playing_action_frame < (LAND_END - 1)):
704
         if LAST_LEFT == 0 or (playing_action_frame > (LAND_END - 2) and playing_action_frame < (LAND_END - 1)):
797
             LAST_LEFT = 1
705
             LAST_LEFT = 1
798
-#            skater.playAction("nreg_left", 1,10, layer=32, blendin=10, layer_weight=0, play_mode=0, speed=.5)
799
-#            deck.playAction("a_reg_left", 1,10, layer=32, blendin=10, layer_weight=0, priority=7, play_mode=0, speed=.5)
800
         own["LAST_LEFT"] = 1 
706
         own["LAST_LEFT"] = 1 
801
                         
707
                         
802
          
708
          
803
 def reg_stance_right_on():
709
 def reg_stance_right_on():
804
     if own['manual_v2'] == 0 and own["revert_timer"] < 1:
710
     if own['manual_v2'] == 0 and own["revert_timer"] < 1:
805
         own['requestAction'] = 'reg_turnRight' 
711
         own['requestAction'] = 'reg_turnRight' 
806
-#        skater.playAction("nreg_right", 10,30, layer=11, blendin=10, layer_weight=0, play_mode=1, speed=.5)                
807
-#        deck.playAction("a_reg_right", 10,30, layer=11, blendin=2, layer_weight=0, play_mode=1, speed=.5)
808
         LAST_RIGHT = own["LAST_RIGHT"]
712
         LAST_RIGHT = own["LAST_RIGHT"]
809
         playing_action_frame = skater.getActionFrame(LAND_LAYER)
713
         playing_action_frame = skater.getActionFrame(LAND_LAYER)
810
         if LAST_RIGHT == 0 or (playing_action_frame > (LAND_END - 2) and playing_action_frame < (LAND_END - 1)):
714
         if LAST_RIGHT == 0 or (playing_action_frame > (LAND_END - 2) and playing_action_frame < (LAND_END - 1)):
811
             LAST_RIGHT = 1
715
             LAST_RIGHT = 1
812
-#            skater.playAction("nreg_right", 1,10, layer=34, blendin=10, layer_weight=0, play_mode=0, speed=.5)
813
-#            deck.playAction("a_reg_right", 1,10, layer=34, blendin=10, layer_weight=0, priority=7, play_mode=0, speed=.5)
814
         own["LAST_RIGHT"] = 1 
716
         own["LAST_RIGHT"] = 1 
815
               
717
               
816
    
718
    
818
     playing = deck.isPlayingAction(40)
720
     playing = deck.isPlayingAction(40)
819
     if own['manual_v2'] == 0 and own["revert_timer"] < 1 and playing == 0:
721
     if own['manual_v2'] == 0 and own["revert_timer"] < 1 and playing == 0:
820
         own['requestAction'] = 'fak_roll'
722
         own['requestAction'] = 'fak_roll'
821
-        #skater.playAction("nfak", 1,60, layer=3, blendin=4, priority=9, layer_weight=0, play_mode=1, speed=.5)                
822
-        #deck.playAction("a_reg", 1,40, layer=3, blendin=2, priority=9, layer_weight=0, play_mode=1, speed=.5)
823
-        #trucks.playAction("a_reg", 1,40, layer=3, blendin=2, priority=9, layer_weight=0, play_mode=1, speed=.5)    
824
 def fak_stance_off():
723
 def fak_stance_off():
825
     killact(3)
724
     killact(3)
826
     
725
     
827
 def fak_stance_left_on():
726
 def fak_stance_left_on():
828
     if own['manual_v2'] == 0 and own["revert_timer"] < 1:
727
     if own['manual_v2'] == 0 and own["revert_timer"] < 1:
829
         own['requestAction'] = 'fak_turnLeft'     
728
         own['requestAction'] = 'fak_turnLeft'     
830
-        #skater.playAction("nfak_left", 10,30, layer=12, blendin=10, layer_weight=0, play_mode=1, speed=.5) 
831
-        #deck.playAction("a_reg_right", 10,30, layer=12, blendin=2, layer_weight=0, play_mode=1, speed=.5)
832
         LAST_LEFT_FAK = own["LAST_LEFT_FAK"]
729
         LAST_LEFT_FAK = own["LAST_LEFT_FAK"]
833
         playing_action_frame = skater.getActionFrame(LAND_LAYER)
730
         playing_action_frame = skater.getActionFrame(LAND_LAYER)
834
         if LAST_LEFT_FAK == 0 or (playing_action_frame > (LAND_END - 2) and playing_action_frame < (LAND_END - 1)):
731
         if LAST_LEFT_FAK == 0 or (playing_action_frame > (LAND_END - 2) and playing_action_frame < (LAND_END - 1)):
835
             LAST_LEFT_FAK = 1
732
             LAST_LEFT_FAK = 1
836
-            #skater.playAction("nfak_left", 1,10, layer=36, blendin=10, layer_weight=0, play_mode=0, speed=.5)
837
-            #deck.playAction("a_reg_right", 1,10, layer=36, blendin=10, layer_weight=0, priority=7, play_mode=0, speed=.5)
838
         own["LAST_LEFT_FAK"] = 1                      
733
         own["LAST_LEFT_FAK"] = 1                      
839
 def fak_stance_left_off():
734
 def fak_stance_left_off():
840
     killact(12)  
735
     killact(12)  
841
     killact(36)
736
     killact(36)
842
     LAST_LEFT_FAK = own["LAST_LEFT_FAK"]
737
     LAST_LEFT_FAK = own["LAST_LEFT_FAK"]
843
-    #if LAST_LEFT_FAK == 1 and rUD < .06:
844
-        #skater.playAction("nfak_left", 30,40, layer=33, blendin=10, layer_weight=0, play_mode=0, speed=2)
845
-        #deck.playAction("a_reg_left", 30,40, layer=33, blendin=10, layer_weight=0, priority=7, play_mode=0, speed=.5)
846
-        #deck.playAction("a_reg_right", 30,40, layer=501, play_mode=0, speed=.5)
847
     own["LAST_LEFT_FAK"] = 0
738
     own["LAST_LEFT_FAK"] = 0
848
     
739
     
849
 def fak_stance_right_on():
740
 def fak_stance_right_on():
850
     if own['manual_v2'] == 0 and own["revert_timer"] < 1:
741
     if own['manual_v2'] == 0 and own["revert_timer"] < 1:
851
         own['requestAction'] = 'fak_turnRight' 
742
         own['requestAction'] = 'fak_turnRight' 
852
-        #skater.playAction("nfak_right", 10,30, layer=13, blendin=10, layer_weight=0, play_mode=1, speed=.5)                
853
-        #deck.playAction("a_reg_left", 10,30, layer=13, blendin=2, layer_weight=0, play_mode=1, speed=.5)
854
         LAST_RIGHT_FAK = own["LAST_RIGHT_FAK"]
743
         LAST_RIGHT_FAK = own["LAST_RIGHT_FAK"]
855
-        #playing_action_frame = skater.getActionFrame(LAND_LAYER)  
856
-        #if LAST_RIGHT_FAK == 0 or (playing_action_frame > (LAND_END - 2) and playing_action_frame < (LAND_END - 1)):
857
-            #LAST_RIGHT_FAK = 1
858
-            #skater.playAction("nfak_right", 1,10, layer=37, blendin=10, layer_weight=0, play_mode=0, speed=.5)
859
-            #deck.playAction("a_reg_left", 1,10, layer=37, blendin=10, layer_weight=0, priority=7, play_mode=0, speed=.5)
860
         own["LAST_RIGHT_FAK"] = 1        
744
         own["LAST_RIGHT_FAK"] = 1        
861
 def fak_stance_right_off():
745
 def fak_stance_right_off():
862
     killact(13) 
746
     killact(13) 
863
     killact(37)
747
     killact(37)
864
     LAST_RIGHT_FAK = own["LAST_RIGHT_FAK"]
748
     LAST_RIGHT_FAK = own["LAST_RIGHT_FAK"]
865
-    #if LAST_RIGHT_FAK == 1 and rUD < .06:
866
-        #skater.playAction("nfak_right", 30,40, layer=33, blendin=10, layer_weight=0, play_mode=0, speed=2)
867
-        #deck.playAction("a_reg_left", 30,40, layer=33, blendin=10, layer_weight=0, priority=7, play_mode=0, speed=.5)
868
-        #deck.playAction("a_reg_right", 30,40, layer=501, play_mode=0, speed=.5)
869
     own["LAST_RIGHT_FAK"] = 0    
749
     own["LAST_RIGHT_FAK"] = 0    
870
     
750
     
871
 def reg_air_on():
751
 def reg_air_on():
872
     playing = deck.isPlayingAction(fliplay)
752
     playing = deck.isPlayingAction(fliplay)
873
     if playing == False:
753
     if playing == False:
874
         own['requestAction'] = 'reg_air'        
754
         own['requestAction'] = 'reg_air'        
875
-        #skater.playAction("reg_air", 1,60, layer=4, blendin=2, priority=6, layer_weight=0, play_mode=1, speed=.5)    
876
 
755
 
877
 def reg_air_off():
756
 def reg_air_off():
878
     killact(4)    
757
     killact(4)    
880
     flipping = skater.isPlayingAction(fliplay)
759
     flipping = skater.isPlayingAction(fliplay)
881
     if flipping == False:
760
     if flipping == False:
882
         own['requestAction'] = 'fak_air' 
761
         own['requestAction'] = 'fak_air' 
883
-        #skater.playAction("fak_air", 1,60, layer=5, blendin=2, priority=9, layer_weight=0, play_mode=1, speed=.5)      
884
   
762
   
885
 def fak_air_off():
763
 def fak_air_off():
886
     killact(5)
764
     killact(5)
911
                     reg_manual_off()                   
789
                     reg_manual_off()                   
912
                     fak_manual_off()
790
                     fak_manual_off()
913
                 reg_stance_on()
791
                 reg_stance_on()
914
-#            if own['last_manual'] == 1:
915
-#                if STANCE == 0:
916
-#                    if fak_manual == 1:
917
-#                        fak_manual = 0
918
-#                        reg_nmanual = 1
919
-#                        own['reg_nmanual'] = 1
920
-#                        print("changing manual")
921
-                                            
922
-            #if reg_manual == 1 and fak_manual == 0 and reg_nmanual == 0 and fak_nmanual == 0:
923
-            #if reg_manual == 1 and fak_manual == 0 and reg_nmanual == 0:
924
             if own['manual_v2_type'] == 'reg manual':    
792
             if own['manual_v2_type'] == 'reg manual':    
925
                 reg_manual_on()                   
793
                 reg_manual_on()                   
926
-            #elif reg_manual == 0 and fak_manual == 0 and reg_nmanual == 1 and fak_nmanual == 0:
927
             elif own['manual_v2_type'] == 'reg nose manual':    
794
             elif own['manual_v2_type'] == 'reg nose manual':    
928
                 reg_nmanual_on()
795
                 reg_nmanual_on()
929
-            #elif reg_manual == 0 and fak_manual == 1 and reg_nmanual == 0 and fak_nmanual == 0: 
930
             elif own['manual_v2_type'] == 'fak manual':
796
             elif own['manual_v2_type'] == 'fak manual':
931
-                #reg_nmanual_on()
932
                 fak_manual_on()
797
                 fak_manual_on()
933
-            #elif reg_manual == 0 and fak_manual == 0 and reg_nmanual == 0 and fak_nmanual == 1: 
934
             elif own['manual_v2_type'] == 'fak nose manual':
798
             elif own['manual_v2_type'] == 'fak nose manual':
935
-                #reg_manual_on()
936
                 fak_nmanual_on()
799
                 fak_nmanual_on()
937
         if STANCE == 1:
800
         if STANCE == 1:
938
             reg_manual = own['reg_manual']
801
             reg_manual = own['reg_manual']
940
             reg_nmanual = own['reg_nmanual']
803
             reg_nmanual = own['reg_nmanual']
941
             fak_nmanual = own["fak_nmanual"]
804
             fak_nmanual = own["fak_nmanual"]
942
             if LAST_STANCE != STANCE or LAST_GROUND != r_ground.triggered:    
805
             if LAST_STANCE != STANCE or LAST_GROUND != r_ground.triggered:    
943
-                #fak_manual_off()
944
-                #reg_manual_off()
945
-                #print("turn man off")
946
                 reg_stance_off()
806
                 reg_stance_off()
947
                 reg_air_off()
807
                 reg_air_off()
948
                 fak_air_off 
808
                 fak_air_off 
952
                     fak_manual_off()
812
                     fak_manual_off()
953
                     reg_manual_off()
813
                     reg_manual_off()
954
                 fak_stance_on()                    
814
                 fak_stance_on()                    
955
-            #if reg_manual == 0 and fak_manual == 1 and reg_nmanual == 0 and fak_nmanual == 0:
956
             if own['manual_v2_type'] == 'fak manual':
815
             if own['manual_v2_type'] == 'fak manual':
957
                 fak_manual_on()
816
                 fak_manual_on()
958
-            #elif reg_manual == 0 and fak_manual == 0 and reg_nmanual == 0 and fak_nmanual == 1:
959
             elif own['manual_v2_type'] == 'fak nose manual':
817
             elif own['manual_v2_type'] == 'fak nose manual':
960
                 fak_nmanual_on()
818
                 fak_nmanual_on()
961
-            #elif reg_manual == 1 and fak_manual == 0 and reg_nmanual == 0 and fak_nmanual == 0: 
962
             elif own['manual_v2_type'] == 'reg manual':
819
             elif own['manual_v2_type'] == 'reg manual':
963
-                #fak_nmanual_on() 
964
                 reg_manual_on()
820
                 reg_manual_on()
965
-            #elif reg_manual == 0 and fak_manual == 0 and reg_nmanual == 1 and fak_nmanual == 0: 
966
             elif own['manual_v2_type'] == 'reg nose manual':
821
             elif own['manual_v2_type'] == 'reg nose manual':
967
-                #fak_manual_on() 
968
                 reg_nmanual_on()                     
822
                 reg_nmanual_on()                     
969
-            #fak_stance_on()
970
         if own["Pump"] == False:
823
         if own["Pump"] == False:
971
             
824
             
972
             if lLR < -turnsens and STANCE == 0:            
825
             if lLR < -turnsens and STANCE == 0:            
987
                 fak_stance_right_off()                       
840
                 fak_stance_right_off()                       
988
     #air
841
     #air
989
     playing = deck.isPlayingAction(fliplay)
842
     playing = deck.isPlayingAction(fliplay)
990
-    #playing = False
991
     if r_ground.triggered == False and playing == False and flipping == False:
843
     if r_ground.triggered == False and playing == False and flipping == False:
992
         if STANCE == 0:
844
         if STANCE == 0:
993
-            #if LAST_STANCE != STANCE or r_ground.triggered:
994
             if LAST_STANCE != STANCE or LAST_GROUND != r_ground.triggered:                
845
             if LAST_STANCE != STANCE or LAST_GROUND != r_ground.triggered:                
995
                 fak_air_off()
846
                 fak_air_off()
996
                 reg_stance_off()
847
                 reg_stance_off()
999
                 reg_stance_right_off()
850
                 reg_stance_right_off()
1000
                 fak_stance_left_off()  
851
                 fak_stance_left_off()  
1001
                 fak_stance_right_off() 
852
                 fak_stance_right_off() 
1002
-#                reg_manual_off()
1003
-#                fak_manual_off()
1004
             reg_air_on()
853
             reg_air_on()
1005
         if STANCE == 1:
854
         if STANCE == 1:
1006
             if LAST_STANCE != STANCE or LAST_GROUND != r_ground.triggered:
855
             if LAST_STANCE != STANCE or LAST_GROUND != r_ground.triggered:
1011
                 reg_stance_right_off()
860
                 reg_stance_right_off()
1012
                 fak_stance_left_off()  
861
                 fak_stance_left_off()  
1013
                 fak_stance_right_off()  
862
                 fak_stance_right_off()  
1014
-#                reg_manual_off()
1015
-#                fak_manual_off()                        
1016
             fak_air_on()
863
             fak_air_on()
1017
     if grindHit == True:
864
     if grindHit == True:
1018
         reg_stance_off()
865
         reg_stance_off()
1029
     fak_manual_off()
876
     fak_manual_off()
1030
     reg_nmanual_off()
877
     reg_nmanual_off()
1031
     fak_nmanual_off()    
878
     fak_nmanual_off()    
1032
-    #grindold
1033
-    #fak_manual_off()
1034
-    #print(JUMPSTRENGTH)
1035
     cont.deactivate(wallrideconstL)
879
     cont.deactivate(wallrideconstL)
1036
     cont.deactivate(wallrideconstR)    
880
     cont.deactivate(wallrideconstR)    
1037
     if JUMPSTRENGTH != 0:
881
     if JUMPSTRENGTH != 0:
1120
         own["Q6oncd"] = 0
964
         own["Q6oncd"] = 0
1121
         own["Q7oncd"] = 0
965
         own["Q7oncd"] = 0
1122
         own["Q8oncd"] = 0         
966
         own["Q8oncd"] = 0         
1123
-#        if rot.z < .4:
1124
-#            force = [-1, linVelocity.y, linVelocity.z]
1125
-#            own.setLinearVelocity(force, local)
1126
     if own['jump_timer'] == 60:
967
     if own['jump_timer'] == 60:
1127
         own['jump_timer'] = 59
968
         own['jump_timer'] = 59
1128
 
969
 
1155
         if rot.z < PUMP_SENS and rot.z <= PUMP_SPEED_SENS:
996
         if rot.z < PUMP_SENS and rot.z <= PUMP_SPEED_SENS:
1156
             own.setLinearVelocity(force2, local)
997
             own.setLinearVelocity(force2, local)
1157
         own['requestAction'] = 'fak_pump'
998
         own['requestAction'] = 'fak_pump'
1158
-        #skater.playAction("nfak_pump.001", 1,60, layer=20, priority=8, blendin=10, play_mode=1, speed=.5)
1159
-        #skater.playAction("nopos", 1,40, layer=0, priority=7, blendin=10, play_mode=3, speed=.5)    
1160
-        if lastpump == False:        
1161
-            #skater.playAction("nfak_pump_in", 1,20, layer=350, priority=8, blendin=10, play_mode=0, speed=1)
1162
-            #cont.activate(fak_pumpin)
1163
-            pass
1164
     #switch
999
     #switch
1165
     if linVelocity.x > -MAX_VEL and linVelocity.x <= 0 and STANCE == 0 and grindHit == False:
1000
     if linVelocity.x > -MAX_VEL and linVelocity.x <= 0 and STANCE == 0 and grindHit == False:
1166
         countdown = COUNTDOWN
1001
         countdown = COUNTDOWN
1174
         if rot.z < PUMP_SENS and rot.z <= PUMP_SPEED_SENS:
1009
         if rot.z < PUMP_SENS and rot.z <= PUMP_SPEED_SENS:
1175
             own.setLinearVelocity(force2, local)
1010
             own.setLinearVelocity(force2, local)
1176
         own['requestAction'] = 'reg_pump'    
1011
         own['requestAction'] = 'reg_pump'    
1177
-        #skater.playAction("nreg_pump", 1,60, layer=21, priority=8, blendin=10, play_mode=1, speed=.5)
1178
-        
1179
-        if lastpump == False:
1180
-            #skater.playAction("nreg_pump_in", 1,20, layer=350, priority=8, blendin=10, play_mode=0, speed=1)
1181
-            #cont.activate(reg_pumpin)
1182
-            pass
1183
-    #force = [ 0, 0, -200]
1184
-    #own.applyForce(force, 0) # apply force    
1185
     own["Pump"] = True
1012
     own["Pump"] = True
1186
     own["lastPump"] = True
1013
     own["lastPump"] = True
1187
             
1014
             
1189
     if r_ground.triggered == 1:  
1016
     if r_ground.triggered == 1:  
1190
         pass      
1017
         pass      
1191
 def stop():
1018
 def stop():
1192
-    #if r_ground.triggered == 1 and STANCE == False and linVelocity.x < -.1:
1193
     if r_ground.triggered == 1 and STANCE == False:        
1019
     if r_ground.triggered == 1 and STANCE == False:        
1194
         skater.playAction("reg_stop", 1,30, layer=18, priority=59, blendin=10, play_mode=1, speed=.5)
1020
         skater.playAction("reg_stop", 1,30, layer=18, priority=59, blendin=10, play_mode=1, speed=.5)
1195
         yvel = linVelocity.x * .985
1021
         yvel = linVelocity.x * .985
1197
         own.setLinearVelocity(force, True)
1023
         own.setLinearVelocity(force, True)
1198
         if lastStop == False:
1024
         if lastStop == False:
1199
             skater.playAction("reg_stopin", 1,15, layer=61, priority=3, blendin=10, play_mode=0, speed=.5)
1025
             skater.playAction("reg_stopin", 1,15, layer=61, priority=3, blendin=10, play_mode=0, speed=.5)
1200
-    #elif r_ground.triggered == 1 and STANCE == True and linVelocity.x > .1:
1201
     elif r_ground.triggered == 1 and STANCE == True:
1026
     elif r_ground.triggered == 1 and STANCE == True:
1202
         skater.playAction("fak_stop", 1,30, layer=19, priority=7, blendin=10, play_mode=1, speed=.5)
1027
         skater.playAction("fak_stop", 1,30, layer=19, priority=7, blendin=10, play_mode=1, speed=.5)
1203
         yvel = linVelocity.x * .985
1028
         yvel = linVelocity.x * .985
1206
         if lastStop == False:
1031
         if lastStop == False:
1207
             skater.playAction("fak_stopin", 1,15, layer=62, priority=3, blendin=10, play_mode=0, speed=.5)
1032
             skater.playAction("fak_stopin", 1,15, layer=62, priority=3, blendin=10, play_mode=0, speed=.5)
1208
     own["lastStop"] = True
1033
     own["lastStop"] = True
1209
-#    if linVelocity.x < .1:
1210
-#        force = [0, 0, linVelocity.z]
1211
-#        own.setLinearVelocity(force, True)
1212
     if linVelocity.x < .05 and linVelocity.x > -.05 and own["lastStop"] == True:
1034
     if linVelocity.x < .05 and linVelocity.x > -.05 and own["lastStop"] == True:
1213
         own["lastStop"] == False   
1035
         own["lastStop"] == False   
1214
         skater.stopAction(7)
1036
         skater.stopAction(7)
1226
     if (r_ground.triggered == 1) and STANCE == False and landing == 0 and own['manual'] == 0:
1048
     if (r_ground.triggered == 1) and STANCE == False and landing == 0 and own['manual'] == 0:
1227
         if grindold == 0:
1049
         if grindold == 0:
1228
             own['requestAction'] = 'reg_opos'
1050
             own['requestAction'] = 'reg_opos'
1229
-        #if lastopos == False:
1230
-            #skater.playAction("noposin", 1,20, layer=65, priority=3, blendin=10, play_mode=0, speed=.5)
1231
-        #else:
1232
-            #skater.playAction("nopos", 1,40, layer=67, priority=7, blendin=10, play_mode=1, speed=.5)    
1233
     elif (r_ground.triggered == 1) and STANCE == True and own['manual'] == 0:
1051
     elif (r_ground.triggered == 1) and STANCE == True and own['manual'] == 0:
1234
         if grindold == 0:
1052
         if grindold == 0:
1235
             own['requestAction'] = 'fak_opos'
1053
             own['requestAction'] = 'fak_opos'
1236
-        #skater.playAction("fak_opos", 1,40, layer=68, priority=7, blendin=10, play_mode=1, speed=.5)
1237
-        #if lastopos == False:
1238
-            #skater.playAction("fak_oposin", 1,20, layer=66, priority=3, blendin=10, play_mode=0, speed=.5)
1239
     else:
1054
     else:
1240
         killact(65)
1055
         killact(65)
1241
         killact(66)
1056
         killact(66)
1249
     else:
1064
     else:
1250
         landing = 0    
1065
         landing = 0    
1251
     if (r_ground.triggered == 1) and STANCE == False and landing == 0 and own['manual'] == 0:
1066
     if (r_ground.triggered == 1) and STANCE == False and landing == 0 and own['manual'] == 0:
1252
-        #pass
1253
         if grindold == 0:
1067
         if grindold == 0:
1254
             own['requestAction'] = 'reg_nopos'
1068
             own['requestAction'] = 'reg_nopos'
1255
-#        skater.playAction("nnopos", 1,40, layer=73, priority=8, blendin=10, play_mode=1, speed=.5)
1256
-#        if lastnopos == False:
1257
-#            skater.playAction("nnoposin", 1,20, layer=71, priority=4, blendin=10, play_mode=0, speed=.5)
1258
     elif (r_ground.triggered == 1) and STANCE == True and own['manual'] == 0:
1069
     elif (r_ground.triggered == 1) and STANCE == True and own['manual'] == 0:
1259
         if grindold == 0:
1070
         if grindold == 0:
1260
             own['requestAction'] = 'fak_nopos'
1071
             own['requestAction'] = 'fak_nopos'
1261
-#        if lastnopos == False:
1262
-#            skater.playAction("fak_noposin", 1,20, layer=72, priority=4, blendin=10, play_mode=0, speed=.5)
1263
-#        else:
1264
-#            skater.playAction("fak_nopos", 1,40, layer=74, priority=8, blendin=10, play_mode=1, speed=.5)                
1265
     else:        
1072
     else:        
1266
         killact(71)
1073
         killact(71)
1267
         killact(72)
1074
         killact(72)
1662
         trucks.playAction("a_reg_fp_rback", 10,10, layer=2925, priority=8, play_mode=1, speed=.5)          
1469
         trucks.playAction("a_reg_fp_rback", 10,10, layer=2925, priority=8, play_mode=1, speed=.5)          
1663
     elif GRAB_ON == True and GRAB_PLAYED == False and r_ground.triggered == 0:
1470
     elif GRAB_ON == True and GRAB_PLAYED == False and r_ground.triggered == 0:
1664
         own['requestAction'] = 'backside_grab'        
1471
         own['requestAction'] = 'backside_grab'        
1665
-        #skater.playAction("reg_bsg2", 10,30, layer=402, priority=5, play_mode=1, speed=.5)
1666
         GRAB_PLAYED = True
1472
         GRAB_PLAYED = True
1667
         own["GRAB_PLAYED)"] = GRAB_PLAYED
1473
         own["GRAB_PLAYED)"] = GRAB_PLAYED
1668
     elif r_ground.triggered == 1:
1474
     elif r_ground.triggered == 1:
1678
         trucks.playAction("a_fak_fp_rback", 10,10, layer=2925, priority=8, play_mode=1, speed=.5)     
1484
         trucks.playAction("a_fak_fp_rback", 10,10, layer=2925, priority=8, play_mode=1, speed=.5)     
1679
     
1485
     
1680
     if GRAB_ON == True and GRAB_PLAYED == False and r_ground.triggered == 0:           
1486
     if GRAB_ON == True and GRAB_PLAYED == False and r_ground.triggered == 0:           
1681
-        #cont.activate(fak_frontsidegrab)
1682
         own['requestAction'] = 'fak_frontside_grab' 
1487
         own['requestAction'] = 'fak_frontside_grab' 
1683
-        #skater.playAction("fak_fg", 10,30, layer=403, priority=5, play_mode=1, speed=.5)
1684
         GRAB_PLAYED = True
1488
         GRAB_PLAYED = True
1685
         own["GRAB_PLAYED)"] = GRAB_PLAYED
1489
         own["GRAB_PLAYED)"] = GRAB_PLAYED
1686
-        #print("frontside_grab_on")
1687
     elif r_ground.triggered == 1:        
1490
     elif r_ground.triggered == 1:        
1688
         killact(403)
1491
         killact(403)
1689
     
1492
     
1691
     GRAB_PLAYED = own["GRAB_PLAYED"]
1494
     GRAB_PLAYED = own["GRAB_PLAYED"]
1692
     GRAB_ON = own["GRAB_ON"]
1495
     GRAB_ON = own["GRAB_ON"]
1693
     if GRAB_ON == True and GRAB_PLAYED == False and r_ground.triggered == 0:         
1496
     if GRAB_ON == True and GRAB_PLAYED == False and r_ground.triggered == 0:         
1694
-        #cont.activate(fak_backsidegrab)
1695
         own['requestAction'] = 'fak_backside_grab' 
1497
         own['requestAction'] = 'fak_backside_grab' 
1696
-        #skater.playAction("fak_bg", 10,30, layer=404, priority=5, play_mode=1, speed=.5)
1697
         GRAB_PLAYED = True
1498
         GRAB_PLAYED = True
1698
         own["GRAB_PLAYED)"] = GRAB_PLAYED
1499
         own["GRAB_PLAYED)"] = GRAB_PLAYED
1699
     elif r_ground.triggered == 1:
1500
     elif r_ground.triggered == 1:
1705
     GRAB_ON = own["GRAB_ON"]
1506
     GRAB_ON = own["GRAB_ON"]
1706
     if GRAB_ON == True and GRAB_PLAYED == False and r_ground.triggered == 0:
1507
     if GRAB_ON == True and GRAB_PLAYED == False and r_ground.triggered == 0:
1707
         own['requestAction'] = 'frontside_nose_grab' 
1508
         own['requestAction'] = 'frontside_nose_grab' 
1708
-        #cont.activate(fak_backsidegrab)
1709
-        #skater.playAction("frontside_nose_grab", 10,30, layer=400, priority=5,  blendin=5, play_mode=1, speed=.5)
1710
         GRAB_PLAYED = True
1509
         GRAB_PLAYED = True
1711
         own["GRAB_PLAYED)"] = GRAB_PLAYED
1510
         own["GRAB_PLAYED)"] = GRAB_PLAYED
1712
     elif r_ground.triggered == 1:
1511
     elif r_ground.triggered == 1:
1717
     GRAB_ON = own["GRAB_ON"]
1516
     GRAB_ON = own["GRAB_ON"]
1718
     if GRAB_ON == True and GRAB_PLAYED == False and r_ground.triggered == 0: 
1517
     if GRAB_ON == True and GRAB_PLAYED == False and r_ground.triggered == 0: 
1719
         own['requestAction'] = 'frontside_tail_grab' 
1518
         own['requestAction'] = 'frontside_tail_grab' 
1720
-        #cont.activate(fak_backsidegrab)
1721
-        #skater.playAction("frontside_tail_grab", 10,30, layer=409, priority=5,  blendin=5, play_mode=1, speed=.5)
1722
         GRAB_PLAYED = True
1519
         GRAB_PLAYED = True
1723
         own["GRAB_PLAYED)"] = GRAB_PLAYED
1520
         own["GRAB_PLAYED)"] = GRAB_PLAYED
1724
     elif r_ground.triggered == 1:
1521
     elif r_ground.triggered == 1:
1728
     GRAB_PLAYED = own["GRAB_PLAYED"]
1525
     GRAB_PLAYED = own["GRAB_PLAYED"]
1729
     GRAB_ON = own["GRAB_ON"]
1526
     GRAB_ON = own["GRAB_ON"]
1730
     #airwalk
1527
     #airwalk
1731
-    #if GRAB_ON == True and GRAB_PLAYED == False and r_ground.triggered == 0 and (aBut == True):
1732
     if GRAB_ON == True and r_ground.triggered == 0 and (aBut == True):    
1528
     if GRAB_ON == True and r_ground.triggered == 0 and (aBut == True):    
1733
         print("airwalk")
1529
         print("airwalk")
1734
         skater.playAction("reg_airwalk", 10,30, layer=405, priority=5, blendin=5, play_mode=1, speed=.5)
1530
         skater.playAction("reg_airwalk", 10,30, layer=405, priority=5, blendin=5, play_mode=1, speed=.5)
1737
     
1533
     
1738
     #norm
1534
     #norm
1739
     elif GRAB_ON == True and GRAB_PLAYED == False and r_ground.triggered == 0:   
1535
     elif GRAB_ON == True and GRAB_PLAYED == False and r_ground.triggered == 0:   
1740
-        #cont.activate(fak_backsidegrab)
1741
         own['requestAction'] = 'backside_nose_grab' 
1536
         own['requestAction'] = 'backside_nose_grab' 
1742
-        #skater.playAction("backside_nose_grab", 10,30, layer=405, priority=5, blendin=5, play_mode=1, speed=.5)
1743
         GRAB_PLAYED = True
1537
         GRAB_PLAYED = True
1744
         own["GRAB_PLAYED)"] = GRAB_PLAYED
1538
         own["GRAB_PLAYED)"] = GRAB_PLAYED
1745
     elif r_ground.triggered == 1:
1539
     elif r_ground.triggered == 1:
1750
     GRAB_ON = own["GRAB_ON"]
1544
     GRAB_ON = own["GRAB_ON"]
1751
     if GRAB_ON == True and GRAB_PLAYED == False and r_ground.triggered == 0: 
1545
     if GRAB_ON == True and GRAB_PLAYED == False and r_ground.triggered == 0: 
1752
         own['requestAction'] = 'backside_tail_grab' 
1546
         own['requestAction'] = 'backside_tail_grab' 
1753
-        #cont.activate(fak_backsidegrab)
1754
-        #skater.playAction("backside_tail_grab", 10,30, layer=411, priority=5,  blendin=5, play_mode=1, speed=.5)
1755
         GRAB_PLAYED = True
1547
         GRAB_PLAYED = True
1756
         own["GRAB_PLAYED)"] = GRAB_PLAYED
1548
         own["GRAB_PLAYED)"] = GRAB_PLAYED
1757
     elif r_ground.triggered == 1:
1549
     elif r_ground.triggered == 1:
1763
     GRAB_ON = own["GRAB_ON"]
1555
     GRAB_ON = own["GRAB_ON"]
1764
     if GRAB_ON == True and GRAB_PLAYED == False and r_ground.triggered == 0:  
1556
     if GRAB_ON == True and GRAB_PLAYED == False and r_ground.triggered == 0:  
1765
         own['requestAction'] = 'fak_frontside_nose_grab' 
1557
         own['requestAction'] = 'fak_frontside_nose_grab' 
1766
-        #cont.activate(fak_backsidegrab)
1767
-        #skater.playAction("fak_frontside_nose_grab", 10,30, layer=406, priority=5, blendin=5, play_mode=1, speed=.5)
1768
         GRAB_PLAYED = True
1558
         GRAB_PLAYED = True
1769
         own["GRAB_PLAYED)"] = GRAB_PLAYED
1559
         own["GRAB_PLAYED)"] = GRAB_PLAYED
1770
     elif r_ground.triggered == 1:
1560
     elif r_ground.triggered == 1:
1774
     GRAB_PLAYED = own["GRAB_PLAYED"]
1564
     GRAB_PLAYED = own["GRAB_PLAYED"]
1775
     GRAB_ON = own["GRAB_ON"]
1565
     GRAB_ON = own["GRAB_ON"]
1776
     if GRAB_ON == True and GRAB_PLAYED == False and r_ground.triggered == 0:           
1566
     if GRAB_ON == True and GRAB_PLAYED == False and r_ground.triggered == 0:           
1777
-        #cont.activate(fak_backsidegrab)
1778
         own['requestAction'] = 'fak_frontside_tail_grab' 
1567
         own['requestAction'] = 'fak_frontside_tail_grab' 
1779
-        #skater.playAction("fak_frontside_tail_grab", 10,30, layer=412, priority=5,  blendin=5, play_mode=1, speed=.5)
1780
         GRAB_PLAYED = True
1568
         GRAB_PLAYED = True
1781
         own["GRAB_PLAYED)"] = GRAB_PLAYED
1569
         own["GRAB_PLAYED)"] = GRAB_PLAYED
1782
     elif r_ground.triggered == 1:
1570
     elif r_ground.triggered == 1:
1786
     GRAB_PLAYED = own["GRAB_PLAYED"]
1574
     GRAB_PLAYED = own["GRAB_PLAYED"]
1787
     GRAB_ON = own["GRAB_ON"]
1575
     GRAB_ON = own["GRAB_ON"]
1788
     if GRAB_ON == True and GRAB_PLAYED == False and r_ground.triggered == 0:           
1576
     if GRAB_ON == True and GRAB_PLAYED == False and r_ground.triggered == 0:           
1789
-        #cont.activate(fak_backsidegrab)
1790
         own['requestAction'] = 'fak_backside_nose_grab' 
1577
         own['requestAction'] = 'fak_backside_nose_grab' 
1791
-        #skater.playAction("fak_backside_nose_grab", 10,30, layer=408, priority=5, blendin=5, play_mode=1, speed=.5)
1792
         GRAB_PLAYED = True
1578
         GRAB_PLAYED = True
1793
         own["GRAB_PLAYED)"] = GRAB_PLAYED
1579
         own["GRAB_PLAYED)"] = GRAB_PLAYED
1794
     elif r_ground.triggered == 1:
1580
     elif r_ground.triggered == 1:
1800
     if GRAB_ON == True and GRAB_PLAYED == False and r_ground.triggered == 0:           
1586
     if GRAB_ON == True and GRAB_PLAYED == False and r_ground.triggered == 0:           
1801
         #cont.activate(fak_backsidegrab)
1587
         #cont.activate(fak_backsidegrab)
1802
         own['requestAction'] = 'fak_backside_tail_grab' 
1588
         own['requestAction'] = 'fak_backside_tail_grab' 
1803
-        #skater.playAction("fak_backside_tail_grab", 10,30, layer=410, priority=5,  blendin=5, play_mode=1, speed=.5)
1804
         GRAB_PLAYED = True
1589
         GRAB_PLAYED = True
1805
         own["GRAB_PLAYED)"] = GRAB_PLAYED
1590
         own["GRAB_PLAYED)"] = GRAB_PLAYED
1806
     elif r_ground.triggered == 1:
1591
     elif r_ground.triggered == 1:
1846
     if r_ground.triggered == False and own['airup'] == 0:
1631
     if r_ground.triggered == False and own['airup'] == 0:
1847
          
1632
          
1848
         distance = own.getDistanceTo(gray.hitPosition)
1633
         distance = own.getDistanceTo(gray.hitPosition)
1849
-        #print(frame - lgf, "frames since grind")
1850
         since_grind_buf = 3
1634
         since_grind_buf = 3
1851
         if gray.hitObject != None and grindDar2.triggered == False and (frame - lgf) > since_grind_buf:
1635
         if gray.hitObject != None and grindDar2.triggered == False and (frame - lgf) > since_grind_buf:
1852
-        #if gray.hitObject != None and grindDar2.triggered == False:
1853
             if distance < .5:  
1636
             if distance < .5:  
1854
                 own.alignAxisToVect(gray.hitNormal, 2, .1)
1637
                 own.alignAxisToVect(gray.hitNormal, 2, .1)
1855
             elif distance >= .5 and distance < 1.75:  
1638
             elif distance >= .5 and distance < 1.75:  
1856
                 own.alignAxisToVect(gray.hitNormal, 2, .05)
1639
                 own.alignAxisToVect(gray.hitNormal, 2, .05)
1857
             elif distance >= 1.75:  
1640
             elif distance >= 1.75:  
1858
                 own.alignAxisToVect([0.0,0.0,1.0], 2, .03)
1641
                 own.alignAxisToVect([0.0,0.0,1.0], 2, .03)
1859
-#            own.alignAxisToVect(gray.hitNormal, 2, .01)
1860
         if grindDar2.triggered and (frame - lgf) > since_grind_buf:
1642
         if grindDar2.triggered and (frame - lgf) > since_grind_buf:
1861
-            #print("grindar2")  
1862
-            #own.alignAxisToVect(gray.hitNormal, 2, .075)
1863
             if distance < .5:  
1643
             if distance < .5:  
1864
                 own.alignAxisToVect(gray.hitNormal, 2, .1)
1644
                 own.alignAxisToVect(gray.hitNormal, 2, .1)
1865
             elif distance >= .5 and distance < 1.75:  
1645
             elif distance >= .5 and distance < 1.75:  
1895
         yvel = linVelocity15.x + SPEEDUP
1675
         yvel = linVelocity15.x + SPEEDUP
1896
         own['countdown'] = countdown
1676
         own['countdown'] = countdown
1897
         force = [(yvel), 0, linVelocity15.z]
1677
         force = [(yvel), 0, linVelocity15.z]
1898
-        #killall()
1899
         own.setLinearVelocity(force, local)
1678
         own.setLinearVelocity(force, local)
1900
         own['requestAction'] = 'fak_push_goof'
1679
         own['requestAction'] = 'fak_push_goof'
1901
-        #skater.playAction("fak_push_goof", 1,35, layer=100, blendin=2, play_mode=0, speed=.5)
1902
     #switch
1680
     #switch
1903
     if linVelocity15.x > -MAX_VEL and linVelocity15.x < 0 and r_ground.triggered == True and own['hippy'] == 0 and own['last_hippy'] == 0:
1681
     if linVelocity15.x > -MAX_VEL and linVelocity15.x < 0 and r_ground.triggered == True and own['hippy'] == 0 and own['last_hippy'] == 0:
1904
         countdown = COUNTDOWN
1682
         countdown = COUNTDOWN
1905
         yvel = linVelocity15.x - SPEEDUP
1683
         yvel = linVelocity15.x - SPEEDUP
1906
         own['countdown'] = countdown
1684
         own['countdown'] = countdown
1907
         force = [(yvel), 0, linVelocity15.z]
1685
         force = [(yvel), 0, linVelocity15.z]
1908
-        #killall()
1909
         own.setLinearVelocity(force, local)
1686
         own.setLinearVelocity(force, local)
1910
         own['requestAction'] = 'reg_push'
1687
         own['requestAction'] = 'reg_push'
1911
-        #skater.playAction("reg_push", 1,35, layer=101, blendin=2, play_mode=0, speed=.5)
1912
 def push_goof():
1688
 def push_goof():
1913
     linVelocity15 = own.linearVelocity
1689
     linVelocity15 = own.linearVelocity
1914
     local = True
1690
     local = True
1918
         yvel = linVelocity15.x + SPEEDUP
1694
         yvel = linVelocity15.x + SPEEDUP
1919
         own['countdown'] = countdown
1695
         own['countdown'] = countdown
1920
         force = [(yvel), 0, linVelocity15.z]
1696
         force = [(yvel), 0, linVelocity15.z]
1921
-        #killall()
1922
         own.setLinearVelocity(force, local)
1697
         own.setLinearVelocity(force, local)
1923
         own['requestAction'] = 'fak_push'
1698
         own['requestAction'] = 'fak_push'
1924
-        #skater.playAction("fak_push", 1,35, layer=100, blendin=2, play_mode=0, speed=.5)
1925
     #switch
1699
     #switch
1926
     if linVelocity15.x > -MAX_VEL and linVelocity15.x < 0 and r_ground.triggered == True and own['hippy'] == 0 and own['last_hippy'] == 0:
1700
     if linVelocity15.x > -MAX_VEL and linVelocity15.x < 0 and r_ground.triggered == True and own['hippy'] == 0 and own['last_hippy'] == 0:
1927
         countdown = COUNTDOWN
1701
         countdown = COUNTDOWN
1928
         yvel = linVelocity15.x - SPEEDUP
1702
         yvel = linVelocity15.x - SPEEDUP
1929
         own['countdown'] = countdown
1703
         own['countdown'] = countdown
1930
         force = [(yvel), 0, linVelocity15.z]
1704
         force = [(yvel), 0, linVelocity15.z]
1931
-        #killall()
1932
         own.setLinearVelocity(force, local)
1705
         own.setLinearVelocity(force, local)
1933
         own['requestAction'] = 'reg_push_goof'
1706
         own['requestAction'] = 'reg_push_goof'
1934
-        #skater.playAction("reg_push_goof", 1,35, layer=101, blendin=2, play_mode=0, speed=.5)        
1935
 def brfoot():
1707
 def brfoot():
1936
     lay = grablay + 40
1708
     lay = grablay + 40
1937
-    killact(5)
1938
-    #killall()
1939
     if STANCE == 0:
1709
     if STANCE == 0:
1940
-        skater.playAction("brfoot", 1, 30, layer=lay, blendin=2, play_mode=0, speed=CAVEMAN_SPEED)
1710
+	skater.playAction("brfoot", 1, 30, layer=lay, blendin=2, play_mode=0, speed=CAVEMAN_SPEED)
1941
         deck.playAction("a_brfoot", 1, 30, layer=lay, blendin=2, play_mode=0, speed=CAVEMAN_SPEED)
1711
         deck.playAction("a_brfoot", 1, 30, layer=lay, blendin=2, play_mode=0, speed=CAVEMAN_SPEED)
1942
         trucks.playAction("a_brfoot", 1, 30, layer=lay, blendin=2, play_mode=0, speed=CAVEMAN_SPEED)
1712
         trucks.playAction("a_brfoot", 1, 30, layer=lay, blendin=2, play_mode=0, speed=CAVEMAN_SPEED)
1943
-        #print("1: Correct")
1944
     if STANCE == 1:
1713
     if STANCE == 1:
1945
         skater.playAction("fak_brfoot", 1, 30, layer=lay, blendin=2, play_mode=0, speed=CAVEMAN_SPEED)
1714
         skater.playAction("fak_brfoot", 1, 30, layer=lay, blendin=2, play_mode=0, speed=CAVEMAN_SPEED)
1946
         deck.playAction("a_brfoot", 1, 30, layer=lay, blendin=2, play_mode=0, speed=CAVEMAN_SPEED)
1715
         deck.playAction("a_brfoot", 1, 30, layer=lay, blendin=2, play_mode=0, speed=CAVEMAN_SPEED)
1947
         trucks.playAction("a_brfoot", 1, 30, layer=lay, blendin=2, play_mode=0, speed=CAVEMAN_SPEED) 
1716
         trucks.playAction("a_brfoot", 1, 30, layer=lay, blendin=2, play_mode=0, speed=CAVEMAN_SPEED) 
1948
-        #print("2: Correct")       
1949
     jump()    
1717
     jump()    
1950
 def frfoot():
1718
 def frfoot():
1951
     lay = grablay + 40
1719
     lay = grablay + 40
1952
     killact(5)
1720
     killact(5)
1953
-    #killall()
1954
     if STANCE == 0:
1721
     if STANCE == 0:
1955
         skater.playAction("frfoot", 1, 30, layer=lay, blendin=2, play_mode=0, speed=CAVEMAN_SPEED)
1722
         skater.playAction("frfoot", 1, 30, layer=lay, blendin=2, play_mode=0, speed=CAVEMAN_SPEED)
1956
         deck.playAction("a_brfoot", 1, 30, layer=lay, blendin=2, play_mode=0, speed=CAVEMAN_SPEED)
1723
         deck.playAction("a_brfoot", 1, 30, layer=lay, blendin=2, play_mode=0, speed=CAVEMAN_SPEED)
1957
         trucks.playAction("a_brfoot", 1, 30, layer=lay, blendin=2, play_mode=0, speed=CAVEMAN_SPEED)
1724
         trucks.playAction("a_brfoot", 1, 30, layer=lay, blendin=2, play_mode=0, speed=CAVEMAN_SPEED)
1958
-        #print("frfoot")
1959
     if STANCE == 1:
1725
     if STANCE == 1:
1960
         skater.playAction("fakbfrfoot", 1, 30, layer=lay, blendin=2, play_mode=0, speed=CAVEMAN_SPEED)
1726
         skater.playAction("fakbfrfoot", 1, 30, layer=lay, blendin=2, play_mode=0, speed=CAVEMAN_SPEED)
1961
         deck.playAction("a_brfoot", 1, 30, layer=lay, blendin=2, play_mode=0, speed=CAVEMAN_SPEED)
1727
         deck.playAction("a_brfoot", 1, 30, layer=lay, blendin=2, play_mode=0, speed=CAVEMAN_SPEED)
1962
         trucks.playAction("a_brfoot", 1, 30, layer=lay, blendin=2, play_mode=0, speed=CAVEMAN_SPEED)
1728
         trucks.playAction("a_brfoot", 1, 30, layer=lay, blendin=2, play_mode=0, speed=CAVEMAN_SPEED)
1963
-        #print("!fak_frfoot.001")        
1964
     jump()          
1729
     jump()          
1965
-    #lastpush
1966
 def blfoot():
1730
 def blfoot():
1967
     lay = grablay + 40
1731
     lay = grablay + 40
1968
     killact(5)
1732
     killact(5)
1969
-    #killall()
1970
     if STANCE == 0:
1733
     if STANCE == 0:
1971
         skater.playAction("blfoot", 1, 30, layer=lay, blendin=2, play_mode=0, speed=CAVEMAN_SPEED)
1734
         skater.playAction("blfoot", 1, 30, layer=lay, blendin=2, play_mode=0, speed=CAVEMAN_SPEED)
1972
         deck.playAction("a_brfoot", 1, 30, layer=lay, blendin=2, play_mode=0, speed=CAVEMAN_SPEED)
1735
         deck.playAction("a_brfoot", 1, 30, layer=lay, blendin=2, play_mode=0, speed=CAVEMAN_SPEED)
1973
         trucks.playAction("a_brfoot", 1, 30, layer=lay, blendin=2, play_mode=0, speed=CAVEMAN_SPEED)
1736
         trucks.playAction("a_brfoot", 1, 30, layer=lay, blendin=2, play_mode=0, speed=CAVEMAN_SPEED)
1974
-        #print("blfoot")
1975
     if STANCE == 1:
1737
     if STANCE == 1:
1976
         skater.playAction("fakfrfoot.001", 1, 30, layer=lay, blendin=2, play_mode=0, speed=CAVEMAN_SPEED)
1738
         skater.playAction("fakfrfoot.001", 1, 30, layer=lay, blendin=2, play_mode=0, speed=CAVEMAN_SPEED)
1977
         deck.playAction("a_brfoot", 1, 30, layer=lay, blendin=2, play_mode=0, speed=CAVEMAN_SPEED)
1739
         deck.playAction("a_brfoot", 1, 30, layer=lay, blendin=2, play_mode=0, speed=CAVEMAN_SPEED)
1978
         trucks.playAction("a_brfoot", 1, 30, layer=lay, blendin=2, play_mode=0, speed=CAVEMAN_SPEED)
1740
         trucks.playAction("a_brfoot", 1, 30, layer=lay, blendin=2, play_mode=0, speed=CAVEMAN_SPEED)
1979
-        #print("correct fakfrfoot.001")
1980
     jump() 
1741
     jump() 
1981
 def flfoot():
1742
 def flfoot():
1982
     lay = grablay + 40
1743
     lay = grablay + 40
1983
     killact(5)
1744
     killact(5)
1984
-    #killall()
1985
     if STANCE == 0:
1745
     if STANCE == 0:
1986
         skater.playAction("flfoot", 1, 30, layer=lay, blendin=2, play_mode=0, speed=CAVEMAN_SPEED)
1746
         skater.playAction("flfoot", 1, 30, layer=lay, blendin=2, play_mode=0, speed=CAVEMAN_SPEED)
1987
         deck.playAction("a_brfoot", 1, 30, layer=lay, blendin=2, play_mode=0, speed=CAVEMAN_SPEED)
1747
         deck.playAction("a_brfoot", 1, 30, layer=lay, blendin=2, play_mode=0, speed=CAVEMAN_SPEED)
1988
         trucks.playAction("a_brfoot", 1, 30, layer=lay, blendin=2, play_mode=0, speed=CAVEMAN_SPEED)
1748
         trucks.playAction("a_brfoot", 1, 30, layer=lay, blendin=2, play_mode=0, speed=CAVEMAN_SPEED)
1989
-        #print("3: Correct")
1990
     if STANCE == 1:
1749
     if STANCE == 1:
1991
         skater.playAction("fak_flfoot", 1, 30, layer=lay, blendin=2, play_mode=0, speed=CAVEMAN_SPEED)
1750
         skater.playAction("fak_flfoot", 1, 30, layer=lay, blendin=2, play_mode=0, speed=CAVEMAN_SPEED)
1992
         deck.playAction("a_brfoot", 1, 30, layer=lay, blendin=2, play_mode=0, speed=CAVEMAN_SPEED)
1751
         deck.playAction("a_brfoot", 1, 30, layer=lay, blendin=2, play_mode=0, speed=CAVEMAN_SPEED)
1993
         trucks.playAction("a_brfoot", 1, 30, layer=lay, blendin=2, play_mode=0, speed=CAVEMAN_SPEED) 
1752
         trucks.playAction("a_brfoot", 1, 30, layer=lay, blendin=2, play_mode=0, speed=CAVEMAN_SPEED) 
1994
-        #print("4: wrong - fak_flfoot")       
1995
     jump()         
1753
     jump()         
1996
 def rollsound():
1754
 def rollsound():
1997
     #onground
1755
     #onground
2050
         if (linVelocity.x > num1 and linVelocity.x < num2) or (linVelocity.x < -num1 and linVelocity.x > -num2):   
1808
         if (linVelocity.x > num1 and linVelocity.x < num2) or (linVelocity.x < -num1 and linVelocity.x > -num2):   
2051
             own.actuators["sroll"].volume = .1
1809
             own.actuators["sroll"].volume = .1
2052
             own.actuators["sroll"].pitch = 1.1 
1810
             own.actuators["sroll"].pitch = 1.1 
2053
-        #play sound
2054
-        #own.actuators["sroll"].volume = .1
2055
         own.actuators['sroll'].mode = 2
1811
         own.actuators['sroll'].mode = 2
2056
         cont.activate(own.actuators["sroll"]) 
1812
         cont.activate(own.actuators["sroll"]) 
2057
     if grindDar == 1 or own['invert_on'] == 1:  
1813
     if grindDar == 1 or own['invert_on'] == 1:  
2069
     own['sroll_pitch'] = act.pitch    
1825
     own['sroll_pitch'] = act.pitch    
2070
         
1826
         
2071
 def wheelroll():
1827
 def wheelroll():
2072
-    #own.actuators["sroll"].volume = .1
2073
     #still
1828
     #still
2074
     if linVelocity.x <= -0.05 and linVelocity.x >= 0.05:
1829
     if linVelocity.x <= -0.05 and linVelocity.x >= 0.05:
2075
         wheel1.stopAction(2)
1830
         wheel1.stopAction(2)
2076
         wheel2.stopAction(2)
1831
         wheel2.stopAction(2)
2077
         wheel3.stopAction(2)
1832
         wheel3.stopAction(2)
2078
         wheel4.stopAction(2)
1833
         wheel4.stopAction(2)
2079
-        #cont.deactivate(own.actuators["sroll"])
2080
-        #own.actuators["sroll"].stopSound() 
2081
     #regular
1834
     #regular
2082
     if linVelocity.x > 0.05 and linVelocity.x < .5:
1835
     if linVelocity.x > 0.05 and linVelocity.x < .5:
2083
         wheel2.playAction("roll1.001", 1,20, layer=2, play_mode=0, speed=.25)
1836
         wheel2.playAction("roll1.001", 1,20, layer=2, play_mode=0, speed=.25)
2125
     num1 = .1
1878
     num1 = .1
2126
     num2 = .4
1879
     num2 = .4
2127
     speed = 20
1880
     speed = 20
2128
-#    if rot.z > num1 and rot.z < num2 and r_ground.triggered == True:
2129
-#        if STANCE == 1:
2130
-#            force = [speed, 0, 0]
2131
-#        else:
2132
-#            force = [-speed, 0, 0]
2133
-#        own.applyForce(force, True)
2134
-#    num1 = .4
2135
-#    num2 = .6
2136
-#    speed = 40
2137
-#    if rot.z > num1 and rot.z < num2 and r_ground.triggered == True:
2138
-#        if STANCE == 1:            
2139
-#            force = [speed, 0, 0]
2140
-#        else:
2141
-#            force = [-speed, 0, 0]            
2142
-#        own.applyForce(force, True)
2143
-#    num1 = .6
2144
-#    num2 = .8
2145
-#    speed = 20
2146
-#    if rot.z > num1 and rot.z < num2 and r_ground.triggered == True:
2147
-#        if STANCE == 1:
2148
-#            force = [speed, 0, 0]
2149
-#        else:
2150
-#            force = [-speed, 0, 0]
2151
-#        own.applyForce(force, True)               
2152
     
1881
     
2153
 def turn():   
1882
 def turn():   
2154
     rotamt = .02
1883
     rotamt = .02
2155
     linVelocity2 = own.getLinearVelocity(True)
1884
     linVelocity2 = own.getLinearVelocity(True)
2156
     speed = .002
1885
     speed = .002
2157
-    #force = [speed, 0, 0]
2158
-    #print(lLR)
2159
     manual = 0
1886
     manual = 0
2160
-    #if (own['fak_nmanual'] == 1 or own['reg_nmanual'] == 1 or own['fak_manual'] == 1 or own['reg_manual'] == 1): 
2161
     if own['manual_v2'] == 1:     
1887
     if own['manual_v2'] == 1:     
2162
         manual = 1       
1888
         manual = 1       
2163
         if abs(linVelocity.x) < 2:
1889
         if abs(linVelocity.x) < 2:
2229
                 own.setLinearVelocity([linVelocity2.x - speed, linVelocity2.y, linVelocity2.z], 1)
1955
                 own.setLinearVelocity([linVelocity2.x - speed, linVelocity2.y, linVelocity2.z], 1)
2230
             if STANCE == 1:   
1956
             if STANCE == 1:   
2231
                 own.setLinearVelocity([linVelocity2.x + speed, linVelocity2.y, linVelocity2.z], 1)        
1957
                 own.setLinearVelocity([linVelocity2.x + speed, linVelocity2.y, linVelocity2.z], 1)        
2232
-    #if lLR > (turnsens * 1.3 and grindHit == False):
2233
-        #skater.playAction("nreg_right", 1,20, layer=23, priority=8, blendin=10, play_mode=0, speed=.5)     
1958
+         
2234
 #air
1959
 #air
2235
     if r_ground.triggered == False and lLR > turnsens and (grindHit == False or (manual == 1 and grindHit == True)) and own["wallride"] == None:
1960
     if r_ground.triggered == False and lLR > turnsens and (grindHit == False or (manual == 1 and grindHit == True)) and own["wallride"] == None:
2236
         rotamt = .07
1961
         rotamt = .07
2244
             own.applyRotation([0,0,rotamt], 1)
1969
             own.applyRotation([0,0,rotamt], 1)
2245
         if STANCE == 1:
1970
         if STANCE == 1:
2246
             own.applyRotation([0,0,rotamt], 1)                      
1971
             own.applyRotation([0,0,rotamt], 1)                      
2247
-##### rewrite attempt     
2248
-#    rotamt = .03
2249
-#    linVelocity2 = own.getLinearVelocity(True)
2250
-#    speed = .002
2251
-#    turninc = .007 #.0025
2252
-#    turnmult = .99
2253
-#    turnmax = .043 #.043
2254
-#    rlLR = 0
2255
-#    rlLR = round(lLR, 2)
2256
-#    rlLR2 = rlLR 
2257
-#    rlLR = rlLR * 20.5
2258
-#    turninc = turninc * abs(rlLR)
2259
-#    rlLR2 = rlLR2 * 12.5
2260
-#    turnmax = turnmax * abs(rlLR2)
2261
-#    if abs(rlLR2) <= .6:
2262
-#        turnmax = turnmax *.7
2263
-#        turninc = turninc * .7
2264
-#    manual = 0
2265
-#    if (own['fak_nmanual'] == 1 or own['reg_nmanual'] == 1 or own['fak_manual'] == 1 or own['reg_manual'] == 1): 
2266
-#        manual = 1       
2267
-#        if abs(linVelocity.x) < 2:
2268
-#            speed = .005
2269
-#    jumpstance = own['jump_stance']
2270
-#    if lLR > turnsens or lLR < -turnsens:
2271
-#        own["turn"] = 1
2272
-#    else:
2273
-#        own["turn"] = 0
2274
-#    if lUD > turnsens or lUD < -turnsens:
2275
-#        own["turnud"] = 1
2276
-#    else:
2277
-#        own["turnud"] = 0 
2278
-#    newz = rot.z *2    
2279
-#    newz = (abs(newz) -2) +1  
2280
-#    newz = abs(newz)
2281
-#    newz = newz - 1
2282
-#    newz = abs(newz) +1
2283
-#    newz = round(newz,4)
2284
-#    if newz > 2: newz == 2  
2285
-#    turninc = (turninc * newz) * newz
2286
-#    turnmax = turnmax * newz          
2287
-#    if lLR > -turnsens and lLR < 0:
2288
-#        own["leftturn"] = 0
2289
-#        own['leftturnamt'] = turninc
2290
-#    if lLR < -turnsens and (grindHit == False or (manual == 1 and grindHit == True)):
2291
-#        turn = own["leftturn"]
2292
-#        leftturnamt = own['leftturnamt']
2293
-#        if turn < turnmax:
2294
-#            turn = turn + leftturnamt
2295
-#        leftturnamt = leftturnamt * turnmult   
2296
-#        rotation = [ 0.0, 0.0, (turn)]        
2297
-#        local = False # use world axis
2298
-#        own.applyRotation( rotation, local)
2299
-#        own["leftturn"] = turn 
2300
-#        own['leftturnamt'] = leftturnamt
2301
-#        if r_ground.triggered == True and abs(linVelocity2.x) < 5:
2302
-#            if STANCE == 0:   
2303
-#                own.setLinearVelocity([linVelocity2.x - speed, linVelocity2.y, linVelocity2.z], 1)
2304
-#            if STANCE == 1:   
2305
-#                own.setLinearVelocity([linVelocity2.x + speed, linVelocity2.y, linVelocity2.z], 1) 
2306
-#    #right            
2307
-#    if lLR < turnsens and lLR > 0:
2308
-#        own["rightturn"] = 0
2309
-#        own['rightturnamt'] = turninc
2310
-#    if lLR > turnsens and (grindHit == False or (manual == 1 and grindHit == True)):
2311
-#        turn = own["rightturn"]
2312
-#        rightturnamt = own['rightturnamt']
2313
-#        if turn < turnmax:
2314
-#            turn = turn + rightturnamt
2315
-#        rightturnamt = rightturnamt * turnmult 
2316
-#        rotation = [ 0.0, 0.0, (-turn)]        
2317
-#        local = False # use world axis
2318
-#        own.applyRotation( rotation, local)
2319
-#        own["rightturn"] = turn 
2320
-#        own['rightturnamt'] = rightturnamt         
2321
-#        if r_ground.triggered == True and abs(linVelocity2.x) < 5:
2322
-#            if STANCE == 0:   
2323
-#                own.setLinearVelocity([linVelocity2.x - speed, linVelocity2.y, linVelocity2.z], 1)
2324
-#            if STANCE == 1:   
2325
-#                own.setLinearVelocity([linVelocity2.x + speed, linVelocity2.y, linVelocity2.z], 1)            #air
2326
-#    if r_ground.triggered == False and lLR > turnsens and (grindHit == False or (manual == 1 and grindHit == True)):
2327
-#        rotamt = .07
2328
-#        if STANCE == 0:
2329
-#            own.applyRotation([0,0,-rotamt], 1)
2330
-#        if STANCE == 1:
2331
-#            own.applyRotation([0,0,-rotamt], 1) 
2332
-#    if r_ground.triggered == False and lLR < -turnsens and (grindHit == False or (manual == 1 and grindHit == True)):
2333
-#        rotamt = .07
2334
-#        if STANCE == 0:
2335
-#            own.applyRotation([0,0,rotamt], 1)
2336
-#        if STANCE == 1:
2337
-#            own.applyRotation([0,0,rotamt], 1)                      
1972
+
2338
 ###########
1973
 ###########
2339
 def grindsound():
1974
 def grindsound():
2340
     dropin = own['dropinTimer']
1975
     dropin = own['dropinTimer']
2341
     lif = own['last_invert_frame'] 
1976
     lif = own['last_invert_frame'] 
2342
-    #if frame - lif < 3 and invert_on == 0:
2343
     if grindSound != None and grindHit == True and own['nogrindsound'] == 0:    
1977
     if grindSound != None and grindHit == True and own['nogrindsound'] == 0:    
2344
-    #if grindHit == True and dropin == 0 and own['invert_on'] == 0 and own["LAST_GRIND"] == True and own["nogrindsound"] == 0 and (frame - lif > 13):
2345
         if abs(linVelocity.x) > abs(linVelocity.y):
1978
         if abs(linVelocity.x) > abs(linVelocity.y):
2346
             vel = linVelocity.x
1979
             vel = linVelocity.x
2347
         elif abs(linVelocity.x) < abs(linVelocity.y):
1980
         elif abs(linVelocity.x) < abs(linVelocity.y):
2466
     jumpstance = own["jump_stance"]
2099
     jumpstance = own["jump_stance"]
2467
     lif = frame - own['last_invert_frame']
2100
     lif = frame - own['last_invert_frame']
2468
     if grindHit == True and own['invert_on'] == 0 and own['footplant_on'] == False and own['manual'] == 0 and lif > 40 and own['dropinTimer'] < 30:  
2101
     if grindHit == True and own['invert_on'] == 0 and own['footplant_on'] == False and own['manual'] == 0 and lif > 40 and own['dropinTimer'] < 30:  
2469
-        #skater.stopAction(0)
2470
-        #deck.stopAction(0)
2471
-        #trucks.stopAction(0)
2472
         gblend = 1    
2102
         gblend = 1    
2473
-        #add grindstance?
2474
-        #printplaying()
2475
         if LAST_GRIND == 0:
2103
         if LAST_GRIND == 0:
2476
             gt = own['grindType']
2104
             gt = own['grindType']
2477
-            #print(gt)
2478
-            #grind in
2479
         tempstance = 3
2105
         tempstance = 3
2480
-        #print("jumpstance: ", jumpstance, "stance: ", STANCE)
2481
         if jumpstance != 3:
2106
         if jumpstance != 3:
2482
             tempstance = jumpstance
2107
             tempstance = jumpstance
2483
         else:
2108
         else:
2484
             tempstance = STANCE  
2109
             tempstance = STANCE  
2485
-        #print("tempstance: ", tempstance) 
2486
         grindpos = own['grindpos']
2110
         grindpos = own['grindpos']
2487
         if grindpos == "reg_5050" and own['grindType'] == "empty":
2111
         if grindpos == "reg_5050" and own['grindType'] == "empty":
2488
             own['grindType'] = grindpos
2112
             own['grindType'] = grindpos
2500
                     own['grindType'] = "fak_bsboard"
2124
                     own['grindType'] = "fak_bsboard"
2501
                 else:
2125
                 else:
2502
                     own['grindType'] = "reg_bsboard"        
2126
                     own['grindType'] = "reg_bsboard"        
2503
-        #if STANCE == True and LAST_GRIND == False:
2504
         if STANCE == True:    
2127
         if STANCE == True:    
2505
-            #print("jumpstance =1")
2506
             if own['grindType'] == "reg_bsboard":
2128
             if own['grindType'] == "reg_bsboard":
2507
                 own['grind_stance'] = 0
2129
                 own['grind_stance'] = 0
2508
                 own['requestAction'] = 'reg_bsboard'
2130
                 own['requestAction'] = 'reg_bsboard'
2509
-                #skater.playAction("reg_BS_Board2", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)  
2510
-                #deck.playAction("a_reg_BS_Board2", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2511
-                #trucks.playAction("a_reg_BS_Board2", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2512
-                #print("play fak reg_bsboard")  
2513
             elif own['grindType'] == "fak_bsboard":
2131
             elif own['grindType'] == "fak_bsboard":
2514
                 own['grind_stance'] = 1
2132
                 own['grind_stance'] = 1
2515
                 own['requestAction'] = 'fak_bsboard'
2133
                 own['requestAction'] = 'fak_bsboard'
2516
-                #skater.playAction("fak_BS_Board2", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)  
2517
-                #deck.playAction("a_fak_BS_Board2", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2518
-                #trucks.playAction("a_fak_BS_Board2", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2519
-                #print("play fak fak_bsboard") 
2520
             elif own['grindType'] == "reg_fsboard":
2134
             elif own['grindType'] == "reg_fsboard":
2521
                 own['grind_stance'] = 0
2135
                 own['grind_stance'] = 0
2522
                 own['requestAction'] = 'reg_fsboard'
2136
                 own['requestAction'] = 'reg_fsboard'
2523
-                #skater.playAction("reg_FS_Board", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2524
-                #deck.playAction("a_reg_FS_Board", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2525
-                #trucks.playAction("a_reg_FS_Board", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2526
-                #print("reg_FS_Board")
2527
-
2528
             elif own['grindType'] == "reg_tailg":
2137
             elif own['grindType'] == "reg_tailg":
2529
                 own['requestAction'] = 'reg_tailg'
2138
                 own['requestAction'] = 'reg_tailg'
2530
-                #skater.playAction("reg_tailg.001", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2531
-                #deck.playAction("a_reg_tailg.001", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2532
-                #trucks.playAction("a_reg_tailg.001", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5) 
2533
             elif own['grindType'] == "reg_tailgR":
2139
             elif own['grindType'] == "reg_tailgR":
2534
                 own['requestAction'] = 'reg_tailgr'
2140
                 own['requestAction'] = 'reg_tailgr'
2535
-                #skater.playAction("reg_tailgR", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2536
-                #deck.playAction("a_reg_tailgR", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2537
-                #trucks.playAction("a_reg_tailgR", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)                 
2538
             elif own['grindType'] == "reg_tailgL":
2141
             elif own['grindType'] == "reg_tailgL":
2539
                 own['requestAction'] = 'reg_tailgl'
2142
                 own['requestAction'] = 'reg_tailgl'
2540
-                #skater.playAction("reg_tailgL", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2541
-                #deck.playAction("a_reg_tailgL", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2542
-                #trucks.playAction("a_reg_tailgL", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)                     
2543
             elif own['grindType'] == "reg_noseg":
2143
             elif own['grindType'] == "reg_noseg":
2544
                 own['requestAction'] = 'reg_noseg'                
2144
                 own['requestAction'] = 'reg_noseg'                
2545
-#                skater.playAction("reg_noseg.001", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2546
-#                deck.playAction("a_reg_noseg.001", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2547
-#                trucks.playAction("a_reg_noseg.001", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2548
             elif own['grindType'] == "reg_nosegR":
2145
             elif own['grindType'] == "reg_nosegR":
2549
-                #print("playing reg_nosegR")
2550
                 own['requestAction'] = 'reg_nosegr'                
2146
                 own['requestAction'] = 'reg_nosegr'                
2551
-                #skater.playAction("reg_nosegR", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2552
-                #deck.playAction("a_reg_nosegR", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2553
-                #trucks.playAction("a_reg_nosegR", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5) 
2554
             elif own['grindType'] == "reg_nosegL":
2147
             elif own['grindType'] == "reg_nosegL":
2555
-                #print("playing reg_nosegL")
2556
                 own['requestAction'] = 'reg_nosegl'                
2148
                 own['requestAction'] = 'reg_nosegl'                
2557
-                #skater.playAction("reg_nosegL", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2558
-                #deck.playAction("a_reg_nosegL", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2559
-                #trucks.playAction("a_reg_nosegL", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)                                
2560
             elif own['grindType'] == "fak_noseg":
2149
             elif own['grindType'] == "fak_noseg":
2561
                 own['requestAction'] = 'fak_noseg'                
2150
                 own['requestAction'] = 'fak_noseg'                
2562
-                #skater.playAction("fak_noseg", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2563
-                #deck.playAction("a_fak_noseg", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2564
-                #trucks.playAction("a_fak_noseg", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2565
             elif own['grindType'] == "fak_nosegR": 
2151
             elif own['grindType'] == "fak_nosegR": 
2566
                 own['requestAction'] = 'fak_nosegr'               
2152
                 own['requestAction'] = 'fak_nosegr'               
2567
-                #skater.playAction("fak_nosegR", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2568
-                #deck.playAction("a_fak_nosegR", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2569
-                #trucks.playAction("a_fak_nosegR", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2570
             elif own['grindType'] == "fak_nosegL":
2153
             elif own['grindType'] == "fak_nosegL":
2571
                 own['requestAction'] = 'reg_nosegl'                
2154
                 own['requestAction'] = 'reg_nosegl'                
2572
-                #skater.playAction("fak_nosegL", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2573
-                #deck.playAction("a_fak_nosegL", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2574
-                #trucks.playAction("a_fak_nosegL", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)                                
2575
-                #print("fak_noseg")
2576
             elif own['grindType'] == "fak_tailg":
2155
             elif own['grindType'] == "fak_tailg":
2577
                 own['requestAction'] = 'fak_tailg' 
2156
                 own['requestAction'] = 'fak_tailg' 
2578
-                #skater.playAction("fak_tailg", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2579
-                #deck.playAction("a_fak_tailg", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2580
-                #trucks.playAction("a_fak_tailg", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2581
             elif own['grindType'] == "fak_tailgR": 
2157
             elif own['grindType'] == "fak_tailgR": 
2582
                 own['requestAction'] = 'fak_tailgr'
2158
                 own['requestAction'] = 'fak_tailgr'
2583
-                #skater.playAction("fak_tailgR", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2584
-                #deck.playAction("a_fak_tailgR", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2585
-                #trucks.playAction("a_fak_tailgR", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2586
             elif own['grindType'] == "fak_tailgL":
2159
             elif own['grindType'] == "fak_tailgL":
2587
                 own['requestAction'] = 'fak_tailgl' 
2160
                 own['requestAction'] = 'fak_tailgl' 
2588
-                #skater.playAction("fak_tailgL", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2589
-                #deck.playAction("a_fak_tailgL", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2590
-                #trucks.playAction("a_fak_tailgL", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)        
2591
             
2161
             
2592
             elif own['grindType'] == "reg_tailslide":
2162
             elif own['grindType'] == "reg_tailslide":
2593
                 own['requestAction'] = 'reg_tailslide'
2163
                 own['requestAction'] = 'reg_tailslide'
2594
                 own['grind_stance'] = 0                
2164
                 own['grind_stance'] = 0                
2595
-                #skater.playAction("fak_noses", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2596
-                #deck.playAction("a_fak_noses", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2597
-                #trucks.playAction("a_fak_noses", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2598
-                #if STANCE == True and LAST_GRIND == 0: STANCE = False
2599
-                #elif STANCE == False and LAST_GRIND == 0: STANCE = True
2600
-                #own['stance'] = STANCE                                  
2601
             elif own['grindType'] == "fak_tailslide":
2165
             elif own['grindType'] == "fak_tailslide":
2602
                 own['requestAction'] = 'fak_tailslide'
2166
                 own['requestAction'] = 'fak_tailslide'
2603
                 own['grind_stance'] = 1
2167
                 own['grind_stance'] = 1
2604
-                #skater.playAction("reg_noses", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2605
-                #deck.playAction("a_reg_noses", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2606
-                #trucks.playAction("a_reg_noses", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2607
-                #if STANCE == True and LAST_GRIND == 0: STANCE = False
2608
-                #elif STANCE == False and LAST_GRIND == 0: STANCE = True
2609
-                #own['stance'] = STANCE 
2610
             elif own['grindType'] == "reg_noseslide":
2168
             elif own['grindType'] == "reg_noseslide":
2611
                 own['requestAction'] = 'reg_noseslide'
2169
                 own['requestAction'] = 'reg_noseslide'
2612
                 own['grind_stance'] = 0
2170
                 own['grind_stance'] = 0
2613
-                #skater.playAction("fak_tails", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2614
-                #deck.playAction("a_fak_tails", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2615
-                #trucks.playAction("a_fak_tails", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2616
-                #if STANCE == True and LAST_GRIND == 0: STANCE = False
2617
-                #elif STANCE == False and LAST_GRIND == 0: STANCE = True
2618
-                #own['stance'] = STANCE  
2619
             elif own['grindType'] == "fak_noseslide":
2171
             elif own['grindType'] == "fak_noseslide":
2620
                 own['requestAction'] = 'fak_noseslide'  
2172
                 own['requestAction'] = 'fak_noseslide'  
2621
                 own['grind_stance'] = 1              
2173
                 own['grind_stance'] = 1              
2622
-                #skater.playAction("reg_tails", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2623
-                #deck.playAction("a_reg_tails", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2624
-                #trucks.playAction("a_reg_tails", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5) 
2625
-                #if STANCE == True and LAST_GRIND == 0: STANCE = False
2626
-                #elif STANCE == False and LAST_GRIND == 0: STANCE = True
2627
-                #own['stance'] = STANCE                                                             
2628
             elif own['grindType'] == "nose_stall":
2174
             elif own['grindType'] == "nose_stall":
2629
                 own['requestAction'] = 'nose_stall'
2175
                 own['requestAction'] = 'nose_stall'
2630
-                skater.playAction("fak_nose_stall", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)            
2176
+                skater.playAction("fak_nose_stall", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2631
                 deck.playAction("a_fak_nose_stall", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2177
                 deck.playAction("a_fak_nose_stall", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2632
                 trucks.playAction("a_fak_nose_stall", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)  
2178
                 trucks.playAction("a_fak_nose_stall", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)  
2633
-                #print("fak_nose_stall")
2634
             elif own['grindType'] == "tail_stall":
2179
             elif own['grindType'] == "tail_stall":
2635
                 own['requestAction'] = 'tail_stall'
2180
                 own['requestAction'] = 'tail_stall'
2636
-                skater.playAction("fak_tail_stall", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)            
2181
+                skater.playAction("fak_tail_stall", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2637
                 deck.playAction("a_fak_tail_stall", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2182
                 deck.playAction("a_fak_tail_stall", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2638
                 trucks.playAction("a_fak_tail_stall", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5) 
2183
                 trucks.playAction("a_fak_tail_stall", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5) 
2639
-                #print("fak_tail_stall")                   
2640
             else:
2184
             else:
2641
                 if STANCE == 0:
2185
                 if STANCE == 0:
2642
                     own['requestAction'] = 'reg_5050'
2186
                     own['requestAction'] = 'reg_5050'
2643
-                    #skater.playAction("reg_5050", 1,30, layer=700, blendin=gblend, priority=8, layer_weight=0, play_mode=1, speed=.5) 
2644
-                    #deck.playAction("a_reg", 1,40, layer=700, blendin=gblend, priority=9, layer_weight=0, play_mode=1, speed=.5)
2645
-                    #trucks.playAction("a_reg", 1,40, layer=700, blendin=gblend, priority=9, layer_weight=0, play_mode=1, speed=.5)
2646
                 if STANCE == 1:
2187
                 if STANCE == 1:
2647
                     own['requestAction'] = 'fak_5050'
2188
                     own['requestAction'] = 'fak_5050'
2648
-                    #skater.playAction("fak_5050", 1,30, layer=700, blendin=gblend, priority=8, layer_weight=0, play_mode=1, speed=.5) 
2649
-                    #deck.playAction("a_reg", 1,40, layer=700, blendin=gblend, priority=9, layer_weight=0, play_mode=1, speed=.5)
2650
-                    #trucks.playAction("a_reg", 1,40, layer=700, blendin=gblend, priority=9, layer_weight=0, play_mode=1, speed=.5)                        
2651
-                #print("fak_5050")
2652
             
2189
             
2653
         #elif STANCE == False and LAST_GRIND == False:
2190
         #elif STANCE == False and LAST_GRIND == False:
2654
         elif STANCE == False:
2191
         elif STANCE == False:
2655
-            #print("jumpstance =0")
2656
             if own['grindType'] == "reg_bsboard":
2192
             if own['grindType'] == "reg_bsboard":
2657
                 own['grind_stance'] = 0
2193
                 own['grind_stance'] = 0
2658
                 own['requestAction'] = 'reg_bsboard'
2194
                 own['requestAction'] = 'reg_bsboard'
2659
-                #skater.playAction("reg_BS_Board2", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)    
2660
-                #deck.playAction("a_reg_BS_Board2", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2661
-                #trucks.playAction("a_reg_BS_Board2", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2662
-                #print("play reg reg_bsboard")
2663
             elif own['grindType'] == "fak_bsboard":
2195
             elif own['grindType'] == "fak_bsboard":
2664
                 own['grind_stance'] = 1
2196
                 own['grind_stance'] = 1
2665
                 own['requestAction'] = 'fak_bsboard'
2197
                 own['requestAction'] = 'fak_bsboard'
2666
-                #skater.playAction("fak_BS_Board2", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)  
2667
-                #deck.playAction("a_fak_BS_Board2", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2668
-                #trucks.playAction("a_fak_BS_Board2", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2669
-                #print("play reg fak_bsboard")     
2670
             elif own['grindType'] == "reg_tailg":
2198
             elif own['grindType'] == "reg_tailg":
2671
                 own['grind_stance'] = 0
2199
                 own['grind_stance'] = 0
2672
                 own['requestAction'] = 'reg_tailg'
2200
                 own['requestAction'] = 'reg_tailg'
2673
-                #skater.playAction("reg_tailg.001", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2674
-                #deck.playAction("a_reg_tailg.001", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2675
-                #trucks.playAction("a_reg_tailg.001", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2676
-                # if STANCE == True and LAST_GRIND == 0: STANCE = False
2677
-                # elif STANCE == False and LAST_GRIND == 0: STANCE = True
2678
-                # own['stance'] = STANCE    
2679
             elif own['grindType'] == "reg_tailgR":
2201
             elif own['grindType'] == "reg_tailgR":
2680
                 own['requestAction'] = 'reg_tailgr'
2202
                 own['requestAction'] = 'reg_tailgr'
2681
-                #skater.playAction("reg_tailgR", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2682
-                #deck.playAction("a_reg_tailgR", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2683
-                #trucks.playAction("a_reg_tailgR", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)                 
2684
             elif own['grindType'] == "reg_tailgL":
2203
             elif own['grindType'] == "reg_tailgL":
2685
                 own['requestAction'] = 'reg_tailgl'
2204
                 own['requestAction'] = 'reg_tailgl'
2686
-                #skater.playAction("reg_tailgL", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2687
-                #deck.playAction("a_reg_tailgL", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2688
-                #trucks.playAction("a_reg_tailgL", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)                            
2689
             elif own['grindType'] == "reg_noseg":
2205
             elif own['grindType'] == "reg_noseg":
2690
                 own['requestAction'] = 'reg_noseg'
2206
                 own['requestAction'] = 'reg_noseg'
2691
-#                skater.playAction("reg_noseg.001", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2692
-#                deck.playAction("a_reg_noseg.001", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2693
-#                trucks.playAction("a_reg_noseg.001", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2694
-                #print("0 reg_noseg")
2695
             elif own['grindType'] == "reg_nosegR":
2207
             elif own['grindType'] == "reg_nosegR":
2696
-                #print("playing reg_nosegR")   
2697
                 own['requestAction'] = 'reg_nosegr'             
2208
                 own['requestAction'] = 'reg_nosegr'             
2698
-                #skater.playAction("reg_nosegR", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2699
-                #deck.playAction("a_reg_nosegR", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2700
-                #trucks.playAction("a_reg_nosegR", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2701
             elif own['grindType'] == "reg_nosegL":
2209
             elif own['grindType'] == "reg_nosegL":
2702
-                #print("playing reg_nosegL")   
2703
                 own['requestAction'] = 'reg_nosegl'             
2210
                 own['requestAction'] = 'reg_nosegl'             
2704
-                #skater.playAction("reg_nosegL", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2705
-                #deck.playAction("a_reg_nosegL", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2706
-                #trucks.playAction("a_reg_nosegL", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)                                
2707
             elif own['grindType'] == "fak_noseg":
2211
             elif own['grindType'] == "fak_noseg":
2708
                 own['requestAction'] = 'fak_noseg'
2212
                 own['requestAction'] = 'fak_noseg'
2709
-                #skater.playAction("fak_noseg", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2710
-                #deck.playAction("a_fak_noseg", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2711
-                #trucks.playAction("a_fak_noseg", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)        
2712
-                #print("0 fak_noseg")
2713
             elif own['grindType'] == "fak_nosegR": 
2213
             elif own['grindType'] == "fak_nosegR": 
2714
                 own['requestAction'] = 'fak_nosegr'               
2214
                 own['requestAction'] = 'fak_nosegr'               
2715
-                #skater.playAction("fak_nosegR", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2716
-                #deck.playAction("a_fak_nosegR", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2717
-                #trucks.playAction("a_fak_nosegR", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2718
             elif own['grindType'] == "fak_nosegL":
2215
             elif own['grindType'] == "fak_nosegL":
2719
                 own['requestAction'] = 'fak_nosegl'                
2216
                 own['requestAction'] = 'fak_nosegl'                
2720
-                #skater.playAction("fak_nosegL", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2721
-                #deck.playAction("a_fak_nosegL", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2722
-                #trucks.playAction("a_fak_nosegL", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)                
2723
             elif own['grindType'] == "fak_tailg":
2217
             elif own['grindType'] == "fak_tailg":
2724
                 own['requestAction'] = 'fak_tailg'
2218
                 own['requestAction'] = 'fak_tailg'
2725
-                own['requestAction'] = 'fak_tailg'
2726
-                own['grind_stance'] = 1
2727
-                #skater.playAction("fak_tailg", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2728
-                #deck.playAction("a_fak_tailg", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2729
-                #trucks.playAction("a_fak_tailg", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2730
             elif own['grindType'] == "fak_tailgR": 
2219
             elif own['grindType'] == "fak_tailgR": 
2731
                 own['requestAction'] = 'fak_tailgr'
2220
                 own['requestAction'] = 'fak_tailgr'
2732
-                #skater.playAction("fak_tailgR", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2733
-                #deck.playAction("a_fak_tailgR", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2734
-                #trucks.playAction("a_fak_tailgR", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2735
             elif own['grindType'] == "fak_tailgL":
2221
             elif own['grindType'] == "fak_tailgL":
2736
                 own['requestAction'] = 'fak_tailgl' 
2222
                 own['requestAction'] = 'fak_tailgl' 
2737
-                #skater.playAction("fak_tailgL", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2738
-                #deck.playAction("a_fak_tailgL", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2739
-                #trucks.playAction("a_fak_tailgL", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)                       
2740
             elif own['grindType'] == "reg_tailslide":
2223
             elif own['grindType'] == "reg_tailslide":
2741
-                own['grind_stance'] = 0           
2742
-                own['requestAction'] = 'reg_tailslide'     
2743
-                #skater.playAction("fak_noses", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2744
-                #deck.playAction("a_fak_noses", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2745
-                #trucks.playAction("a_fak_noses", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2746
-                #if STANCE == True and LAST_GRIND == 0: STANCE = False
2747
-                #elif STANCE == False and LAST_GRIND == 0: STANCE = True
2748
-                #own['stance'] = STANCE                                  
2749
             elif own['grindType'] == "fak_tailslide":
2224
             elif own['grindType'] == "fak_tailslide":
2750
                 own['grind_stance'] = 1
2225
                 own['grind_stance'] = 1
2751
                 own['requestAction'] = 'fak_tailslide'
2226
                 own['requestAction'] = 'fak_tailslide'
2752
-                #skater.playAction("reg_noses", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2753
-                #deck.playAction("a_reg_noses", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2754
-                #trucks.playAction("a_reg_noses", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2755
-                #if STANCE == True and LAST_GRIND == 0: STANCE = False
2756
-                #elif STANCE == False and LAST_GRIND == 0: STANCE = True
2757
-                #own['stance'] = STANCE 
2758
             elif own['grindType'] == "reg_noseslide":
2227
             elif own['grindType'] == "reg_noseslide":
2759
                 own['grind_stance'] = 0
2228
                 own['grind_stance'] = 0
2760
                 own['requestAction'] = 'reg_noseslide'
2229
                 own['requestAction'] = 'reg_noseslide'
2761
-                #skater.playAction("fak_tails", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2762
-                #deck.playAction("a_fak_tails", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2763
-                #trucks.playAction("a_fak_tails", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2764
-                #if STANCE == True and LAST_GRIND == 0: STANCE = False
2765
-                #elif STANCE == False and LAST_GRIND == 0: STANCE = True
2766
-                #own['stance'] = STANCE  
2767
             elif own['grindType'] == "fak_noseslide":  
2230
             elif own['grindType'] == "fak_noseslide":  
2768
                 own['grind_stance'] = 1              
2231
                 own['grind_stance'] = 1              
2769
                 own['requestAction'] = 'fak_noseslide'
2232
                 own['requestAction'] = 'fak_noseslide'
2770
-                #skater.playAction("reg_tails", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2771
-                #deck.playAction("a_reg_tails", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2772
-                #trucks.playAction("a_reg_tails", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5) 
2773
-                #if STANCE == True and LAST_GRIND == 0: STANCE = False
2774
-                #elif STANCE == False and LAST_GRIND == 0: STANCE = True
2775
-                #own['stance'] = STANCE
2776
-                 
2777
-                #if STANCE == True: STANCE = False
2778
-                #if STANCE == False: STANCE = True
2779
-                #print("change stance")
2780
-                #STANCE = own["stance"]                 
2781
             elif own['grindType'] == "nose_stall":
2233
             elif own['grindType'] == "nose_stall":
2782
                 skater.playAction("nose_stall", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5) 
2234
                 skater.playAction("nose_stall", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5) 
2783
                 deck.playAction("a_nose_stall", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2235
                 deck.playAction("a_nose_stall", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2789
                 trucks.playAction("a_reg_tail_stall", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2241
                 trucks.playAction("a_reg_tail_stall", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2790
                 #print("reg_tail_stall")                                 
2242
                 #print("reg_tail_stall")                                 
2791
             else:
2243
             else:
2792
-#                print("@playing last resort")                          
2793
                 if STANCE == 0:
2244
                 if STANCE == 0:
2794
                     own['requestAction'] = 'reg_5050'
2245
                     own['requestAction'] = 'reg_5050'
2795
-#                    skater.playAction("reg_5050", 1,30, layer=700, blendin=gblend, priority=8, layer_weight=0, play_mode=1, speed=.5) 
2796
-#                    deck.playAction("a_reg", 1,40, layer=700, blendin=gblend, priority=9, layer_weight=0, play_mode=1, speed=.5)
2797
-#                    trucks.playAction("a_reg", 1,40, layer=700, blendin=gblend, priority=9, layer_weight=0, play_mode=1, speed=.5)
2798
                 if STANCE == 1:
2246
                 if STANCE == 1:
2799
                     own['requestAction'] = 'fak_5050'
2247
                     own['requestAction'] = 'fak_5050'
2800
-#                    skater.playAction("fak_5050", 1,30, layer=700, blendin=gblend, priority=8, layer_weight=0, play_mode=1, speed=.5) 
2801
-#                    deck.playAction("a_reg", 1,40, layer=700, blendin=gblend, priority=9, layer_weight=0, play_mode=1, speed=.5)
2802
-#                    trucks.playAction("a_reg", 1,40, layer=700, blendin=gblend, priority=9, layer_weight=0, play_mode=1, speed=.5)   
2803
-            
2804
-    else:
2805
-        if own['grindCountdown'] < 16:
2806
-            grindtype("empty")
2807
-            killact(700)  
2808
-            killact(705)
2809
-            killact(706)
2810
-            killact(707)
2811
-            killact(708)
2812
-#    if LAST_GRIND ==1 and grindHit ==0:
2813
-#        #print("++++out", own['grindType'])
2814
-#        if own['grindType'] == "reg_tailslide":
2815
-#            own['grind_stance'] = 0                
2816
-#            #skater.playAction("fak_noses", 30,40, layer=200, play_mode=1, speed=.5)
2817
-#            #deck.playAction("a_fak_noses", 30,40, layer=200, play_mode=1, speed=.5)
2818
-#            #trucks.playAction("a_fak_noses", 30,40, layer=200, play_mode=1, speed=.5)
2819
-
2820
-####
2821
-#        elif own['grindType'] == "fak_tailslide":
2822
-#            own['grind_stance'] = 1
2823
-#            #skater.playAction("reg_noses", 30,40, layer=200, play_mode=1, speed=.5)
2824
-#            #deck.playAction("a_reg_noses", 30,40, layer=200, play_mode=1, speed=.5)
2825
-#            #trucks.playAction("a_reg_noses", 30,40, layer=200, play_mode=1, speed=.5)
2826
-#####
2827
-
2828
-
2829
-#        elif own['grindType'] == "reg_noseslide":
2830
-#            own['grind_stance'] = 0
2831
-#            #skater.playAction("fak_tails", 30,40, layer=200, play_mode=1, speed=.5)
2832
-#            #deck.playAction("a_fak_tails", 30,40, layer=200, play_mode=1, speed=.5)
2833
-#            #trucks.playAction("a_fak_tails", 30,40, layer=200, play_mode=1, speed=.5)                
2834
-#        elif own['grindType'] == "fak_noseslide":  
2835
-#            own['grind_stance'] = 1              
2836
-#            #skater.playAction("reg_tails", 30,40, layer=200, play_mode=1, speed=.5)
2837
-#            #deck.playAction("a_reg_tails", 30,40, layer=200, play_mode=1, speed=.5)
2838
-#            #trucks.playAction("a_reg_tails", 30,40, layer=200, play_mode=1, speed=.5)  
2839
-####******
2840
-#        elif own['grindType'] == "reg_tailg":
2841
-#            #skater.playAction("reg_tailg.001",30,40, layer=200, play_mode=1, speed=.5)
2842
-#            #deck.playAction("a_reg_tailg.001",30,40, layer=200, play_mode=1, speed=.5)
2843
-#            #trucks.playAction("a_reg_tailg.001",30,40, layer=200, play_mode=1, speed=.5) 
2844
-#        elif own['grindType'] == "reg_tailgR":
2845
-#            skater.playAction("reg_tailgR",30,40, layer=200, play_mode=1, speed=.5)
2846
-#            #deck.playAction("a_reg_tailgR",30,40, layer=200, play_mode=1, speed=.5)
2847
-#            #trucks.playAction("a_reg_tailgR",30,40, layer=200, play_mode=1, speed=.5) 
2848
-#        elif own['grindType'] == "reg_tailgL":
2849
-#            skater.playAction("reg_tailgL",30,40, layer=200, play_mode=1, speed=.5)
2850
-#            deck.playAction("a_reg_tailgL",30,40, layer=200, play_mode=1, speed=.5)
2851
-#            trucks.playAction("a_reg_tailgL",30,40, layer=200, play_mode=1, speed=.5) 
2852
-
2853
-#        elif own['grindType'] == "reg_noseg":                
2854
-#            skater.playAction("reg_noseg.001",30,40, layer=200, play_mode=1, speed=.5)
2855
-#            deck.playAction("a_reg_noseg.001",30,40, layer=200, play_mode=1, speed=.5)
2856
-#            trucks.playAction("a_reg_noseg.001",30,40, layer=200, play_mode=1, speed=.5)
2857
-#        elif own['grindType'] == "reg_nosegR":                
2858
-#            skater.playAction("reg_nosegR",30,40, layer=200, play_mode=1, speed=.5)
2859
-#            deck.playAction("a_reg_nosegR",30,40, layer=200, play_mode=1, speed=.5)
2860
-#            trucks.playAction("a_reg_nosegR",30,40, layer=200, play_mode=1, speed=.5)
2861
-#        elif own['grindType'] == "reg_nosegL":                
2862
-#            skater.playAction("reg_nosegL",30,40, layer=200, play_mode=1, speed=.5)
2863
-#            deck.playAction("a_reg_nosegL",30,40, layer=200, play_mode=1, speed=.5)
2864
-#            trucks.playAction("a_reg_nosegL",30,40, layer=200, play_mode=1, speed=.5)                        
2865
-#        elif own['grindType'] == "fak_noseg":                
2866
-#            skater.playAction("fak_noseg",30,40, layer=200, play_mode=1, speed=.5)
2867
-#            deck.playAction("a_fak_noseg",30,40, layer=200, play_mode=1, speed=.5)
2868
-#            trucks.playAction("a_fak_noseg",30,40, layer=200, play_mode=1, speed=.5)
2869
-#            #print("fak_noseg")
2870
-#        elif own['grindType'] == "fak_nosegR":                
2871
-#            skater.playAction("fak_nosegR",30,40, layer=200, play_mode=1, speed=.5)
2872
-#            deck.playAction("a_fak_nosegR",30,40, layer=200, play_mode=1, speed=.5)
2873
-#            trucks.playAction("a_fak_nosegR",30,40, layer=200, play_mode=1, speed=.5)
2874
-#        elif own['grindType'] == "fak_nosegL":                
2875
-#            skater.playAction("fak_nosegL",30,40, layer=200, play_mode=1, speed=.5)
2876
-#            deck.playAction("a_fak_nosegL",30,40, layer=200, play_mode=1, speed=.5)
2877
-#            trucks.playAction("a_fak_nosegL",30,40, layer=200, play_mode=1, speed=.5)                        
2878
-#        elif own['grindType'] == "fak_tailg": 
2879
-#            skater.playAction("fak_tailg",30,40, layer=200, play_mode=1, speed=.5)
2880
-#            deck.playAction("a_fak_tailg",30,40, layer=200, play_mode=1, speed=.5)
2881
-#            trucks.playAction("a_fak_tailg",30,40, layer=200, play_mode=1, speed=.5)
2882
-#        elif own['grindType'] == "fak_tailgR": 
2883
-#            skater.playAction("fak_tailgR",30,40, layer=200, play_mode=1, speed=.5)
2884
-#            deck.playAction("a_fak_tailgR",30,40, layer=200, play_mode=1, speed=.5)
2885
-#            trucks.playAction("a_fak_tailgR",30,40, layer=200, play_mode=1, speed=.5)
2886
-#        elif own['grindType'] == "fak_tailgL": 
2887
-#            skater.playAction("fak_tailgL",30,40, layer=200, play_mode=1, speed=.5)
2888
-#            deck.playAction("a_fak_tailgL",30,40, layer=200, play_mode=1, speed=.5)
2889
-#            trucks.playAction("a_fak_tailgL",30,40, layer=200, play_mode=1, speed=.5)         
2890
-                            
2891
-                         
2892
                   
2248
                   
2893
 def rotmult():
2249
 def rotmult():
2894
     if r_ground.triggered:
2250
     if r_ground.triggered:
2895
-        #print(linVelocity)
2896
         num = ((rot.z * -1) +1)
2251
         num = ((rot.z * -1) +1)
2897
         num = num * 100
2252
         num = num * 100
2898
-        #print(num)
2899
 
2253
 
2900
 def airup():
2254
 def airup():
2901
     if r_ground.triggered == False:
2255
     if r_ground.triggered == False:
2902
         pos = own.worldPosition
2256
         pos = own.worldPosition
2903
         pos = own.worldPosition.z
2257
         pos = own.worldPosition.z
2904
         last_pos = own['last_posz']
2258
         last_pos = own['last_posz']
2905
-        #print(last_pos - pos)
2906
         if last_pos - pos > 0:
2259
         if last_pos - pos > 0:
2907
             own['airup'] = 0
2260
             own['airup'] = 0
2908
         if last_pos - pos < 0:    
2261
         if last_pos - pos < 0:    
2919
             own['onramp'] = 0   
2272
             own['onramp'] = 0   
2920
     else:
2273
     else:
2921
         own['onramp'] = 0        
2274
         own['onramp'] = 0        
2922
-#    if r_ground.positive:
2923
-#        own['rgroundhit'] = 1        
2924
-#    else:
2925
-#        own['rgroundhit'] = 0
2926
 def grindtype(gtype):
2275
 def grindtype(gtype):
2927
     own['grindType'] = gtype
2276
     own['grindType'] = gtype
2928
     
2277
     
2929
 def transmult():
2278
 def transmult():
2930
-#    linvel = own.getLinearVelocity(True)
2931
     lastrotz = own["rotz"]
2279
     lastrotz = own["rotz"]
2932
-#    lastlinvelx = own["linvelx"]
2933
-##up
2934
-#    #reg
2935
-#    if rot.z < lastrotz and linvel.x > lastlinvelx and rot.z < .9 and rot.z > .3 and linvel.x > 0:
2936
-#        force = [ 40, 0, 0]
2937
-#        own.applyForce(force, 1) # apply force 
2938
-#    #fak
2939
-#    if rot.z < lastrotz and linvel.x > lastlinvelx and rot.z < .9 and rot.z > .3 and linvel.x < 0:
2940
-#        force = [ -40, 0, 0]
2941
-#        own.applyForce(force, 1) # apply force 
2942
-##down            
2943
-#    #reg
2944
-#    if rot.z > lastrotz and linvel.x > lastlinvelx and rot.z < .9 and rot.z > .3 and linvel.x > 0:
2945
-#        force = [ 40, 0, 0]
2946
-#        own.applyForce(force, 1) # apply force 
2947
-#    #fak
2948
-#    if rot.z > lastrotz and linvel.x > lastlinvelx and rot.z < .9 and rot.z > .3 and linvel.x < 0:
2949
-#        force = [ -40, 0, 0]
2950
-#        own.applyForce(force, 1) # apply force     
2951
     linvel = own.getLinearVelocity(True)
2280
     linvel = own.getLinearVelocity(True)
2952
     newx = (linvel.x + (linvel.x * .039))
2281
     newx = (linvel.x + (linvel.x * .039))
2953
     if linvel.x < 7 and linvel.x > -7 and rot.z > lastrotz and r_ground.triggered == 1 and rot.z > .3 and rot.z < .93:
2282
     if linvel.x < 7 and linvel.x > -7 and rot.z > lastrotz and r_ground.triggered == 1 and rot.z > .3 and rot.z < .93:
2954
         own.setLinearVelocity([newx, linvel.y, linvel.z], True)    
2283
         own.setLinearVelocity([newx, linvel.y, linvel.z], True)    
2955
-        #print("what the fuck")
2956
         
2284
         
2957
 def speedmult():
2285
 def speedmult():
2958
     vel = own.getLinearVelocity(True)
2286
     vel = own.getLinearVelocity(True)
2960
     roty = math.degrees(xyz[1])     
2288
     roty = math.degrees(xyz[1])     
2961
     roty = abs(roty) 
2289
     roty = abs(roty) 
2962
     roty = roty * .0005
2290
     roty = roty * .0005
2963
-    #print("Roty: ", roty)
2964
     
2291
     
2965
     if abs(vel.x) > 1:
2292
     if abs(vel.x) > 1:
2966
-        #mult = .0007
2967
         mult = .0015 + roty
2293
         mult = .0015 + roty
2968
     else:
2294
     else:
2969
         mult = .000       
2295
         mult = .000       
2970
     mult2 = .018
2296
     mult2 = .018
2971
     mult3 = .007
2297
     mult3 = .007
2972
-    
2973
-
2974
-    
2975
     lastrotz = own["rotz"]
2298
     lastrotz = own["rotz"]
2976
-    #print(lastrotz)     
2977
     x = vel.x * mult
2299
     x = vel.x * mult
2978
     x2 = x + vel.x
2300
     x2 = x + vel.x
2979
     x3 = vel.x * mult2
2301
     x3 = vel.x * mult2
2982
     x6 = x5 + vel.x
2304
     x6 = x5 + vel.x
2983
     if r_ground.triggered and vel.x < 4 and vel.x > -4:
2305
     if r_ground.triggered and vel.x < 4 and vel.x > -4:
2984
         own.setLinearVelocity([x2, vel.y, vel.z], True)
2306
         own.setLinearVelocity([x2, vel.y, vel.z], True)
2985
-        #pass
2986
-#    if STANCE == True:
2987
-#        if lastrotz > .9 and r_ground.triggered == True and vel.x > .05 and vel.x < 4:
2988
-#            own.setLinearVelocity([x6, vel.y, vel.z], True)  
2989
-#        if lastrotz < .9 and r_ground.triggered == True:
2990
-#            own.setLinearVelocity([x2, vel.y, vel.z], True)   
2991
-#        if lastrotz < .85 and lastrotz > .7 and r_ground.triggered == True:          
2992
-#            own.setLinearVelocity([x4, vel.y, vel.z], True)   
2993
 
2307
 
2994
 def coping():
2308
 def coping():
2995
     if invertTouch.positive:
2309
     if invertTouch.positive:
3003
         cont.deactivate(cam.actuators['replayCam'])
2317
         cont.deactivate(cam.actuators['replayCam'])
3004
         cont.activate(cam.actuators['Camera'])
2318
         cont.activate(cam.actuators['Camera'])
3005
         killall()
2319
         killall()
3006
-        #set_vibration(0, 0.0, 0.0) 
3007
         walklay = 40
2320
         walklay = 40
3008
         fliplay3 = 2060  
2321
         fliplay3 = 2060  
3009
         ob_speed = .5
2322
         ob_speed = .5
3010
-        #add dropin anim
3011
-             
3012
         if STANCE == 0:
2323
         if STANCE == 0:
3013
             skater.stopAction(fliplay)
2324
             skater.stopAction(fliplay)
3014
             deck.stopAction(fliplay)
2325
             deck.stopAction(fliplay)
3017
             if own['dropinCol'] == True:
2328
             if own['dropinCol'] == True:
3018
                 print("dropinanim")
2329
                 print("dropinanim")
3019
                 own['requestAction'] = reg_dropin
2330
                 own['requestAction'] = reg_dropin
3020
-                #skater.playAction("nreg_dropin", 60,80, layer=fliplay3, priority=0, play_mode=0, speed=.75)
3021
-                #deck.playAction("a_reg_dropin", 60,80, layer=fliplay3, priority=0, play_mode=0, speed=.75)
3022
-                #trucks.playAction("a_reg_dropin", 60,80, layer=fliplay3, priority=0, play_mode=0, speed=.75)
3023
             else:
2331
             else:
3024
                 own['requestAction'] = 'reg_onboard'    
2332
                 own['requestAction'] = 'reg_onboard'    
3025
-                #skater.playAction("reg_noffboard", 9,0, layer=40, priority=0, play_mode=0, speed=ob_speed)
3026
-                #deck.playAction("a_reg_noffboard", 9,0, layer=40, priority=0, play_mode=0, speed=ob_speed)
3027
-                #trucks.playAction("a_reg_noffboard", 9,0, layer=40, priority=0, play_mode=0, speed=ob_speed)
3028
             force = (linVelocity.x -1, linVelocity.y, linVelocity.z)
2333
             force = (linVelocity.x -1, linVelocity.y, linVelocity.z)
3029
             own.setLinearVelocity(force, True)
2334
             own.setLinearVelocity(force, True)
3030
             own['dropinTimer'] = 60
2335
             own['dropinTimer'] = 60
3031
-            #print("get on board")
3032
         if STANCE == 1:
2336
         if STANCE == 1:
3033
             skater.stopAction(fliplay)
2337
             skater.stopAction(fliplay)
3034
             deck.stopAction(fliplay)
2338
             deck.stopAction(fliplay)
3037
             if own['dropinTimer'] > 30:
2341
             if own['dropinTimer'] > 30:
3038
                 print("dropinanim2")
2342
                 print("dropinanim2")
3039
                 own['requestAction'] = fak_dropin
2343
                 own['requestAction'] = fak_dropin
3040
-                #skater.playAction("nfak_dropin", 60,80, layer=fliplay3, priority=0, play_mode=0, speed=.75)
3041
-                #deck.playAction("a_fak_dropin", 60,80, layer=fliplay3, priority=0, play_mode=0, speed=.75)
3042
-                #trucks.playAction("a_fak_dropin", 60,80, layer=fliplay3, priority=0, play_mode=0, speed=.75)
3043
             else: 
2344
             else: 
3044
                 own['requestAction'] = 'fak_onboard'
2345
                 own['requestAction'] = 'fak_onboard'
3045
-                #skater.playAction("nfak_offboard", 30,1, layer=40, priority=0, play_mode=0, speed=1.5)
3046
-                #deck.playAction("a_fak_offboard", 30,1, layer=40, priority=0, play_mode=0, speed=1.5)
3047
-                #trucks.playAction("a_fak_offboard", 30,1, layer=40, priority=0, play_mode=0, speed=1.5)
3048
             force = (linVelocity.x +1, linVelocity.y, linVelocity.z)
2346
             force = (linVelocity.x +1, linVelocity.y, linVelocity.z)
3049
             own.setLinearVelocity(force, True)
2347
             own.setLinearVelocity(force, True)
3050
             own['dropinTimer'] = 60
2348
             own['dropinTimer'] = 60
3051
-            #print("get on board")            
3052
     else:
2349
     else:
3053
         num = own['dropinTimer']
2350
         num = own['dropinTimer']
3054
         if num > 0:
2351
         if num > 0:
3055
             num = num - 1
2352
             num = num - 1
3056
         own['dropinTimer'] = num            
2353
         own['dropinTimer'] = num            
3057
-    #if own['dropinTimer'] == 1:
3058
-        #killact(6011) 
3059
-        #killact(6000)    
3060
-        #killact(6001)   
3061
-        #killact(2)  
3062
         
2354
         
3063
 def offboard():
2355
 def offboard():
3064
         wheel1.stopAction(2)
2356
         wheel1.stopAction(2)
3079
         #print(lfg, "----- this?")  
2371
         #print(lfg, "----- this?")  
3080
         if own['jump_stance'] != 3:
2372
         if own['jump_stance'] != 3:
3081
             own['jump_stance'] = 3
2373
             own['jump_stance'] = 3
3082
-    # if r_ground.positive and grindDar == 0:
3083
-    #     lfg = own["lF_ground_frame"]
3084
-    #     fn = own["framenum"]
3085
-    #     time = fn - lfg
3086
-    #     #pass
3087
-    #     print(LAST_GRIND)
3088
-    #     if time > 60:
3089
-    #         own["jump_stance"] = 3
3090
-    #     #print("resetting jumpstance")
3091
     
2374
     
3092
 def grass():
2375
 def grass():
3093
     try:
2376
     try:
3099
     except:
2382
     except:
3100
         pass    
2383
         pass    
3101
 def grindoutair():
2384
 def grindoutair():
3102
-#    if own['grind_jump'] == True: 
3103
-#        if own['grindjumpturn'] != True:
3104
-#           own['grindjumpturn'] = True 
3105
     skippy = 0
2385
     skippy = 0
3106
     linVel = own.getLinearVelocity(True)
2386
     linVel = own.getLinearVelocity(True)
3107
     if own['LAST_GRIND'] == True and grindHit == True:
2387
     if own['LAST_GRIND'] == True and grindHit == True:
3108
         own['lg_stance'] = STANCE
2388
         own['lg_stance'] = STANCE
3109
-    #else:
3110
-        #own['lg_stance'] = 0
3111
     lg_stance = own['lg_stance']
2389
     lg_stance = own['lg_stance']
3112
     own.actuators["grindoutair"].useLocalLinV = True        
2390
     own.actuators["grindoutair"].useLocalLinV = True        
3113
     if own['grindjumpturn'] == True and own['grindCountdown'] > 12 and skippy == 0:           
2391
     if own['grindjumpturn'] == True and own['grindCountdown'] > 12 and skippy == 0:           
3114
         grindoutspeed = .1  
2392
         grindoutspeed = .1  
3115
         grindoutspeed2 = 5.4  
2393
         grindoutspeed2 = 5.4  
3116
         if lLR > turnsens:
2394
         if lLR > turnsens:
3117
-            #followcam.actuators["up"].dLoc = [ 0, 0, -camspeed2]
3118
             if own['last_grindpos'] == 'reg_5050':
2395
             if own['last_grindpos'] == 'reg_5050':
3119
                 if STANCE == 0:
2396
                 if STANCE == 0:
3120
                     own.actuators["grindoutair"].linV = [0, grindoutspeed, 0]                    
2397
                     own.actuators["grindoutair"].linV = [0, grindoutspeed, 0]                    
3121
                 else:
2398
                 else:
3122
                     own.actuators["grindoutair"].linV = [0, -grindoutspeed, 0] 
2399
                     own.actuators["grindoutair"].linV = [0, -grindoutspeed, 0] 
3123
                 cont.activate(own.actuators["grindoutair"]) 
2400
                 cont.activate(own.actuators["grindoutair"]) 
3124
-                #print("50grindoutair")   
3125
 
2401
 
3126
         if lLR < -turnsens:
2402
         if lLR < -turnsens:
3127
             if own['last_grindpos'] == 'reg_5050':
2403
             if own['last_grindpos'] == 'reg_5050':
3130
                 else: 
2406
                 else: 
3131
                     own.actuators["grindoutair"].linV = [0, grindoutspeed, 0] 
2407
                     own.actuators["grindoutair"].linV = [0, grindoutspeed, 0] 
3132
                 cont.activate(own.actuators["grindoutair"])
2408
                 cont.activate(own.actuators["grindoutair"])
3133
-                #print("50grindoutair")
3134
         if lUD > turnsens:
2409
         if lUD > turnsens:
3135
             js = own['lg_stance']
2410
             js = own['lg_stance']
3136
             linvelx = own.getLinearVelocity(True)                
2411
             linvelx = own.getLinearVelocity(True)                
3138
                 if js == 1:
2413
                 if js == 1:
3139
                    own.actuators["grindoutair"].linV = [-grindoutspeed, 0, 0]
2414
                    own.actuators["grindoutair"].linV = [-grindoutspeed, 0, 0]
3140
                    cont.activate(own.actuators["grindoutair"])
2415
                    cont.activate(own.actuators["grindoutair"])
3141
-                   #print("1grindoutair*", round(linvelx.x, 2), js)
3142
                 else:
2416
                 else:
3143
                     own.actuators["grindoutair"].linV = [grindoutspeed, 0, 0] 
2417
                     own.actuators["grindoutair"].linV = [grindoutspeed, 0, 0] 
3144
                     cont.activate(own.actuators["grindoutair"]) 
2418
                     cont.activate(own.actuators["grindoutair"]) 
3145
-                    #print("2grindoutair*", round(linvelx.x, 2), js)   
3146
-                #cont.activate(own.actuators["grindoutair"])                
3147
         if lUD < -turnsens:  
2419
         if lUD < -turnsens:  
3148
             js = own['lg_stance']      
2420
             js = own['lg_stance']      
3149
             if own['last_grindpos'] == 'reg_board':    
2421
             if own['last_grindpos'] == 'reg_board':    
3150
                 if js == 0:
2422
                 if js == 0:
3151
                     own.actuators["grindoutair"].linV = [-grindoutspeed, 0, 0]
2423
                     own.actuators["grindoutair"].linV = [-grindoutspeed, 0, 0]
3152
                     cont.activate(own.actuators["grindoutair"])
2424
                     cont.activate(own.actuators["grindoutair"])
3153
-                    #print("3grindoutair broke", js)
3154
                 else:
2425
                 else:
3155
                     own.actuators["grindoutair"].linV = [grindoutspeed, 0, 0]
2426
                     own.actuators["grindoutair"].linV = [grindoutspeed, 0, 0]
3156
                     cont.activate(own.actuators["grindoutair"])
2427
                     cont.activate(own.actuators["grindoutair"])
3157
-                    #print("equal")
3158
-                    #print("4grindoutair broke", js)  
3159
                 
2428
                 
3160
     if LAST_GRIND == False and r_ground.triggered and own['grindjumpturn'] == True and own['grindCountdown'] < 1:
2429
     if LAST_GRIND == False and r_ground.triggered and own['grindjumpturn'] == True and own['grindCountdown'] < 1:
3161
         own['grindjumpturn'] = False
2430
         own['grindjumpturn'] = False
3162
-        #pass
3163
     if r_ground.triggered:
2431
     if r_ground.triggered:
3164
         own['grind_jump'] = False 
2432
         own['grind_jump'] = False 
3165
-        #own['grindjumpturn'] = False   
3166
-        #pass
3167
     
2433
     
3168
     if own['grindjumpturn'] == False or own['grindCountdown'] < 19:
2434
     if own['grindjumpturn'] == False or own['grindCountdown'] < 19:
3169
-        #pass
3170
         cont.deactivate(own.actuators["grindoutair"])
2435
         cont.deactivate(own.actuators["grindoutair"])
3171
-        #print("deactivate#################################")
3172
-#    if own['grindjumpturn'] == True and r_ground.triggered:
3173
-#        own['grindjumpturn'] = False
3174
-                      
3175
 
2436
 
3176
 def set_last_grindpos():
2437
 def set_last_grindpos():
3177
     if own['grindpos'] != None:
2438
     if own['grindpos'] != None:
3183
     if rUD > .040 and r_ground.triggered == False and GRAB_ON == False and wr == None and jump_timer < 50:
2444
     if rUD > .040 and r_ground.triggered == False and GRAB_ON == False and wr == None and jump_timer < 50:
3184
         killact(2)
2445
         killact(2)
3185
         killact(4)
2446
         killact(4)
3186
-#        if trucks.isPlayingAction(500) == False:
3187
-#            if STANCE == 0:
3188
         if STANCE == 0:
2447
         if STANCE == 0:
3189
             own['requestAction'] = 'reg_air_tail'    
2448
             own['requestAction'] = 'reg_air_tail'    
3190
-#                skater.playAction("reg_manual", 10,70, layer=50, priority=8, play_mode=1, speed=.5) 
3191
-#                deck.playAction("a_reg_manual", 10,70, layer=50, priority=8,  play_mode=1, speed=.5)
3192
-#                trucks.playAction("a_reg_manual", 10,70, layer=50, priority=8, play_mode=1, speed=.5) 
3193
         else:
2449
         else:
3194
             own['requestAction'] = 'fak_air_tail' 
2450
             own['requestAction'] = 'fak_air_tail' 
3195
-#                skater.playAction("fak_manual", 10,70, layer=50, priority=8, play_mode=1, speed=.5) 
3196
-#                deck.playAction("a_fak_manual", 10,70, layer=50, priority=8,  play_mode=1, speed=.5)
3197
-#                trucks.playAction("a_fak_manual", 10,70, layer=50, priority=8, play_mode=1, speed=.5) 
3198
     elif rUD < -.040 and r_ground.triggered == False and GRAB_ON == False and wr == None and jump_timer < 50:
2451
     elif rUD < -.040 and r_ground.triggered == False and GRAB_ON == False and wr == None and jump_timer < 50:
3199
         killact(2)
2452
         killact(2)
3200
         killact(4)
2453
         killact(4)
3201
-#        if trucks.isPlayingAction(500) == False:
3202
         if STANCE == 0:
2454
         if STANCE == 0:
3203
             own['requestAction'] = 'reg_air_nose' 
2455
             own['requestAction'] = 'reg_air_nose' 
3204
-#                skater.playAction("reg_nmanual", 10,70, layer=50, priority=8, play_mode=1, speed=.5) 
3205
-#                deck.playAction("a_fak_manual", 10,70, layer=50, priority=8,  play_mode=1, speed=.5)
3206
-#                trucks.playAction("a_fak_manual", 10,70, layer=50, priority=8, play_mode=1, speed=.5) 
3207
         else:
2456
         else:
3208
             own['requestAction'] = 'fak_air_nose' 
2457
             own['requestAction'] = 'fak_air_nose' 
3209
-#                skater.playAction("fak_nmanual", 10,70, layer=50, priority=8, play_mode=1, speed=.5) 
3210
-#                deck.playAction("a_reg_manual", 10,70, layer=50, priority=8,  play_mode=1, speed=.5)
3211
-#                trucks.playAction("a_reg_manual", 10,70, layer=50, priority=8, play_mode=1, speed=.5)                                     
3212
-    else:
3213
-        killact(50)
3214
-        #killact(50)
3215
-        #killact(50)
3216
 
2458
 
3217
 def air_turn_boost():
2459
 def air_turn_boost():
3218
     pass
2460
     pass
3226
     local = True
2468
     local = True
3227
     rot = [ 0.0, 0.0, 3.14]
2469
     rot = [ 0.0, 0.0, 3.14]
3228
     own.applyRotation(rot,local)
2470
     own.applyRotation(rot,local)
3229
-    #killall()
3230
-    #if own['reg_manual'] == 1 or own['reg_nmanual'] == 1:
3231
-    #if own['reg_manual'] == 1:
3232
     if own['manual_v2_type'] == 'reg manual': 
2471
     if own['manual_v2_type'] == 'reg manual': 
3233
         own['requestAction'] = 'reg_manual_revert_ccw'   
2472
         own['requestAction'] = 'reg_manual_revert_ccw'   
3234
-#        skater.playAction("reg_manual_revert_ccw", 70,10, layer=400, priority=8, play_mode=0, speed=4)
3235
-#        deck.playAction("a_reg_manual_revert_ccw", 70,10, layer=400, priority=1, play_mode=0, speed=4)
3236
-#        trucks.playAction("a_reg_manual_revert_ccw", 70,10, layer=400, priority=0, play_mode=0, speed=4)
3237
         print("reg")
2473
         print("reg")
3238
-    #elif own['reg_nmanual'] == 1:
3239
     elif own['manual_v2_type'] == 'reg nose manual':    
2474
     elif own['manual_v2_type'] == 'reg nose manual':    
3240
         skater.playAction("fak_manual_revert_ccw", 70,10, layer=400, priority=8, play_mode=0, speed=4)
2475
         skater.playAction("fak_manual_revert_ccw", 70,10, layer=400, priority=8, play_mode=0, speed=4)
3241
         deck.playAction("a_fak_manual_revert_ccw", 70,10, layer=400, priority=1, play_mode=0, speed=4)
2476
         deck.playAction("a_fak_manual_revert_ccw", 70,10, layer=400, priority=1, play_mode=0, speed=4)
3242
         trucks.playAction("a_fak_manual_revert_ccw", 70,10, layer=400, priority=0, play_mode=0, speed=4)
2477
         trucks.playAction("a_fak_manual_revert_ccw", 70,10, layer=400, priority=0, play_mode=0, speed=4)
3243
         print("reg nose manual revert")             
2478
         print("reg nose manual revert")             
3244
-    #elif own['fak_manual'] == 1 or own['fak_nmanual'] == 1:
3245
     elif own['manual_v2_type'] == 'fak manual':    
2479
     elif own['manual_v2_type'] == 'fak manual':    
3246
         skater.playAction("fak_manual_revert_ccw", 70,10, layer=400, priority=8, play_mode=0, speed=4)
2480
         skater.playAction("fak_manual_revert_ccw", 70,10, layer=400, priority=8, play_mode=0, speed=4)
3247
         deck.playAction("a_fak_manual_revert_ccw", 70,10, layer=400, priority=1, play_mode=0, speed=4)
2481
         deck.playAction("a_fak_manual_revert_ccw", 70,10, layer=400, priority=1, play_mode=0, speed=4)
3254
         print("fak")           
2488
         print("fak")           
3255
     else:
2489
     else:
3256
         own['requestAction'] = 'revert1'            
2490
         own['requestAction'] = 'revert1'            
3257
-#        skater.playAction("revert1", 1,10, layer=400, priority=8, play_mode=0, speed=.5)
3258
-#        deck.playAction("a_revert1", 1,10, layer=400, priority=1, play_mode=0, speed=.5)
3259
-#        trucks.playAction("a_revert1", 1,10, layer=400, priority=0, play_mode=0, speed=.5)
3260
     own['revert_timer'] = 20 
2491
     own['revert_timer'] = 20 
3261
     cont.activate(own.actuators["revertSound"])      
2492
     cont.activate(own.actuators["revertSound"])      
3262
-    #revert_on_timer 20
3263
-    #force = [0,0,0]
3264
-    #own.setLinearVelocity(force, True)    
3265
 def revert2():
2493
 def revert2():
3266
     own["Q3oncdl"] = 0
2494
     own["Q3oncdl"] = 0
3267
     own["Q4oncdl"] = 0
2495
     own["Q4oncdl"] = 0
3271
     local = True
2499
     local = True
3272
     rot = [ 0.0, 0.0, -3.14]
2500
     rot = [ 0.0, 0.0, -3.14]
3273
     own.applyRotation(rot,local)
2501
     own.applyRotation(rot,local)
3274
-    #killall()
3275
     if own['manual_v2_type'] == 'reg manual':    
2502
     if own['manual_v2_type'] == 'reg manual':    
3276
         skater.playAction("reg_manual_revert_cw", 70,10, layer=400, priority=8, play_mode=0, speed=4)
2503
         skater.playAction("reg_manual_revert_cw", 70,10, layer=400, priority=8, play_mode=0, speed=4)
3277
         deck.playAction("a_reg_manual_revert_cw", 70,10, layer=400, priority=1, play_mode=0, speed=4)
2504
         deck.playAction("a_reg_manual_revert_cw", 70,10, layer=400, priority=1, play_mode=0, speed=4)
3278
         trucks.playAction("a_reg_manual_revert_cw", 70,10, layer=400, priority=0, play_mode=0, speed=4)
2505
         trucks.playAction("a_reg_manual_revert_cw", 70,10, layer=400, priority=0, play_mode=0, speed=4)
3279
         print("reg")
2506
         print("reg")
3280
-    #elif own['reg_nmanual'] == 1:
3281
     elif own['manual_v2_type'] == 'reg nose manual':    
2507
     elif own['manual_v2_type'] == 'reg nose manual':    
3282
         skater.playAction("fak_manual_revert_cw", 70,10, layer=400, priority=8, play_mode=0, speed=4)
2508
         skater.playAction("fak_manual_revert_cw", 70,10, layer=400, priority=8, play_mode=0, speed=4)
3283
         deck.playAction("a_fak_manual_revert_cw", 70,10, layer=400, priority=1, play_mode=0, speed=4)
2509
         deck.playAction("a_fak_manual_revert_cw", 70,10, layer=400, priority=1, play_mode=0, speed=4)
3284
         trucks.playAction("a_fak_manual_revert_cw", 70,10, layer=400, priority=0, play_mode=0, speed=4)
2510
         trucks.playAction("a_fak_manual_revert_cw", 70,10, layer=400, priority=0, play_mode=0, speed=4)
3285
         print("reg nose manual revert")             
2511
         print("reg nose manual revert")             
3286
-    #elif own['fak_manual'] == 1 or own['fak_nmanual'] == 1:
3287
     elif own['manual_v2_type'] == 'fak manual':    
2512
     elif own['manual_v2_type'] == 'fak manual':    
3288
         skater.playAction("fak_manual_revert_cw", 70,10, layer=400, priority=8, play_mode=0, speed=4)
2513
         skater.playAction("fak_manual_revert_cw", 70,10, layer=400, priority=8, play_mode=0, speed=4)
3289
         deck.playAction("a_fak_manual_revert_cw", 70,10, layer=400, priority=1, play_mode=0, speed=4)
2514
         deck.playAction("a_fak_manual_revert_cw", 70,10, layer=400, priority=1, play_mode=0, speed=4)
3296
         print("fak")   
2521
         print("fak")   
3297
     else:     
2522
     else:     
3298
         own['requestAction'] = 'revert2'       
2523
         own['requestAction'] = 'revert2'       
3299
-#        skater.playAction("revert2", 1,10, layer=400, priority=8, play_mode=0, speed=.5)
3300
-#        deck.playAction("a_revert2", 1,10, layer=400, priority=1, play_mode=0, speed=.5)
3301
-#        trucks.playAction("a_revert2", 1,10, layer=400, priority=0, play_mode=0, speed=.5)
3302
     own['revert_timer'] = 20 
2524
     own['revert_timer'] = 20 
3303
     cont.activate(own.actuators["revertSound"])         
2525
     cont.activate(own.actuators["revertSound"])         
3304
 def revert3():
2526
 def revert3():
3311
     rot = [ 0.0, 0.0, 3.14]
2533
     rot = [ 0.0, 0.0, 3.14]
3312
     own.applyRotation(rot,local) 
2534
     own.applyRotation(rot,local) 
3313
     print("real revert 3")  
2535
     print("real revert 3")  
3314
-    #killall()
3315
     if own['manual_v2_type'] == 'reg manual':    
2536
     if own['manual_v2_type'] == 'reg manual':    
3316
         skater.playAction("reg_manual_revert_ccw", 70,10, layer=400, priority=8, play_mode=0, speed=4)
2537
         skater.playAction("reg_manual_revert_ccw", 70,10, layer=400, priority=8, play_mode=0, speed=4)
3317
         deck.playAction("a_reg_manual_revert_ccw", 70,10, layer=400, priority=1, play_mode=0, speed=4)
2538
         deck.playAction("a_reg_manual_revert_ccw", 70,10, layer=400, priority=1, play_mode=0, speed=4)
3318
         trucks.playAction("a_reg_manual_revert_ccw", 70,10, layer=400, priority=0, play_mode=0, speed=4)
2539
         trucks.playAction("a_reg_manual_revert_ccw", 70,10, layer=400, priority=0, play_mode=0, speed=4)
3319
         print("reg")
2540
         print("reg")
3320
-    #elif own['reg_nmanual'] == 1:
3321
     elif own['manual_v2_type'] == 'reg nose manual':    
2541
     elif own['manual_v2_type'] == 'reg nose manual':    
3322
         skater.playAction("fak_manual_revert_ccw", 70,10, layer=400, priority=8, play_mode=0, speed=4)
2542
         skater.playAction("fak_manual_revert_ccw", 70,10, layer=400, priority=8, play_mode=0, speed=4)
3323
         deck.playAction("a_fak_manual_revert_ccw", 70,10, layer=400, priority=1, play_mode=0, speed=4)
2543
         deck.playAction("a_fak_manual_revert_ccw", 70,10, layer=400, priority=1, play_mode=0, speed=4)
3324
         trucks.playAction("a_fak_manual_revert_ccw", 70,10, layer=400, priority=0, play_mode=0, speed=4)
2544
         trucks.playAction("a_fak_manual_revert_ccw", 70,10, layer=400, priority=0, play_mode=0, speed=4)
3325
         print("reg nose manual revert")             
2545
         print("reg nose manual revert")             
3326
-    #elif own['fak_manual'] == 1 or own['fak_nmanual'] == 1:
3327
     elif own['manual_v2_type'] == 'fak manual':    
2546
     elif own['manual_v2_type'] == 'fak manual':    
3328
         skater.playAction("fak_manual_revert_ccw", 70,10, layer=400, priority=8, play_mode=0, speed=4)
2547
         skater.playAction("fak_manual_revert_ccw", 70,10, layer=400, priority=8, play_mode=0, speed=4)
3329
         deck.playAction("a_fak_manual_revert_ccw", 70,10, layer=400, priority=1, play_mode=0, speed=4)
2548
         deck.playAction("a_fak_manual_revert_ccw", 70,10, layer=400, priority=1, play_mode=0, speed=4)
3336
         print("fak")   
2555
         print("fak")   
3337
     else:       
2556
     else:       
3338
         own['requestAction'] = 'revert3' 
2557
         own['requestAction'] = 'revert3' 
3339
-#        skater.playAction("revert1", 1,10, layer=400, priority=8, play_mode=0, speed=.5)
3340
-#        deck.playAction("a_revert1", 1,10, layer=400, priority=1, play_mode=0, speed=.5)
3341
-#        trucks.playAction("a_revert1", 1,10, layer=400, priority=0, play_mode=0, speed=.5)
3342
     own['revert_timer'] = 20 
2558
     own['revert_timer'] = 20 
3343
     cont.activate(own.actuators["revertSound"])      
2559
     cont.activate(own.actuators["revertSound"])      
3344
 def revert4():
2560
 def revert4():
3350
     local = True
2566
     local = True
3351
     rot = [ 0.0, 0.0, 3.14]
2567
     rot = [ 0.0, 0.0, 3.14]
3352
     own.applyRotation(rot,local)  
2568
     own.applyRotation(rot,local)  
3353
-    #killall()
3354
     if own['manual_v2_type'] == 'reg manual':    
2569
     if own['manual_v2_type'] == 'reg manual':    
3355
         skater.playAction("reg_manual_revert_cw", 70,10, layer=400, priority=8, play_mode=0, speed=4)
2570
         skater.playAction("reg_manual_revert_cw", 70,10, layer=400, priority=8, play_mode=0, speed=4)
3356
         deck.playAction("a_reg_manual_revert_cw", 70,10, layer=400, priority=1, play_mode=0, speed=4)
2571
         deck.playAction("a_reg_manual_revert_cw", 70,10, layer=400, priority=1, play_mode=0, speed=4)
3376
     else:
2591
     else:
3377
         own['requestAction'] = 'revert4'
2592
         own['requestAction'] = 'revert4'
3378
         print("normal revert")        
2593
         print("normal revert")        
3379
-#        skater.playAction("revert2", 1,10, layer=400, priority=8, play_mode=0, speed=.5)
3380
-#        deck.playAction("a_revert2", 1,10, layer=400, priority=1, play_mode=0, speed=.5)
3381
-#        trucks.playAction("a_revert2", 1,10, layer=400, priority=0, play_mode=0, speed=.5)
3382
     own['revert_timer'] = 20 
2594
     own['revert_timer'] = 20 
3383
     cont.activate(own.actuators["revertSound"])       
2595
     cont.activate(own.actuators["revertSound"])       
3384
 
2596
 
3390
         own['powerslide_on'] = 1
2602
         own['powerslide_on'] = 1
3391
         if STANCE == 0:
2603
         if STANCE == 0:
3392
             own['powerslide'] = "reg2"
2604
             own['powerslide'] = "reg2"
3393
-            #skater.playAction("nreg_powerslide", 20,80, layer=400, priority=8, play_mode=1, speed=.5)
3394
-            #deck.playAction("a_reg_powerslide", 20,80, layer=400, priority=1, play_mode=1, speed=.5)
3395
-            #trucks.playAction("a_reg_powerslide", 20,80, layer=400, priority=0, play_mode=1, speed=.5)        
3396
         if STANCE == 1:
2605
         if STANCE == 1:
3397
             own['powerslide'] = "fak1" 
2606
             own['powerslide'] = "fak1" 
3398
-            #skater.playAction("nfak_powerslide", 20,80, layer=400, priority=8, play_mode=1, speed=.5)
3399
-            #deck.playAction("a_fak_powerslide_d", 20,80, layer=400, priority=1, play_mode=1, speed=.5)
3400
-            #trucks.playAction("a_fak_powerslide_t", 20,80, layer=400, priority=0, play_mode=1, speed=.5)             
3401
         linVelocity4 = own.getLinearVelocity(True)    
2607
         linVelocity4 = own.getLinearVelocity(True)    
3402
         if own['powerslide_counter'] > 15 and own['powerslide_counter'] < 18:         
2608
         if own['powerslide_counter'] > 15 and own['powerslide_counter'] < 18:         
3403
             newx = linVelocity4.x * .9 
2609
             newx = linVelocity4.x * .9 
3413
         own['powerslide_on'] = 1
2619
         own['powerslide_on'] = 1
3414
         if STANCE == 0:
2620
         if STANCE == 0:
3415
             own['powerslide'] = "reg1"
2621
             own['powerslide'] = "reg1"
3416
-            #skater.playAction("nreg_powerslide2", 20,80, layer=400, priority=8, play_mode=1, speed=.5)
3417
-            #deck.playAction("a_reg_powerslide2_d", 20,80, layer=400, priority=1, play_mode=1, speed=.5)
3418
-            #trucks.playAction("a_reg_powerslide2_t", 20,80, layer=400, priority=0, play_mode=1, speed=.5)        
3419
         if STANCE == 1:
2622
         if STANCE == 1:
3420
             own['powerslide'] = "fak2" 
2623
             own['powerslide'] = "fak2" 
3421
-            #skater.playAction("nfak_powerslide2", 20,80, layer=400, priority=8, play_mode=1, speed=.5)
3422
-            #deck.playAction("a_fak_powerslide2_d", 20,80, layer=400, priority=1, play_mode=1, speed=.5)
3423
-            #trucks.playAction("a_fak_powerslide2_t", 20,80, layer=400, priority=0, play_mode=1, speed=.5)             
3424
         linVelocity4 = own.getLinearVelocity(True)    
2624
         linVelocity4 = own.getLinearVelocity(True)    
3425
         if own['powerslide_counter'] > 15 and own['powerslide_counter'] < 18:         
2625
         if own['powerslide_counter'] > 15 and own['powerslide_counter'] < 18:         
3426
             newx = linVelocity4.x * .9 
2626
             newx = linVelocity4.x * .9 
3440
             own['requestAction'] = 'reg_powerslide'
2640
             own['requestAction'] = 'reg_powerslide'
3441
         if own['powerslide'] == "fak2":                               
2641
         if own['powerslide'] == "fak2":                               
3442
             own['requestAction'] = 'fak_powerslide'                                    
2642
             own['requestAction'] = 'fak_powerslide'                                    
3443
-    #if own['powerslide_on'] == 1 and own['last_powerslide_on'] == 0:
3444
-        #print("power_on")
3445
-        #if own['powerslide'] == "reg2":
3446
-            
3447
-#            skater.playAction("nreg_powerslide", 0,20, layer=401, priority=8, play_mode=0, speed=1.5)
3448
-#            deck.playAction("a_reg_powerslide", 0,20, layer=401, priority=1, play_mode=0, speed=1.5)
3449
-#            trucks.playAction("a_reg_powerslide", 0,20, layer=401, priority=0, play_mode=0, speed=1.5) 
3450
-#        if own['powerslide'] == "fak1":
3451
-#            own['requestAction'] = 'fak_powerslide'
3452
-#            skater.playAction("nfak_powerslide", 0,20, layer=401, priority=8, play_mode=0, speed=1.5)
3453
-#            deck.playAction("a_fak_powerslide_d", 0,20, layer=401, priority=1, play_mode=0, speed=1.5)
3454
-#            trucks.playAction("a_fak_powerslide_t", 0,20, layer=401, priority=0, play_mode=0, speed=1.5)
3455
-            
3456
-#        if own['powerslide'] == "reg1":
3457
-#            #own['requestAction'] = 'reg_fs_powerslide'
3458
-#            skater.playAction("nreg_powerslide2", 0,20, layer=401, priority=8, play_mode=0, speed=1.5)
3459
-#            deck.playAction("a_reg_powerslide2_d", 0,20, layer=401, priority=1, play_mode=0, speed=1.5)
3460
-#            trucks.playAction("a_reg_powerslide2_t", 0,20, layer=401, priority=0, play_mode=0, speed=1.5) 
3461
-#        if own['powerslide'] == "fak2":
3462
-#            #own['requestAction'] = 'fak_fs_powerslide'
3463
-#            skater.playAction("nfak_powerslide2", 0,20, layer=401, priority=8, play_mode=0, speed=1.5)
3464
-#            deck.playAction("a_fak_powerslide2_d", 0,20, layer=401, priority=1, play_mode=0, speed=1.5)
3465
-#            trucks.playAction("a_fak_powerslide2_t", 0,20, layer=401, priority=0, play_mode=0, speed=1.5)            
3466
-            
3467
-####powerslide off#####                                 
3468
-#    if own['powerslide_on'] == 0 and own['last_powerslide_on'] == 1:
3469
-#        killact(400)
3470
-#        killact(401)
3471
-
3472
-#        linVelocity4 = own.getLinearVelocity(True)    
3473
-#        newx = linVelocity4.x * .9       
3474
-#        force = [newx, linVelocity4.y, linVelocity4.z]
3475
-#        own.setLinearVelocity(force, True) 
3476
-#                
3477
-#        if own['powerslide'] == "reg2":   
3478
-#            skater.playAction("nreg_powerslide", 20,0, layer=4002, priority=8, play_mode=0, speed=1.5)
3479
-#            deck.playAction("a_reg_powerslide", 20,0, layer=4002, priority=1, play_mode=0, speed=1.5)
3480
-#            trucks.playAction("a_reg_powerslide", 20,0, layer=4002, priority=0, play_mode=0, speed=1.5)
3481
-#        if own['powerslide'] == "fak1":   
3482
-#            skater.playAction("nfak_powerslide", 20,0, layer=4002, priority=8, play_mode=0, speed=1.5)
3483
-#            deck.playAction("a_fak_powerslide_d", 20,0, layer=4002, priority=1, play_mode=0, speed=1.5)
3484
-#            trucks.playAction("a_fak_powerslide_t", 20,0, layer=4002, priority=0, play_mode=0, speed=1.5)     
3485
-#            
3486
-#        if own['powerslide'] == "reg1":   
3487
-#            skater.playAction("nreg_powerslide2", 20,0, layer=4002, priority=8, play_mode=0, speed=1.5)
3488
-#            deck.playAction("a_reg_powerslide2_d", 20,0, layer=4002, priority=1, play_mode=0, speed=1.5)
3489
-#            trucks.playAction("a_reg_powerslide2_t", 20,0, layer=4002, priority=0, play_mode=0, speed=1.5)
3490
-#        if own['powerslide'] == "fak2":   
3491
-#            skater.playAction("nfak_powerslide2", 20,0, layer=4002, priority=8, play_mode=0, speed=1.5)
3492
-#            deck.playAction("a_fak_powerslide2_d", 20,0, layer=4002, priority=1, play_mode=0, speed=1.5)
3493
-#            trucks.playAction("a_fak_powerslide2_t", 20,0, layer=4002, priority=0, play_mode=0, speed=1.5)                                
3494
-#        #print("old power") 
3495
 def powerslide_sound():
2643
 def powerslide_sound():
3496
     sact = own.actuators["powerslide_sound"]
2644
     sact = own.actuators["powerslide_sound"]
3497
     if own['powerslide_on'] == 1:
2645
     if own['powerslide_on'] == 1:
3498
         sact = own.actuators["powerslide_sound"]
2646
         sact = own.actuators["powerslide_sound"]
3499
         sact.volume = .2
2647
         sact.volume = .2
3500
         new_pitch = (abs(linVelocity.x) / 3)
2648
         new_pitch = (abs(linVelocity.x) / 3)
3501
-        #new_pitch = new_pitch * 1.1
3502
-        #print("np=", new_pitch)
3503
         if new_pitch < 1.1 and new_pitch > .5: 
2649
         if new_pitch < 1.1 and new_pitch > .5: 
3504
             sact.pitch = new_pitch
2650
             sact.pitch = new_pitch
3505
         elif new_pitch <= .5:
2651
         elif new_pitch <= .5:
3517
     except:
2663
     except:
3518
         pass 
2664
         pass 
3519
     psxvel = abs(linVelocity.x)
2665
     psxvel = abs(linVelocity.x)
3520
-    #xvelsens = .1   
3521
     if (lUD > .08 or lUD < -.08) and own['manual_v2'] == False and r_ground.triggered == True and psxvel > .1:
2666
     if (lUD > .08 or lUD < -.08) and own['manual_v2'] == False and r_ground.triggered == True and psxvel > .1:
3522
         if lUD > .08:
2667
         if lUD > .08:
3523
             powerslide()
2668
             powerslide()
3536
         reg_nmanual_off()                
2681
         reg_nmanual_off()                
3537
 
2682
 
3538
 def killopos():
2683
 def killopos():
3539
-    if q5oncd < 1 and q1oncd <1:
3540
-        killact(65)
3541
-        killact(66)
3542
-        killact(67)
3543
-        killact(68)         
3544
-        killact(71)
3545
-        killact(72)
3546
-        killact(73)
3547
-        killact(74)     
2684
+    pass    
3548
                 
2685
                 
3549
 stopAnims() 
2686
 stopAnims() 
3550
 #nextframe()  
2687
 #nextframe()  
3799
     killact(66)
2936
     killact(66)
3800
     killact(67)
2937
     killact(67)
3801
     killact(68) 
2938
     killact(68) 
3802
-    flipping = skater.isPlayingAction(fliplay)    
3803
-#    if own["last_Opos"] == True and flipping == False:
3804
-#        if STANCE == False:
3805
-#            skater.playAction("noposin", 20,1, layer=69, priority=3, blendin=10, play_mode=0, speed=.5)
3806
-#        elif STANCE == True:
3807
-#            skater.playAction("fak_oposin", 20,1, layer=70, priority=3, blendin=10, play_mode=0, speed=.5)
3808
-        #skater.stopAction(7)
3809
-        #skater.stopAction(0)       
3810
     own["last_Opos"] = False
2939
     own["last_Opos"] = False
3811
 #q1    
2940
 #q1    
3812
 if rUD < -0.070:
2941
 if rUD < -0.070:
3876
     killact(74)
3005
     killact(74)
3877
     killact(71)
3006
     killact(71)
3878
     killact(72)
3007
     killact(72)
3879
-    flipping = skater.isPlayingAction(fliplay)       
3880
-#    if own["last_nOpos"] == True and flipping == False:
3881
-
3882
-#        if STANCE == 0 and r_ground.triggered:
3883
-#            skater.playAction("nnoposin", 20,1, layer=75, priority=3, blendin=10, play_mode=0, speed=.5)
3884
-#        elif STANCE == 1 and r_ground.triggered:
3885
-#            skater.playAction("fak_noposin", 20,1, layer=76, priority=3, blendin=10, play_mode=0, speed=.5)
3886
     own["last_nOpos"] = False   
3008
     own["last_nOpos"] = False   
3887
        
3009
        
3888
 #q7
3010
 #q7
4251
 elif bBut ==0:
3373
 elif bBut ==0:
4252
         own["lastStop"] = False
3374
         own["lastStop"] = False
4253
 ##### falls
3375
 ##### falls
4254
-#space = own.sensors['space']
4255
-#if space.triggered:
4256
-#    own['fall'] = 1
4257
-#else:
4258
-#    own['fall'] = 0    
4259
-
4260
 if own['fall'] == 1:
3376
 if own['fall'] == 1:
4261
     offboard()
3377
     offboard()
4262
     own['getoffboard'] = True
3378
     own['getoffboard'] = True
4275
             skater.stopAction(fliplay)
3391
             skater.stopAction(fliplay)
4276
 #frontside grab
3392
 #frontside grab
4277
 flipping = skater.isPlayingAction(fliplay) 
3393
 flipping = skater.isPlayingAction(fliplay) 
4278
-#if rTrig > 0.02 and GRAB_ON == False and r_ground.triggered == 0:
4279
 if rTrig > 0.02 and r_ground.triggered == 0 and flipping == False:    
3394
 if rTrig > 0.02 and r_ground.triggered == 0 and flipping == False:    
4280
     GRAB_ON = True
3395
     GRAB_ON = True
4281
     own["GRAB_ON"] = GRAB_ON
3396
     own["GRAB_ON"] = GRAB_ON
4298
     elif STANCE == False and rUD > 0.07:
3413
     elif STANCE == False and rUD > 0.07:
4299
         frontside_tail_grab_on()                
3414
         frontside_tail_grab_on()                
4300
 
3415
 
4301
-
4302
-#if rTrig <= 0.02 and GRAB_ON == True and lTrig >= -.02:
4303
-#    GRAB_ON = False
4304
-#    own["GRAB_ON"] = GRAB_ON
4305
-#    GRAB_PLAYED = False
4306
-#    own["GRAB_PLAYED"] = GRAB_PLAYED
4307
-if rTrig <= 0.02 and GRAB_ON == True:
4308
-    killact(400)
4309
-    killact(401)
4310
-    #killact(403)
4311
-    killact(404)
4312
-    killact(408)
4313
-    killact(409)
4314
-    killact(410)
4315
-    killact(2925)
4316
-
4317
 #backside grab
3416
 #backside grab
4318
 #if lTrig > 0.02 and GRAB_ON == False and r_ground.triggered == 0:
3417
 #if lTrig > 0.02 and GRAB_ON == False and r_ground.triggered == 0:
4319
 if lTrig > 0.02 and r_ground.triggered == 0 and flipping == False:    
3418
 if lTrig > 0.02 and r_ground.triggered == 0 and flipping == False:    
4343
     own["GRAB_ON"] = GRAB_ON
3442
     own["GRAB_ON"] = GRAB_ON
4344
     GRAB_PLAYED = False
3443
     GRAB_PLAYED = False
4345
     own["GRAB_PLAYED"] = GRAB_PLAYED
3444
     own["GRAB_PLAYED"] = GRAB_PLAYED
4346
-if lTrig <= 0.02 or r_ground.triggered == 1:
4347
-    killact(402)
4348
-    killact(403)
4349
-    killact(405)
4350
-    killact(406)
4351
-    killact(407)
4352
-    killact(411)
4353
-    killact(412)
4354
-    #killact(404)
4355
-#if lTrig <= 0.02 or r_ground.triggered == 1:
4356
-#    killact(402)
4357
-#    killact(403)
4358
-#    #killact(405)
4359
-#    #killact(406)
4360
-#    killact(407)
4361
-#    #killact(404)    
4362
 
3445
 
4363
 #frontside pump #backside pump
3446
 #frontside pump #backside pump
4364
 if (rTrig > 0.02 and GRAB_ON == False and r_ground.triggered == 1) or (lTrig > 0.02 and GRAB_ON == False and r_ground.triggered == 1):
3447
 if (rTrig > 0.02 and GRAB_ON == False and r_ground.triggered == 1) or (lTrig > 0.02 and GRAB_ON == False and r_ground.triggered == 1):
4365
     pump()
3448
     pump()
4366
 else:
3449
 else:
4367
-    if own['lastPump'] == True:
4368
-        #skater.stopAction(0) 
4369
-        killact(20)
4370
-        killact(21)
4371
-        killact(22)
4372
-        killact(23)
4373
-#        if STANCE == 0:
4374
-#            skater.playAction("nreg_pump_in", 20,1, layer=24, priority=8, blendin=10, play_mode=0, speed=1)
4375
-#        elif STANCE == 1:
4376
-#            skater.playAction("nfak_pump_in", 20,1, layer=25, priority=8, blendin=10, play_mode=0, speed=1)
4377
     own["lastPump"] = False 
3450
     own["lastPump"] = False 
4378
     own["Pump"] = False 
3451
     own["Pump"] = False 
4379
-    #print("stop pumping")
4380
 def footplant():    
3452
 def footplant():    
4381
-    #a_reg_fp_rback
4382
     framenum = own['framenum']
3453
     framenum = own['framenum']
4383
     last_ground_frame = own['lF_ground_frame']
3454
     last_ground_frame = own['lF_ground_frame']
4384
     lF_air_frame = own['lF_air_frame']
3455
     lF_air_frame = own['lF_air_frame']
4386
     frames_since_grind = framenum - own['last_grind_frame']
3457
     frames_since_grind = framenum - own['last_grind_frame']
4387
     #print(frames_since_ground, "fsg")
3458
     #print(frames_since_ground, "fsg")
4388
     if LAST_GRIND == False and grindHit == True and aBut == True and frames_since_ground < 40 and touched:
3459
     if LAST_GRIND == False and grindHit == True and aBut == True and frames_since_ground < 40 and touched:
4389
-    #if LAST_GRIND == False and aBut == True and frames_since_ground < 10 and r_ground.triggered == 1:        
4390
-    #if grindHit == True and aBut == True and frames_since_ground < 20:    
4391
         own.setLinearVelocity([0,0,0],0)
3460
         own.setLinearVelocity([0,0,0],0)
4392
         killall()
3461
         killall()
4393
         if STANCE == 0:
3462
         if STANCE == 0:
4440
     if own["coping"] == 1 and invert_on == 1:
3509
     if own["coping"] == 1 and invert_on == 1:
4441
         killact(25)
3510
         killact(25)
4442
         killact(24)
3511
         killact(24)
4443
-#        if STANCE == False:             
4444
-#            skater.playAction("reg_back_invert", 0,0, layer=300, play_mode=0, speed=.5) 
4445
-#            deck.playAction("a_reg_back_invert", 0,0, layer=301, play_mode=0, speed=.5)
4446
-#            trucks.playAction("a_reg_back_invert", 0,0, layer=302, play_mode=0, speed=.5)  
4447
-#        if STANCE == True:             
4448
-#            skater.playAction("fak_back_invert", 0,0, layer=300, play_mode=0, speed=.5) 
4449
-#            deck.playAction("a_fak_back_invert", 0,0, layer=301, play_mode=0, speed=.5)
4450
-#            trucks.playAction("a_fak_back_invert", 0,0, layer=302, play_mode=0, speed=.5)              
4451
         if own['invert_on'] == 1 and own['last_invert'] == False:
3512
         if own['invert_on'] == 1 and own['last_invert'] == False:
4452
             killall()
3513
             killall()
4453
             cont.activate(own.actuators['invertOn_sound'])
3514
             cont.activate(own.actuators['invertOn_sound'])
4503
 invert() 
3564
 invert() 
4504
 footplant()
3565
 footplant()
4505
     
3566
     
4506
-#else:
4507
-    #own['invert_on'] = 0 
4508
   
3567
   
4509
 if own['invert_on'] == 0: 
3568
 if own['invert_on'] == 0: 
4510
     killact(900)
3569
     killact(900)
4511
-    #killact(901)
4512
-    #killact(902)       
4513
-#print("l: ", lBump)
4514
     
3570
     
4515
 def reset_pos():
3571
 def reset_pos():
4516
     #reset
3572
     #reset
4554
     own.actuators["sroll"].volume = .0001
3610
     own.actuators["sroll"].volume = .0001
4555
     cont.deactivate(own.actuators["sroll"])
3611
     cont.deactivate(own.actuators["sroll"])
4556
     own.actuators["sroll"].stopSound()
3612
     own.actuators["sroll"].stopSound()
4557
-
4558
-#    print("Start")
4559
-#    if own["gamepaused"] == False:
4560
-#        cont.activate(own.actuators["pause"])    
4561
-#        own["gamepaused"] == True
4562
-#    if own["gamepaused"] == True:
4563
-#        cont.activate(own.actuators["resume"])
4564
-#        own["gamepaused"] == False
4565
-
4566
      
3613
      
4567
 def ylimit():
3614
 def ylimit():
4568
-    #if r_ground.triggered and touched == False and grindDar == 0:
4569
     lgf = own['last_grind_frame']
3615
     lgf = own['last_grind_frame']
4570
     frame = own['framenum']
3616
     frame = own['framenum']
4571
     frames_since_grinding = frame - lgf
3617
     frames_since_grinding = frame - lgf
4909
                 if STANCE == True:
3955
                 if STANCE == True:
4910
                     if own['grind_out_type'] == None:
3956
                     if own['grind_out_type'] == None:
4911
                          own['grind_out_type'] = 'fak right'                    
3957
                          own['grind_out_type'] = 'fak right'                    
4912
-                    #outact.dLoc = [0, -outloc, 0]
4913
-                    #outact.dRot = [0, 0, -outrot]
4914
                 if STANCE == False:
3958
                 if STANCE == False:
4915
                     if own['grind_out_type'] == None:
3959
                     if own['grind_out_type'] == None:
4916
                          own['grind_out_type'] = 'reg right'                    
3960
                          own['grind_out_type'] = 'reg right'                    
4917
-                    #outact.dLoc = [0, outloc, 0]
4918
-                    #outact.dRot = [0, 0, -outrot]                
4919
-                #cont.activate(own.actuators["grindoutRight"])
4920
                 own["grindoutturn"] = gotcd    
3961
                 own["grindoutturn"] = gotcd    
4921
             if lq7on == 1 or lq8on:
3962
             if lq7on == 1 or lq8on:
4922
                 if own['gt_cd2'] == 0:
3963
                 if own['gt_cd2'] == 0:
4924
                 if STANCE == True:
3965
                 if STANCE == True:
4925
                     if own['grind_out_type'] == None:
3966
                     if own['grind_out_type'] == None:
4926
                          own['grind_out_type'] = 'fak left'                    
3967
                          own['grind_out_type'] = 'fak left'                    
4927
-                    #outact.dLoc = [0, outloc, 0]
4928
-                    #outact.dRot = [0, 0, outrot]
4929
                 if STANCE == False:
3968
                 if STANCE == False:
4930
                     if own['grind_out_type'] == None:
3969
                     if own['grind_out_type'] == None:
4931
                          own['grind_out_type'] = 'reg left'                    
3970
                          own['grind_out_type'] = 'reg left'                    
4932
-                    #outact.dLoc = [0, -outloc, 0]
4933
-                    #outact.dRot = [0, 0, outrot]                
4934
-                #cont.activate(own.actuators["grindoutRight"])
4935
                 own["grindoutturn"] = gotcd 
3971
                 own["grindoutturn"] = gotcd 
4936
             if lq4on == 1:
3972
             if lq4on == 1:
4937
                 if own['gt_cd2'] == 0:
3973
                 if own['gt_cd2'] == 0:
4939
                 if STANCE == True:
3975
                 if STANCE == True:
4940
                     if own['grind_out_type'] == None:
3976
                     if own['grind_out_type'] == None:
4941
                          own['grind_out_type'] = 'fak fak right'
3977
                          own['grind_out_type'] = 'fak fak right'
4942
-                    #outact.dLoc = [0, -outloc, 0]
4943
-                    #outact.dRot = [0, 0, outrot2]
4944
                 if STANCE == False:
3978
                 if STANCE == False:
4945
                     if own['grind_out_type'] == None:
3979
                     if own['grind_out_type'] == None:
4946
                          own['grind_out_type'] = 'reg fak right'
3980
                          own['grind_out_type'] = 'reg fak right'
4947
-                    #outact.dLoc = [0, outloc, 0]
4948
-                    #outact.dRot = [0, 0, outrot2]
4949
-                #cont.activate(own.actuators["grindoutRight"]) 
4950
                 own["grindoutturn"] = gotcd
3981
                 own["grindoutturn"] = gotcd
4951
             if lq6on == 1:
3982
             if lq6on == 1:
4952
                 if own['gt_cd2'] == 0:
3983
                 if own['gt_cd2'] == 0:
4954
                 if STANCE == True:
3985
                 if STANCE == True:
4955
                     if own['grind_out_type'] == None:
3986
                     if own['grind_out_type'] == None:
4956
                          own['grind_out_type'] = 'fak fak left'
3987
                          own['grind_out_type'] = 'fak fak left'
4957
-                    #outact.dLoc = [0, outloc, 0]
4958
-                    #outact.dRot = [0, 0, -outrot2]
4959
                 if STANCE == False:
3988
                 if STANCE == False:
4960
                     if own['grind_out_type'] == None:
3989
                     if own['grind_out_type'] == None:
4961
                          own['grind_out_type'] = 'reg fak left'                      
3990
                          own['grind_out_type'] = 'reg fak left'                      
4962
-                    #outact.dLoc = [0, -outloc, 0]
4963
-                    #outact.dRot = [0, 0, -outrot2]                
4964
-                #cont.activate(own.actuators["grindoutRight"]) 
4965
                 own["grindoutturn"] = gotcd                
3991
                 own["grindoutturn"] = gotcd                
4966
         #use stance for 5050 and grindstance for boards                        
3992
         #use stance for 5050 and grindstance for boards                        
4967
         if own['grindpos'] == 'reg_board':
3993
         if own['grindpos'] == 'reg_board':
4968
             outvel = own.getLinearVelocity(1)
3994
             outvel = own.getLinearVelocity(1)
4969
-            
4970
-            
4971
             outact.dLoc = [0, 0, 0]
3995
             outact.dLoc = [0, 0, 0]
4972
             outact.dRot = [0, 0, 0]
3996
             outact.dRot = [0, 0, 0]
4973
             if lq5on == 1:
3997
             if lq5on == 1:
4974
                 if own['gt_cd2'] == 0:
3998
                 if own['gt_cd2'] == 0:
4975
                     own['gt_cd2'] = 60                 
3999
                     own['gt_cd2'] = 60                 
4976
                 if own['grind_stance'] == True:
4000
                 if own['grind_stance'] == True:
4977
-                    #outact.dLoc = [-bsoutloc, 0, 0]
4978
                     if own['footplant_on'] == True:
4001
                     if own['footplant_on'] == True:
4979
                         own.setLinearVelocity([(outvel.x + -bsoutvel), outvel.y, outvel.z], 1)
4002
                         own.setLinearVelocity([(outvel.x + -bsoutvel), outvel.y, outvel.z], 1)
4980
                         cont.activate(own.actuators["grindoutRight"])                   
4003
                         cont.activate(own.actuators["grindoutRight"])                   
4981
                     if own['grind_out_type'] == None:
4004
                     if own['grind_out_type'] == None:
4982
                          own['grind_out_type'] = 'bs fak back'                     
4005
                          own['grind_out_type'] = 'bs fak back'                     
4983
-                    #force = [-40, 0, 0]
4984
-                    #own.applyForce(force,1)
4985
                 if own['grind_stance'] == False:
4006
                 if own['grind_stance'] == False:
4986
-                    #outact.dLoc = [bsoutloc, 0, 0]
4987
                     if own['footplant_on'] == True:
4007
                     if own['footplant_on'] == True:
4988
                         own.setLinearVelocity([(outvel.x + bsoutvel), outvel.y, outvel.z], 1)
4008
                         own.setLinearVelocity([(outvel.x + bsoutvel), outvel.y, outvel.z], 1)
4989
                         cont.activate(own.actuators["grindoutRight"]) 
4009
                         cont.activate(own.actuators["grindoutRight"]) 
4990
                     if own['grind_out_type'] == None:
4010
                     if own['grind_out_type'] == None:
4991
                          own['grind_out_type'] = 'bs reg back'
4011
                          own['grind_out_type'] = 'bs reg back'
4992
-                    #force = [40, 0, 0]
4993
-                    #own.applyForce(force,1)                    
4994
-                #cont.activate(own.actuators["grindoutRight"]) 
4995
                 own["grindoutturn"] = gotcd 
4012
                 own["grindoutturn"] = gotcd 
4996
                 own['invert_on'] = 0  
4013
                 own['invert_on'] = 0  
4997
             if lq1on == 1:
4014
             if lq1on == 1:
4998
                 if own['gt_cd2'] == 0:
4015
                 if own['gt_cd2'] == 0:
4999
                     own['gt_cd2'] = 60                 
4016
                     own['gt_cd2'] = 60                 
5000
                 if own['grind_stance'] == True:
4017
                 if own['grind_stance'] == True:
5001
-                    #outact.dLoc = [bsoutloc, 0, 0]
5002
-                    #force = [40, 0, 0]
5003
-                    #own.applyForce(force,1) 
5004
                     if own['footplant_on'] == True:                   
4018
                     if own['footplant_on'] == True:                   
5005
                         own.setLinearVelocity([(outvel.x + bsoutvel), outvel.y, outvel.z], 1)
4019
                         own.setLinearVelocity([(outvel.x + bsoutvel), outvel.y, outvel.z], 1)
5006
                         cont.activate(own.actuators["grindoutRight"])
4020
                         cont.activate(own.actuators["grindoutRight"])
5007
                     if own['grind_out_type'] == None:
4021
                     if own['grind_out_type'] == None:
5008
                          own['grind_out_type'] = 'bs fak forward'                                            
4022
                          own['grind_out_type'] = 'bs fak forward'                                            
5009
                 if own['grind_stance'] == False:
4023
                 if own['grind_stance'] == False:
5010
-                    #outact.dLoc = [-bsoutloc, 0, 0]
5011
-                    #force = [-40, 0, 0]
5012
-                    #own.applyForce(force,1)
5013
                     if own['footplant_on'] == True:                    
4024
                     if own['footplant_on'] == True:                    
5014
                         own.setLinearVelocity([(outvel.x + -bsoutvel), outvel.y, outvel.z], 1)
4025
                         own.setLinearVelocity([(outvel.x + -bsoutvel), outvel.y, outvel.z], 1)
5015
                         cont.activate(own.actuators["grindoutRight"])
4026
                         cont.activate(own.actuators["grindoutRight"])
5181
         killact(3003)
4192
         killact(3003)
5182
         killact(3004)
4193
         killact(3004)
5183
         killact(3005)   
4194
         killact(3005)   
5184
-#    if wallride_col.triggered == True:
5185
-#        print("wallride")
5186
-#        wallobj = wallride_col.hitObject
5187
-#        print(wallobj)
5188
-#        xyz = own.worldOrientation.to_euler()
5189
-#        rotz = math.degrees(xyz[2])
5190
-#        xyz2 = wallobj.worldOrientation.to_euler()
5191
-#        rotz2 = math.degrees(xyz2[2])
5192
-#        print("prot: ", rotz, "wrot: ", rotz2)
5193
-#        try: 
5194
-#            zvect = wallobj.getAxisVect( [0.0, 1.0, 0.0]) 
5195
-#            print(zvect)
5196
-#        except: pass
5197
-#        rot = rotz - rotz2 
5198
-#        rotation = rot * -1   
5199
-#        rotation = [ 0.0, 0, rot]
5200
-#        
5201
-#        own.applyRotation( rotation, True)    
5202
-        #vectTo = obj.getVectTo(wallobj)
5203
-        
5204
-#        try:
5205
-#            if STANCE == 0:
5206
-#                own.alignAxisToVect(zvect, 0, .9)
5207
-#            if STANCE == 1:
5208
-#                own.alignAxisToVect(-zvect, 0, .9) 
5209
-#        except: pass                   
5210
-#print(wallride_col.triggered)            
5211
 
4195
 
5212
 def wallride_sound():
4196
 def wallride_sound():
5213
     
4197
     
5236
         own["Q8oncd"] = 0  
4220
         own["Q8oncd"] = 0  
5237
 def grindout_cleanup():             
4221
 def grindout_cleanup():             
5238
     lgf = own['last_grind_frame']
4222
     lgf = own['last_grind_frame']
5239
-    if (frame - lgf) == 20:               
5240
-        #print("kill grindout anims")
5241
-        killact(200)
5242
-        #killact(200)
5243
-        #killact(200)
5244
-    if skater.isPlayingAction(fliplay):    
5245
-        #print("flipping")      
5246
-        killact(700)
5247
-        #killact(700)
5248
-        #killact(700)
5249
-        killact(200)
5250
-        #killact(200)
5251
-        #Ekillact(200)    
5252
 def trans_jump():
4223
 def trans_jump():
5253
     if own['jump_from_trans'] == 1:
4224
     if own['jump_from_trans'] == 1:
5254
         ground_ray = cont.sensors['ground_look']                        
4225
         ground_ray = cont.sensors['ground_look']                        
5255
-        #print('align transjump', own['trans_jump_obj'])
5256
         jump_obj = own['trans_jump_obj']
4226
         jump_obj = own['trans_jump_obj']
5257
         jump_obj = scene.objects[str(own['trans_jump_obj'])]
4227
         jump_obj = scene.objects[str(own['trans_jump_obj'])]
5258
         #print(jump_obj)
4228
         #print(jump_obj)
5312
 #printplaying()
4282
 #printplaying()
5313
 #transmult()
4283
 #transmult()
5314
 linvelx = own.getLinearVelocity(True)
4284
 linvelx = own.getLinearVelocity(True)
5315
-#own["LAST_LEFT"] = LAST_LEFT
5316
-#end
5317
 #print(linvelx)
4285
 #print(linvelx)
5318
 own["linvelx"] = linvelx.x
4286
 own["linvelx"] = linvelx.x
5319
 LAST_STANCE = STANCE
4287
 LAST_STANCE = STANCE
5357
 own["last_sel"] = own["sel"]
4325
 own["last_sel"] = own["sel"]
5358
 own["sel"] = bkBut  
4326
 own["sel"] = bkBut  
5359
 
4327
 
5360
-#linVelocity = own.getLinearVelocity(1)
5361
-#print(linVelocity.z)
5362
-#newz = linVelocity.z * .9
5363
 if r_ground.triggered and own["jump_timer"] < 20:
4328
 if r_ground.triggered and own["jump_timer"] < 20:
5364
     force2 = [0.0, 0, -10]
4329
     force2 = [0.0, 0, -10]
5365
     own.applyForce(force2, True)
4330
     own.applyForce(force2, True)
5366
-    #own.linearVelocity = [ linVelocity.x, linVelocity.y, newz]
5367
-#print(c_ground.triggered, r_ground.triggered, gray.hitPosition[2])
5368
-#if c_ground.triggered and r_ground.triggered == False:
5369
-#    print("AAAAAAAAAAAAAAlign")
5370
-#print("og - new = ", vely)
5371
-#print(r_ground.triggered)
5372
-#spawn_pos = own['spawn_pos']
5373
-#print(lUD)
5374
-#.04 to .05
5375
-#print("- ",spawn_pos.x, spawn_pos.y, spawn_pos.z)
5376
-#printplaying()
5377
-#print("-", udPad, ddPad)
5378
-#print(own["stance"])
5379
-#own["LAST_LEFT"] = LAST_LEFT
5380
-#end
5381
-#print(rLR)
5382
-#print(r_ground.triggered)
5383
-#print(own['hippy'], own['last_hippy'])
5384
-
5385
-#print("x: ", round(linvelx.x, 2), "y: ", round(linvelx.y, 2))
5386
 
4331
 
5387
 
4332
 

Loading…
Cancel
Save