Browse Source

breaking things

shuvit 6 years ago
parent
commit
5d3d7c507f
3 changed files with 104 additions and 52 deletions
  1. 77
    32
      co_ActionState.py
  2. 21
    14
      controller2.py
  3. 6
    6
      grindV2.py

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


+ 21
- 14
controller2.py View File

@@ -367,7 +367,7 @@ else:
367 367
         own['requestAction'] = 'fak_roll'
368 368
 
369 369
 #check manual_v2
370
-if (rUD > .04 and rUD < .07) or (rUD < -.04 and rUD > -.07):
370
+if (rUD > .03 and rUD < .08) or (rUD < -.03 and rUD > -.08):
371 371
 #if (rUD > .04 and rUD < .07):
372 372
     #print("zoned")    
373 373
     timer = own['manual_v2_timer']
@@ -419,14 +419,14 @@ if own['manual_v2'] == 1:
419 419
 #check manual
420 420
 ####
421 421
 #reg
422
-if rUD > .04 and rUD < .07 and STANCE == 0 and rLR < .035 and rLR > -.035:
422
+if rUD > .03 and rUD < .08 and STANCE == 0 and rLR < .035 and rLR > -.035:
423 423
     timer = own["reg_manual_timer"]
424 424
     timer = timer + 1
425 425
     own["reg_manual_timer"] = timer
426 426
     if timer > 20 and rUD < .04:
427 427
         own["reg_manual"] = 0
428 428
         #print("reg_man off")
429
-if rUD <= .04 and (STANCE == 1 or STANCE == 0) and rUD >= -.04:
429
+if rUD <= .03 and (STANCE == 1 or STANCE == 0) and rUD >= -.04:
430 430
     own["reg_manual_timer"] = 0
431 431
     own["reg_manual"] = 0 
432 432
     #print("reg_man off2")   
@@ -442,13 +442,13 @@ if own['last_reg_manual'] == 1 and own['reg_manual'] == 0:
442 442
       
443 443
 ####   
444 444
 #fak
445
-if rUD > .04 and rUD < .07 and STANCE == 1 and rLR < .035 and rLR > -.035:
445
+if rUD > .03 and rUD < .08 and STANCE == 1 and rLR < .035 and rLR > -.035:
446 446
     timer = own["fak_manual_timer"]
447 447
     timer = timer + 1
448 448
     own["fak_manual_timer"] = timer
449 449
     if timer > 20:
450 450
         own["fak_manual"] = 0
451
-if rUD <= .04 and (STANCE == 1 or STANCE == 0) and rUD >= -.04:
451
+if rUD <= .03 and (STANCE == 1 or STANCE == 0) and rUD >= -.04:
452 452
     own["fak_manual_timer"] = 0
453 453
     own["fak_manual"] = 0
454 454
 if own["fak_manual_timer"] > 10 and own["reg_manual"] == 0:
@@ -462,13 +462,13 @@ if own['last_fak_manual'] == 1 and own['fak_manual'] == 0:
462 462
  
463 463
 #####
464 464
 #reg nmanual
465
-if rUD < -.04 and rUD > -.07 and STANCE == 0 and rLR < .035 and rLR > -.035:
465
+if rUD < -.03 and rUD > -.08 and STANCE == 0 and rLR < .035 and rLR > -.035:
466 466
     timer = own["reg_nmanual_timer"]
467 467
     timer = timer + 1
468 468
     own["reg_nmanual_timer"] = timer
469 469
     if timer > 20:
470 470
         own["reg_nmanual"] = 0
471
-if rUD >= -.04 and (STANCE == 1 or STANCE == 0) and rUD <= .04:
471
+if rUD >= -.03 and (STANCE == 1 or STANCE == 0) and rUD <= .04:
472 472
     own["reg_nmanual_timer"] = 0
473 473
     own["reg_nmanual"] = 0
474 474
 
@@ -486,13 +486,13 @@ if own['last_reg_nmanual'] == 1 and own['reg_nmanual'] == 0:
486 486
 #####
487 487
 #fak nmanual
488 488
 #print (rUD)
489
-if rUD < -.04 and rUD > -.07 and STANCE == 1 and rLR < .035 and rLR > -.035:
489
+if rUD < -.03 and rUD > -.08 and STANCE == 1 and rLR < .035 and rLR > -.035:
490 490
     timer = own["fak_nmanual_timer"]
491 491
     timer = timer + 1
492 492
     own["fak_nmanual_timer"] = timer
493 493
     if timer > 20:
494 494
         own["fak_nmanual"] = 0
495
-if rUD >= -.04 and (STANCE == 1 or STANCE == 0) and rUD <= .04:
495
+if rUD >= -.03 and (STANCE == 1 or STANCE == 0) and rUD <= .04:
496 496
     own["fak_nmanual_timer"] = 0
