Browse Source

more turns

shuvit 5 years ago
parent
commit
9baa6851d2
2 changed files with 141 additions and 48 deletions
  1. 141
    46
      co_ActionState.py
  2. 0
    2
      scene_init.py

+ 141
- 46
co_ActionState.py View File

@@ -176,18 +176,18 @@ def main():
176 176
     #check last actionState to see if an out action is needed    
177 177
     if requestAction not in jump_overrideList:
178 178
 
179
-        if l_actionState == 'fak_turnRight' and requestAction != 'fak_turnRight':
180
-            if requestAction not in ['fak_turnRight', 'fak_pump_right', 'fak_pump']:
181
-                requestAction = 'fak_turnRight_out'
182
-                actionState = 'fak_turnRight_out'
183
-            elif requestAction == 'fak_pump_right':
184
-                requestAction = 'fak_right-pump'    
185
-        if l_actionState == 'fak_turnLeft' and requestAction != 'fak_turnLeft':
186
-            if requestAction not in ['fak_turnLeft', 'fak_pump_left', 'fak_pump']:
187
-                requestAction = 'fak_turnLeft_out'
188
-                actionState = 'fak_turnLeft_out'                        
189
-            elif requestAction == 'fak_pump_left':
190
-                requestAction = 'fak_left-pump'    
179
+        # if l_actionState == 'fak_turnRight' and requestAction != 'fak_turnRight':
180
+        #     if requestAction not in ['fak_turnRight', 'fak_pump_right', 'fak_pump']:
181
+        #         requestAction = 'fak_turnRight_out'
182
+        #         actionState = 'fak_turnRight_out'
183
+        #     elif requestAction == 'fak_pump_right':
184
+        #         requestAction = 'fak_right-pump'    
185
+        # if l_actionState == 'fak_turnLeft' and requestAction != 'fak_turnLeft':
186
+        #     if requestAction not in ['fak_turnLeft', 'fak_pump_left', 'fak_pump']:
187
+        #         requestAction = 'fak_turnLeft_out'
188
+        #         actionState = 'fak_turnLeft_out'                        
189
+        #     elif requestAction == 'fak_pump_left':
190
+        #         requestAction = 'fak_left-pump'    
191 191
                 
192 192
         
193 193
         #-----
@@ -215,21 +215,24 @@ def main():
215 215
             actionState = 'fak_nopos_out' 
216 216
 #*********************************            
217 217
 
218
-        if l_actionState == 'fak_turnLeft' and requestAction == 'fak_pump_left':
219
-            requestAction = 'fak_pump_left-left'
220
-            actionState = 'fak_pump_left-left'
221
-        if l_actionState == 'fak_turnRight' and requestAction == 'fak_pump_right':
222
-            requestAction = 'fak_pump_right-right'
223
-            actionState = 'fak_pump_right-right'                        
218
+        # if l_actionState == 'fak_turnLeft' and requestAction == 'fak_pump_left':
219
+        #     requestAction = 'fak_pump_left-left'
220
+        #     actionState = 'fak_pump_left-left'
221
+        # if l_actionState == 'fak_turnRight' and requestAction == 'fak_pump_right':
222
+        #     requestAction = 'fak_pump_right-right'
223
+        #     actionState = 'fak_pump_right-right'                        
224 224
             
225 225
 #**********************************            
226 226
 
227 227
         if l_actionState == 'reg_pump' and requestAction == 'reg_5050':
228 228
             requestAction = 'reg_5050'
229
-            actionState = 'reg_5050'    
230
-        if l_actionState == 'fak_pump' and requestAction not in ['fak_pump', 'fak_pump_right', 'fak_pump_left'] and requestAction not in pump_out_overList:
231
-            requestAction = 'fak_pump_out'
232
-            actionState = 'fak_pump_out'            
229
+            actionState = 'reg_5050'
230
+        if l_actionState == 'fak_pump' and requestAction == 'fak_5050':
231
+            requestAction = 'fak_5050'
232
+            actionState = 'fak_5050'                
233
+        # if l_actionState == 'fak_pump' and requestAction not in ['fak_pump', 'fak_pump_right', 'fak_pump_left'] and requestAction not in pump_out_overList:
234
+        #     requestAction = 'fak_pump_out'
235
+        #     actionState = 'fak_pump_out'            
233 236
             
