Browse Source

stance changes

shuvit 6 years ago
parent
commit
b85f5809b1
3 changed files with 68 additions and 35 deletions
  1. 1
    1
      co_ActionState.py
  2. 35
    25
      controller2.py
  3. 32
    9
      grindV2.py

+ 1
- 1
co_ActionState.py View File

@@ -2850,7 +2850,7 @@ def main():
2850 2850
 ###################  
2851 2851
     
2852 2852
     #debug
2853
-    print("rA:", requestAction, "|aS:", own['actionState'], "q", queueAction, own['actionTimer'])
2853
+    #print("rA:", requestAction, "|aS:", own['actionState'], "q", queueAction, own['actionTimer'])
2854 2854
     cur_frame = skater.getActionFrame(trans_layer)
2855 2855
     #print(cur_frame)
2856 2856
     def printplaying():

+ 35
- 25
controller2.py View File

@@ -2082,27 +2082,29 @@ def grind():
2082 2082
                 own['requestAction'] = 'fak_tailgl' 
2083 2083
             
2084 2084
             elif own['grindType'] == "reg_tailslide":
2085
-                own['requestAction'] = 'reg_tailslide'
2085
+                #own['requestAction'] = 'reg_tailslide'
2086
+                own['requestAction'] = 'fak_noseslide'  
2086 2087
                 own['grind_stance'] = 0                
2087 2088
             elif own['grindType'] == "fak_tailslide":
2088
-                own['requestAction'] = 'fak_tailslide'
2089
+                own['requestAction'] = 'fak_tailslide'                
2089 2090
                 own['grind_stance'] = 1
2090 2091
             elif own['grindType'] == "reg_noseslide":
2091
-                own['requestAction'] = 'reg_noseslide'
2092
+                #own['requestAction'] = 'reg_noseslide'
2093
+                own['requestAction'] = 'fak_tailslide'  
2092 2094
                 own['grind_stance'] = 0
2093 2095
             elif own['grindType'] == "fak_noseslide":
2094 2096
                 own['requestAction'] = 'fak_noseslide'  
2095 2097
                 own['grind_stance'] = 1              