497 497
     own["fak_nmanual"] = 0
498 498
     #print('@@@@@@@@@fak_man_off_1')
@@ -2371,20 +2371,25 @@ def air_pos():
2371 2371
     grindpos = own['grindpos']
2372 2372
     GRAB_ON = own["GRAB_ON"]
2373 2373
     wr = own["wallride"]
2374
-    if rUD > .040 and r_ground.triggered == False and GRAB_ON == False and wr == None and jump_timer < 20:
2374
+    jump_timer = own['jump_timer']
2375
+    if rUD > .040 and r_ground.triggered == False and GRAB_ON == False and wr == None and jump_timer < 30:
2375 2376
         killact(2)
2376 2377
         killact(4)
2377 2378
         if STANCE == 0:
2378
-            own['requestAction'] = 'reg_air_tail'    
2379
+            own['requestAction'] = 'reg_air_tail'
2380
+            print("reg_air_tail")    
2379 2381
         else:
2380 2382
             own['requestAction'] = 'fak_air_tail' 
2381
-    elif rUD < -.040 and r_ground.triggered == False and GRAB_ON == False and wr == None and jump_timer < 20:
2383
+            print("fak_air_tail")
2384
+    elif rUD < -.040 and r_ground.triggered == False and GRAB_ON == False and wr == None and jump_timer < 30:
2382 2385
         killact(2)
2383 2386
         killact(4)
2384 2387
         if STANCE == 0:
2385 2388
             own['requestAction'] = 'reg_air_nose' 
2389
+            print("reg_air_nose")
2386 2390
         else:
2387 2391
             own['requestAction'] = 'fak_air_nose' 
2392
+            print("fak_air_nose")
2388 2393
 
2389 2394
 def air_turn_boost():
2390 2395
     pass
@@ -4260,5 +4265,7 @@ if r_ground.triggered and own["jump_timer"] < 20:
4260 4265
     force2 = [0.0, 0, -10]
4261 4266
     own.applyForce(force2, True)
4262 4267
 #print('grindtouch = ',  own['grindTouch'])
4263
-if grindDar == False and r_ground.triggered and own['grindTouch'] == False:
4264
-    own['grindType'] = ''
4268
+if (grindDar == False and r_ground.triggered and own['grindTouch'] == False) or own['jump_timer'] > 40:
4269
+    own['grindType'] = ''
4270
+    
4271
+#print(own['grindType'])    

+ 6
- 6
grindV2.py View File

@@ -180,22 +180,22 @@ def main():
180 180
         #print(rot)
181 181
         
182 182
         if (rot == 90 or rot == -270) and STANCE == True:
183
-            print("90 fak stance")
183
+            #print("90 fak stance")
184 184
             own['stance'] = 1
185 185
             STANCE = 1
186 186
         if (rot == 90 or rot == -270) and STANCE == False:
187
-            print("90 fak stance")
187
+            #print("90 fak stance")
188 188
             own['stance'] = 1
189 189
             STANCE = 1
190 190
         if (rot == -90 or rot == 270) and STANCE == True:
191
-            print("-90 reg stance")
191
+            #print("-90 reg stance")
192 192
             own['stance'] = 0
193 193
             STANCE = 0
194 194
         if (rot == -90 or rot == 270) and STANCE == False:
195
-            print("-90 reg stance")                        
195
+            #print("-90 reg stance")                        
196 196
             own['stance'] = 0
197 197
             STANCE = 0
198
-        print("stance: ", STANCE)
198
+        #print("stance: ", STANCE)
199 199
     def grindrotvel(obj):        
200 200
         skipconst = 1
201 201
         #print("set jumponinit")              
@@ -609,7 +609,7 @@ def main():
609 609
 
610 610
         #grind
611 611
         #print(dist)
612
-        if dist < grind_dist and dropin == 0 and grind_jump == 0 and manual == 0 and no_grind == 0 and own['airup'] == 0 and own['grindoutturn'] == 0 and own['grindjumpturn'] == 0 and own['manual'] == 0 and own['gt_cd2'] < 50 and invert_on == False and own['air_mover'] == False and no_grind_pull == 0:
612
+        if dist < grind_dist and dropin == 0 and grind_jump == 0 and manual == 0 and no_grind == 0 and own['airup'] == 0 and own['grindoutturn'] == 0 and own['grindjumpturn'] == 0 and own['manual'] == 0 and own['gt_cd2'] < 55 and invert_on == False and own['air_mover'] == False and no_grind_pull == 0:
613 613
             #print("grind")    
614 614
             hitObject, hitPoint, hitNormal = own.rayCast(nearestObject.worldPosition, own.worldPosition, .0, 'grind')
615 615
             if grindold == 0:

Loading…
Cancel
Save