234 237
         if l_actionState == 'reg_powerslide' and requestAction != 'reg_powerslide':
235 238
             requestAction = 'reg_powerslide_out'
@@ -514,20 +517,20 @@ def main():
514 517
             actionState = 'fak_judo_out'
515 518
                         
516 519
             
517
-        if l_actionState == 'fak_pump_right' and requestAction != 'fak_pump_right':
518
-            requestAction = 'fak_pump_right_out'
519
-            actionState = 'fak_pump_right_out'                                       
520
+        # if l_actionState == 'fak_pump_right' and requestAction != 'fak_pump_right':
521
+        #     requestAction = 'fak_pump_right_out'
522
+        #     actionState = 'fak_pump_right_out'                                       
520 523
 
521
-        if l_actionState == 'fak_pump_left' and requestAction != 'fak_pump_left':
522
-            requestAction = 'fak_pump_left_out'
523
-            actionState = 'fak_pump_left_out' 
524
+        # if l_actionState == 'fak_pump_left' and requestAction != 'fak_pump_left':
525
+        #     requestAction = 'fak_pump_left_out'
526
+        #     actionState = 'fak_pump_left_out' 
524 527
 
525
-        if l_actionState == 'fak_pump_left_out' and requestAction != 'fak_pump_left_out':
526
-            requestAction = 'fak_pump'
527
-            actionState = 'fak_pump'
528
-        if l_actionState == 'fak_pump_right_out' and requestAction != 'fak_pump_right_out':
529
-            requestAction = 'fak_pump'
530
-            actionState = 'fak_pump'                        
528
+        # if l_actionState == 'fak_pump_left_out' and requestAction != 'fak_pump_left_out':
529
+        #     requestAction = 'fak_pump'
530
+        #     actionState = 'fak_pump'
531
+        # if l_actionState == 'fak_pump_right_out' and requestAction != 'fak_pump_right_out':
532
+        #     requestAction = 'fak_pump'
533
+        #     actionState = 'fak_pump'                        
531 534
                         
532 535
         if l_actionState == 'reg_walk_air' and requestAction != 'reg_walk_air':
533 536
             requestAction = 'reg_walk_air_out'
@@ -623,7 +626,7 @@ def main():
623 626
         if l_actionState in ['fak_left-pump', 'fak_right-pump'] and requestAction == 'reg_roll':
624 627
             requestAction = 'fak_pump_out' 
625 628
 
626
-#---
629
+#---new pump turns reg
627 630
 
628 631
         if l_actionState == 'reg_pump' and requestAction == 'reg_pump_right' and trans_playing != 0:
629 632
             requestAction = 'reg_pump'
@@ -632,9 +635,6 @@ def main():
632 635
         if l_actionState == 'reg_turnLeft' and requestAction == 'reg_pump_left' and trans_playing != 0:
633 636
             requestAction = 'reg_turnLeft' 
634 637
             
635
-            
636
-             
637
-
638 638
         if l_actionState == 'reg_turnRight' and requestAction in ['reg_roll', 'reg_pump']:
639 639
             requestAction = 'reg_turnRight_out'
640 640
         if l_actionState == 'reg_turnLeft' and requestAction in ['reg_roll', 'reg_pump']:
@@ -674,7 +674,6 @@ def main():
674 674
                 requestAction = 'reg_pump_right-rightb'
675 675
             else:
676 676
                 requestAction == 'reg_pump_right'
677
-            
678 677
                 
679 678
         if l_actionState == 'reg_pump_left' and requestAction == 'reg_turnLeft':
680 679
             if trans_playing == False:
@@ -682,8 +681,6 @@ def main():
682 681
             else:
683 682
                 requestAction == 'reg_pump_left'    
684 683
             