2096
-            elif own['grindType'] == "nose_stall":
2097
-                own['requestAction'] = 'nose_stall'
2098
-                skater.playAction("fak_nose_stall", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2099
-                deck.playAction("a_fak_nose_stall", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2100
-                trucks.playAction("a_fak_nose_stall", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)  
2101
-            elif own['grindType'] == "tail_stall":
2102
-                own['requestAction'] = 'tail_stall'
2103
-                skater.playAction("fak_tail_stall", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2104
-                deck.playAction("a_fak_tail_stall", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2105
-                trucks.playAction("a_fak_tail_stall", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5) 
2098
+#            elif own['grindType'] == "nose_stall":
2099
+#                own['requestAction'] = 'nose_stall'
2100
+#                skater.playAction("fak_nose_stall", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2101
+#                deck.playAction("a_fak_nose_stall", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2102
+#                trucks.playAction("a_fak_nose_stall", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)  
2103
+#            elif own['grindType'] == "tail_stall":
2104
+#                own['requestAction'] = 'tail_stall'
2105
+#                skater.playAction("fak_tail_stall", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2106
+#                deck.playAction("a_fak_tail_stall", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2107
+#                trucks.playAction("a_fak_tail_stall", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5) 
2106 2108
             else:
2107 2109
                 if STANCE == 0:
2108 2110
                     own['requestAction'] = 'reg_5050'
@@ -2146,22 +2148,27 @@ def grind():
2146 2148
                 own['requestAction'] = 'reg_tailslide'
2147 2149
             elif own['grindType'] == "fak_tailslide":
2148 2150
                 own['grind_stance'] = 1
2149
-                own['requestAction'] = 'fak_tailslide'
2151
+                #own['requestAction'] = 'fak_tailslide'
2152
+                own['requestAction'] = 'reg_noseslide'
2153
+                print('mod slide')
2150 2154
             elif own['grindType'] == "reg_noseslide":
2151 2155
                 own['grind_stance'] = 0
2152 2156
                 own['requestAction'] = 'reg_noseslide'
2153 2157
             elif own['grindType'] == "fak_noseslide":  
2154 2158
                 own['grind_stance'] = 1              
2155
-                own['requestAction'] = 'fak_noseslide'
2156
-            elif own['grindType'] == "nose_stall":
2157
-                skater.playAction("nose_stall", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5) 
2158
-                deck.playAction("a_nose_stall", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2159
-                trucks.playAction("a_nose_stall", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5) 
2160
-                #print("nose_stall") 
2161
-            elif own['grindType'] == "tail_stall":
2162
-                skater.playAction("reg_tail_stall", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2163
-                deck.playAction("a_reg_tail_stall", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2164
-                trucks.playAction("a_reg_tail_stall", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2159
+                #own['requestAction'] = 'fak_noseslide'
2160
+                own['requestAction'] = 'reg_tailslide'
2161
+                
2162
+                
2163
+#            elif own['grindType'] == "nose_stall":
2164
+#                skater.playAction("nose_stall", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5) 
2165
+#                deck.playAction("a_nose_stall", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2166
+#                trucks.playAction("a_nose_stall", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5) 
2167
+#                #print("nose_stall") 
2168
+#            elif own['grindType'] == "tail_stall":
2169
+#                skater.playAction("reg_tail_stall", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2170
+#                deck.playAction("a_reg_tail_stall", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2171
+#                trucks.playAction("a_reg_tail_stall", 1,30, layer=700, blendin=gblend, play_mode=1, speed=.5)
2165 2172
                 #print("reg_tail_stall")                                 
2166 2173
             else:
2167 2174
                 if STANCE == 0:
@@ -4169,12 +4176,15 @@ def air_mover():
4169 4176
         own['air_mover'] = False 
4170 4177
         
4171 4178
         
4179
+
4172 4180
 framenum = own['framenum']
4173 4181
 last_ground_frame = own['lF_ground_frame']
4174 4182
 lF_air_frame = own['lF_air_frame']
4175 4183
 frames_since_ground = framenum - lF_air_frame               
4176 4184
 if framenum - lF_air_frame > 30:
4177
-    own['no_grind_pull'] = 0           
4185
+    own['no_grind_pull'] = 0
4186
+
4187
+                  
4178 4188
 #if grindHit == 1:
4179 4189
 #    skater.applyRotation([0,0,.05], False)
4180 4190
 #    deck.applyRotation([0,0,.05], False)

+ 32
- 9
grindV2.py View File

@@ -128,6 +128,7 @@ def main():
128 128
     else:
129 129
         convely = vely  
130 130
     def grindvect(obj):
131
+        STANCE = own['stance']
131 132
         if obj != None:
132 133
             grinder_e = obj.worldOrientation.to_euler()
133 134
             grinder_rotz = math.degrees(grinder_e[2])            
@@ -171,8 +172,30 @@ def main():
171 172
             grindvect = "pos" 
172 173
             grindyvect = "pos"
173 174
         if rot < -315: 
174
-            grindvect = "pos"         
175
-
175
+            grindvect = "pos"   
176
+        #                     
177
+        #print(grindvect, STANCE)
178
+        rot = round((rot * .01), 1)
179
+        rot *= 100
180
+        #print(rot)
181
+        
182
+        if (rot == 90 or rot == -270) and STANCE == True:
183
+            print("90 fak stance")
184
+            own['stance'] = 1
185
+            STANCE = 1
186
+        if (rot == 90 or rot == -270) and STANCE == False:
187
+            print("90 fak stance")
188
+            own['stance'] = 1
189
+            STANCE = 1
190
+        if (rot == -90 or rot == 270) and STANCE == True:
191
+            print("-90 reg stance")
192
+            own['stance'] = 0
193
+            STANCE = 0
194
+        if (rot == -90 or rot == 270) and STANCE == False:
195
+            print("-90 reg stance")                        
196
+            own['stance'] = 0
197
+            STANCE = 0
198
+        print("stance: ", STANCE)
176 199
     def grindrotvel(obj):        
177 200
         skipconst = 1
178 201
         #print("set jumponinit")              
@@ -234,7 +257,7 @@ def main():
234 257
             player.setLinearVelocity([0, convely, zvel], 1)   
235 258
             grindpos = "reg_board"     
236 259
             grindyvect = "pos"
237
-            print("bs1, don't switch")       
260
+            #print("bs1, don't switch")       
238 261
             #print("boardslide")
239 262
                            
240 263
         if rot >= 90 and rot < 135:  
@@ -249,7 +272,7 @@ def main():
249 272
             #player.applyForce([0, 0, 0], True)
250 273
             player.setLinearVelocity([0, convely, zvel], 1)
251 274
             grindpos = "reg_board"  
252
-            print("-bs2, don't switch?")          
275
+            #print("-bs2, don't switch?")          
253 276
             #print("boardslide") 
254 277
                      
255 278
         if rot >= 135 and rot < 180:
@@ -292,7 +315,7 @@ def main():
292 315
             player.setLinearVelocity([0, convely, zvel], 1)
293 316
             grindpos = "reg_board"   
294 317
             grindyvect = "neg"
295
-            print("-bs4")              
318
+            #print("-bs4")              
296 319
             #print("boardslide")
297 320
             
298 321
         if rot >= 315:
@@ -321,7 +344,7 @@ def main():
321 344
             #player.applyForce([0, 0, 0], True)
322 345
             player.setLinearVelocity([0, convely, zvel], 1)
323 346
             grindpos = "reg_board"   
324
-            print("-bs5")           
347
+            #print("-bs5")           
325 348
             #print("boardslide")
326 349
             
327 350
             grindyvect = "neg"
@@ -337,7 +360,7 @@ def main():
337 360
             player.setLinearVelocity([0, convely, zvel], 1)
338 361
             grindpos = "reg_board"  
339 362
             grindyvect = "pos"
340
-            print("bs6")           
363
+            #print("bs6")           
341 364
             #print("boardslide") 
342 365
                                            
343 366
         if rot < -135 and rot >= -180:
@@ -365,7 +388,7 @@ def main():
365 388
             player.setLinearVelocity([0, convely, zvel], 1)
366 389
             grindpos = "reg_board"   
367 390
             grindyvect = "neg"
368
-            print("-bs7")          
391
+            #print("-bs7")          
369 392
             #print("boardslide")            
370 393
         if rot < -270 and rot >= -315:
371 394
             #print(STANCE, "8")
@@ -378,7 +401,7 @@ def main():
378 401
             player.setLinearVelocity([0, convely, zvel], 1)
379 402
             grindpos = "reg_board"    
380 403
             grindyvect = "pos"
381
-            print("bs8")        
404
+            #print("bs8")        
382 405
             #print("boardslide")                                
383 406
         if rot < -315:
384 407
             player.alignAxisToVect(grinder_vect, 0, align_strength) 

Loading…
Cancel
Save