685
-            
686
-            
687 684
         if l_actionState == 'reg_turnRight_out' and requestAction == 'fak_roll':
688 685
             requestAction = 'reg_roll' 
689 686
         if l_actionState == 'reg_turnLeft_out' and requestAction == 'fak_roll':
@@ -705,11 +702,7 @@ def main():
705 702
             requestAction = 'reg_pump_left-left'                     
706 703
         
707 704
         if l_actionState == 'reg_pump_right-right' and requestAction not in [ 'reg_pump_right-right', 'reg_pump_right-rightb']:
708
-            requestAction = 'reg_pump_right' 
709
-            
710
-            
711
-            
712
-            
705
+            requestAction = 'reg_pump_right'         
713 706
             
714 707
         if l_actionState == 'reg_pump_left-left' and requestAction not in [ 'reg_pump_left-left', 'reg_pump_left-leftb']:
715 708
             requestAction = 'reg_pump_left'        
@@ -733,6 +726,108 @@ def main():
733 726
         if l_actionState == 'reg_turnRight_out' and requestAction in ['reg_pump_left', 'reg_pump_right']:
734 727
             requestAction = 'reg_pump'                 
735 728
               
729
+
730
+
731
+        #fak
732
+
733
+        if l_actionState == 'fak_pump' and requestAction == 'fak_pump_right' and trans_playing != 0:
734
+            requestAction = 'fak_pump'
735
+        if l_actionState == 'fak_turnRight' and requestAction == 'fak_pump_right' and trans_playing != 0:
736
+            requestAction = 'fak_turnRight'  
737
+        if l_actionState == 'fak_turnLeft' and requestAction == 'fak_pump_left' and trans_playing != 0:
738
+            requestAction = 'fak_turnLeft'   
739
+
740
+        if l_actionState == 'fak_turnRight' and requestAction in ['fak_roll', 'fak_pump']:
741
+            requestAction = 'fak_turnRight_out'
742
+        if l_actionState == 'fak_turnLeft' and requestAction in ['fak_roll', 'fak_pump']:
743
+            requestAction = 'fak_turnLeft_out'    
744
+        if l_actionState == 'fak_pump' and requestAction == 'fak_roll':
745
+            requestAction = 'fak_pump_out' 
746
+        
747
+        if l_actionState == 'fak_turnRight' and requestAction in ['fak_pump_right']:
748
+            requestAction = 'fak_pump_right'    
749
+        if l_actionState == 'fak_turnLeft' and requestAction in ['fak_pump_left']:
750
+            requestAction = 'fak_pump_left'    
751
+        
752
+        if l_actionState == 'fak_pump_right' and requestAction in ['fak_pump', 'fak_roll']:
753
+            requestAction = 'fak_pump_right_out'
754
+            own['actionState'] = 'fak_pump_right_out'
755
+        if l_actionState == 'fak_pump_left' and requestAction in ['fak_pump', 'fak_roll']:
756
+            requestAction = 'fak_pump_left_out'
757
+            own['actionState'] = 'fak_pump_left_out'    
758
+
759
+        if l_actionState == 'fak_pump_right_out' and requestAction == 'fak_roll':
760
+            requestAction = 'fak_pump'
761
+        if l_actionState == 'fak_pump_left_out' and requestAction == 'fak_roll':
762
+            requestAction = 'fak_pump'    
763
+            
764
+        if l_actionState == 'fak_pump_right-rightb' and requestAction == 'fak_roll':
765
+            requestAction = 'fak_turnRight'   
766
+        if l_actionState == 'fak_pump_left-leftb' and requestAction == 'fak_roll':
767
+            requestAction = 'fak_turnLeft'   
768
+        
769
+        if l_actionState == 'fak_turnRight' and requestAction == 'fak_pump_right':
770
+            requestAction = 'fak_pump_right-right' 
771
+        if l_actionState == 'fak_turnLeft' and requestAction == 'fak_pump_left':
772
+            requestAction = 'fak_pump_left-left'                
773
+                                                                    
774
+        if l_actionState == 'fak_pump_right' and requestAction == 'fak_turnRight':
775
+            if trans_playing == False:
776
+                requestAction = 'fak_pump_right-rightb'
777
+            else:
778
+                requestAction == 'fak_pump_right'
779
+                
780
+        if l_actionState == 'fak_pump_left' and requestAction == 'fak_turnLeft':
781
+            if trans_playing == False:
782
+                requestAction = 'fak_pump_left-leftb'            
783
+            else:
784
+                requestAction == 'fak_pump_left'    
785
+                   
786
+        if l_actionState == 'fak_turnRight_out' and requestAction == 'reg_roll':
787
+            requestAction = 'fak_roll' 
788
+        if l_actionState == 'fak_turnLeft_out' and requestAction == 'reg_roll':
789
+            requestAction = 'fak_roll'      
790
+            
791
+        if l_actionState == 'fak_pump' and requestAction == 'fak_turnRight':
792
+            requestAction = 'fak_pump_out' 
793
+        if l_actionState == 'fak_pump' and requestAction == 'fak_turnLeft':
794
+            requestAction = 'fak_pump_out'               
795
+            
796
+        if l_actionState == 'fak_pump_right-right' and requestAction == 'fak_turnRight':
797
+            requestAction = 'fak_pump_right-rightb'
798
+        if l_actionState == 'fak_pump_left-left' and requestAction == 'fak_turnLeft':
799
+            requestAction = 'fak_pump_left-leftb'    
800
+        
801
+        if l_actionState == 'fak_pump_right-rightb' and requestAction == 'fak_pump_right':
802
+            requestAction = 'fak_pump_right-right' 
803
+        if l_actionState == 'fak_pump_left-leftb' and requestAction == 'fak_pump_left':
804
+            requestAction = 'fak_pump_left-left'                     
805
+        
806
+        if l_actionState == 'fak_pump_right-right' and requestAction not in [ 'fak_pump_right-right', 'fak_pump_right-rightb']:
807
+            requestAction = 'fak_pump_right' 
808
+                  
809
+        if l_actionState == 'fak_pump_left-left' and requestAction not in [ 'fak_pump_left-left', 'fak_pump_left-leftb']:
810
+            requestAction = 'fak_pump_left'        
811
+            
812
+        if l_actionState == 'fak_pump_right_out' and requestAction in ['fak_turnRight', 'fak_turnLeft']:
813
+            requestAction = 'fak_pump'
814
+        if l_actionState == 'fak_pump_left_out' and requestAction in ['fak_turnLeft', 'fak_turnRight']:
815
+            requestAction = 'fak_pump'    
816
+                      
817
+        if l_actionState == 'fak_pump_out' and requestAction == 'fak_pump_right':
818
+            requestAction = 'fak_roll'
819
+        if l_actionState == 'fak_pump_out' and requestAction == 'fak_pump_left':
820
+            requestAction = 'fak_roll'  
821
+            
822
+        if l_actionState == 'fak_roll' and requestAction in ['fak_pump_right', 'fak_pump_left']:
823
+            requestAction = 'fak_pump' 
824
+            
825
+        if l_actionState == 'fak_turnLeft_out' and requestAction in ['fak_pump_right', 'fak_pump_left']:
826
+            requestAction = 'fak_pump'
827
+        
828
+        if l_actionState == 'fak_turnRight_out' and requestAction in ['fak_pump_left', 'fak_pump_right']:
829
+            requestAction = 'fak_pump'                 
830
+
736 831
                                                                                   
737 832
 #---------------------------------------------------                                                                                  
738 833
                                                                                   

+ 0
- 2
scene_init.py View File

@@ -23,8 +23,6 @@ def main():
23 23
     dict['overlay_fadeout'] = 1
24 24
     scenes = bge.logic.getSceneList()
25 25
     own['pre_pause_linvel'] = 0.0
26
-    #own['last_roll_frame'] = 0
27
-  
28 26
 
29 27
     objList = scene.objects
30 28
 

Loading…
Cancel
Save