Browse Source

turn off jumpstance

shuvit 6 years ago
parent
commit
34e44114a8
2 changed files with 27 additions and 71 deletions
  1. 0
    5
      co_ActionState.py
  2. 27
    66
      controller2.py

+ 0
- 5
co_ActionState.py View File

@@ -1615,11 +1615,6 @@ def main():
1615 1615
                     trucks.playAction("a_reg", 10,30, layer=loop_layer, play_mode=1, speed=.5)  
1616 1616
 
1617 1617
 
1618
-
1619
-
1620
-
1621
-
1622
-
1623 1618
             if requestAction == 'frontside_tail_grab':
1624 1619
                 actionState = 'frontside_tail_grab'
1625 1620
                 if l_actionState != 'frontside_tail_grab':

+ 27
- 66
controller2.py View File

@@ -185,8 +185,8 @@ grablay = 600 #this plus 1
185 185
 fliplay = 470
186 186
 MAX_VEL = 6.7
187 187
 SPEEDUP = .055
188
-SPEEDPUMP = .13 #.09
189
-SPEEDPUMPFAST = .16 #.13
188
+SPEEDPUMP = .12 #.09
189
+SPEEDPUMPFAST = .14 #.13
190 190
 PUMP_SPEED_SENS = .4
191 191
 PUMP_SENS = .98
192 192
 ACCEL = 10
@@ -195,7 +195,7 @@ COUNTDOWN = 20 #pump and speed stuff
195 195
 JUMPHEIGHT = 800 #775#750
196 196
 JUMPSTRENGTH = 0
197 197
 own['flip_manual_stance'] = 0
198
-CAVEMAN_SPEED = .75
198
+#CAVEMAN_SPEED = .75
199 199
 LAND_LAYER = 100
200 200
 LAND_END = 20
201 201
 
@@ -378,48 +378,29 @@ def check_landing():
378 378
         #own["lastPump"] = False
379 379
         #own["Pump"] = False
380 380
     if lf_ground == False and r_ground.triggered == True:
381
-        #resetjumpstance()
382
-        #print(r_ground.hitObject)
383 381
         own['jump_from_trans'] = 0
384 382
         nearestObject = None
385 383
         minDist = None
386 384
         detectedObjects = grindDar2.hitObjectList
387
-        #if grindHit == False and gray.triggered == False and touched == False:
388 385
 
389
-#        if grindDar2.positive:
390
-#            for obj in detectedObjects:
391
-#                dist = own.getDistanceTo(obj)
392
-#                if (minDist is None or dist < minDist):
393
-#                    nearestObject = obj
394
-#                    minDist = dist                    
395
-#        if nearestObject != None and 'rail' in scene.objects[nearestObject]:
396
-#            cont.activate(own.actuators["landonrail"])
397
-#            print("landonrail***************")
398
-        #play landing sound
399 386
         if grindDar == 0:
400 387
             #print("you are not grinding", grindHit)
401 388
             lastheight = own["air_height"]
402 389
             pos = own.worldPosition.z
403 390
             dist = lastheight - pos
404 391
             dist = dist * 2
405
-            #print(dist, "-------------dist")
406
-            
392
+
407 393
             if dist > 1:
408 394
                 dist = 1
409 395
             own.actuators["land"].volume = dist 
410
-            #cont.deactivate(own.actuators["land"])
411 396
             sact = own.actuators["land"]
412 397
             sact.stopSound()   
413 398
             cont.activate(own.actuators["land"])
414 399
             own['land_sound'] = 1
415 400
         if grindDar == 1:
416 401
             pass
417
-            #cont.activate(own.actuators["landonrail"])    
418
-        #vibrate
419
-        #set_vibration(0, 0.3, 0.3)
420 402
         own["vib_Countdown"] = 14
421 403
         cont.activate(own.actuators["Vibration"])
422
-        #print("vibrate")
423 404
         if own['manual_v2'] == 0 and grindDar == 0:           
424 405
             if STANCE == 0:
425 406
                 own['requestAction'] = 'reg_land'
@@ -432,10 +413,7 @@ def check_landing():
432 413
     lf_ground = r_ground.triggered
433 414
     own["lF_ground"] = lf_ground
434 415
     vib_countdown = own["vib_Countdown"]
435
-    if vib_countdown == 0:
436
-        pass
437
-        #set_vibration(0, 0, 0)
438
-    elif vib_countdown > 0:
416
+    if vib_countdown > 0:
439 417
         vib_countdown = vib_countdown - 1
440 418
         own["vib_Countdown"] = vib_countdown
441 419
     if vib_countdown == 1:
@@ -470,7 +448,6 @@ if rUD < .04 and rUD > -.04:
470 448
     own['manual_v2_type'] = None
471 449
 if own['manual_v2'] == 1:    
472 450
     if own['last_manual_v2'] == 0:
473
-        #print("don't flip")
474 451
         if STANCE == 0:
475 452
             if rUD > .04 and rUD < .07:
476 453
                 #print("reg manual")
@@ -505,7 +482,7 @@ if own['manual_v2'] == 1:
505 482
                 own['manual_v2_type'] = 'fak nose manual'
506 483
             if own['manual_v2_type'] == 'reg nose manual':
507 484
                 own['manual_v2_type'] = 'fak manual'                                
508
-#print(own['manual_v2'], own['manual_v2_type'])    
485
+   
509 486
 #check manual
510 487
 ####
511 488
 #reg
@@ -522,15 +499,13 @@ if rUD <= .04 and (STANCE == 1 or STANCE == 0) and rUD >= -.04:
522 499
     #print("reg_man off2")   
523 500
 #####
524 501
 if own["reg_manual_timer"] > 10 and own["fak_manual"] == 0 and own['reg_nmanual'] == 0:
525
-#if own["reg_manual_timer"] > 10 and own["fak_manual"] == 0:
526
-    #if own['fak_nmanual'] == 0:
527 502
     own["reg_manual"] = 1
528 503
 ######
529 504
 if own["reg_manual_timer"] == 0:
530 505
     own["reg_manual"] = 0 
531 506
 if own['last_reg_manual'] == 1 and own['reg_manual'] == 0:
532
-    killall()   
533
-#print(own["reg_manual"])    
507
+    #killall()   
508
+    pass
534 509
       
535 510
 ####   
536 511
 #fak
@@ -548,7 +523,8 @@ if own["fak_manual_timer"] > 10 and own["reg_manual"] == 0:
548 523
 if own["fak_manual_timer"] == 0:
549 524
     own["fak_manual"] = 0 
550 525
 if own['last_fak_manual'] == 1 and own['fak_manual'] == 0:
551
-    killall()   
526
+    #killall() 
527
+    pass  
552 528
 #print(own["reg_manual"], own["fak_manual"])    
553 529
  
554 530
 #####
@@ -571,7 +547,8 @@ if own["reg_nmanual_timer"] > 10 and own["fak_nmanual"] == 0 and own['reg_manual
571 547
 if own["reg_nmanual_timer"] == 0:
572 548
     own["reg_nmanual"] = 0 
573 549
 if own['last_reg_nmanual'] == 1 and own['reg_nmanual'] == 0:
574
-    killall()   
550
+    pass
551
+    #killall()   
575 552
  
576 553
 #####
577 554
 #fak nmanual
@@ -592,7 +569,8 @@ if own["fak_nmanual_timer"] == 0 and own['reg_manual'] == 0:
592 569
     #if own['flip_manual_stance'] == 0:
593 570
     own["fak_nmanual"] = 0 
594 571
 if own['last_fak_nmanual'] == 1 and own['fak_nmanual'] == 0:
595
-    killall()   
572
+    #killall() 
573
+    pass  
596 574
 
597 575
 
598 576
 #print("rm ", own["reg_manual"], "rnm ", own["reg_nmanual"], "fm ", own["fak_manual"], "fnm ", own["fak_nmanual"])
@@ -932,7 +910,7 @@ def jump():
932 910
             own["jump_stance"] = 1
933 911
         if STANCE == False:
934 912
             own["jump_stance"] = 0        
935
-        #own["jump_stance"] = own["stance"]
913
+        own["jump_stance"] = own["stance"]
936 914
         if grindHit == True:
937 915
             own['grind_jump'] = 1
938 916
             if lLR > turnsens or lLR < -turnsens or lUD > turnsens or lUD < -turnsens:
@@ -2452,14 +2430,14 @@ def air_pos():
2452 2430
     grindpos = own['grindpos']
2453 2431
     GRAB_ON = own["GRAB_ON"]
2454 2432
     wr = own["wallride"]
2455
-    if rUD > .040 and r_ground.triggered == False and GRAB_ON == False and wr == None and jump_timer < 50:
2433
+    if rUD > .040 and r_ground.triggered == False and GRAB_ON == False and wr == None and jump_timer < 40:
2456 2434
         killact(2)
2457 2435
         killact(4)
2458 2436
         if STANCE == 0:
2459 2437
             own['requestAction'] = 'reg_air_tail'    
2460 2438
         else:
2461 2439
             own['requestAction'] = 'fak_air_tail' 
2462
-    elif rUD < -.040 and r_ground.triggered == False and GRAB_ON == False and wr == None and jump_timer < 50:
2440
+    elif rUD < -.040 and r_ground.triggered == False and GRAB_ON == False and wr == None and jump_timer < 40:
2463 2441
         killact(2)
2464 2442
         killact(4)
2465 2443
         if STANCE == 0:
@@ -2986,8 +2964,7 @@ if rUD < -0.020:
2986 2964
                         grindtype("reg_nosegR")
2987 2965
                     elif rLR < -.02:
2988 2966
                         grindtype("reg_nosegL")    
2989
-                    else:
2990
-                        #print("gtype reg_nosegR")    
2967
+                    else:   
2991 2968
                         grindtype("reg_noseg")
2992 2969
                 if jumpstance == 1:
2993 2970
                     if rLR > .02:
@@ -3012,7 +2989,6 @@ if rUD < -0.020:
3012 2989
                     else:    
3013 2990
                         grindtype("fak_noseg")        
3014 2991
         elif grindpos == "reg_board":
3015
-            #print("nose something")
3016 2992
             if jumpstance != 3:
3017 2993
                 if jumpstance == 0:
3018 2994
                     grindtype("reg_noseslide")    
@@ -3032,8 +3008,6 @@ if rUD > -0.020 and rUD <= .020 and LAST_GRIND == False:
3032 3008
     if own['grindpos'] == 'fak_5050':
3033 3009
         grindtype("fak_5050")
3034 3010
         
3035
-    
3036
-   
3037 3011
 if q1oncd > 0:
3038 3012
     q1on = 0
3039 3013
     q1oncd = q1oncd - 1
@@ -3294,11 +3268,7 @@ if q8oncd > 0 and q1oncd > 0 and q2oncd > 0 and q8oncd <= q1oncd <= q2oncd and q
3294 3268
 # 3 > 4 > 5 >6 > 7
3295 3269
 
3296 3270
 # fs 360 shovit
3297
-# 7 > 6 > 5 > 4 > 3
3298
-
3299
-
3300
-
3301
-     
3271
+# 7 > 6 > 5 > 4 > 3     
3302 3272
 
3303 3273
 def hippy_jump():
3304 3274
     STANCE = own["stance"]
@@ -3506,23 +3476,20 @@ def invert():
3506 3476
         if lBump == 1:
3507 3477
             #print("invert")
3508 3478
         #if coping_on ==1 and lBump == 1:
3509
-            print("IIIIIINVVERT")   
3479
+            print("invert")   
3510 3480
             own['invert_on'] = 1
3511 3481
             own.setLinearVelocity([0,0,0],0)
3512 3482
     if own["coping"] == 1 and invert_on == 1:
3513
-        # killact(25)
3514
-        # killact(24)
3515 3483
         if own['invert_on'] == 1 and own['last_invert'] == False:
3516 3484
             #killall()
3517 3485
             cont.activate(own.actuators['invertOn_sound'])
3518
-            
3519
-            # if STANCE == False:
3520
-            #     own['invert_type'] = "reg_back_invert_in"
3486
+            if STANCE == False:
3487
+                own['invert_type'] = "reg_back_invert_in"
3521 3488
             #     skater.playAction("reg_back_invert_in", 10,30, layer=303, play_mode=0, speed=1) 
3522 3489
             #     deck.playAction("a_reg_back_invert_in", 10,30, layer=303, play_mode=0, speed=1)
3523 3490
             #     trucks.playAction("a_reg_back_invert_in", 10,30, layer=303, play_mode=0, speed=1) 
3524
-            # if STANCE == True:
3525
-            #     own['invert_type'] = "fak_fr_invert"
3491
+            if STANCE == True:
3492
+                own['invert_type'] = "fak_fr_invert"
3526 3493
             #     skater.playAction("fak_fr_invert", 10,30, layer=303, play_mode=0, speed=1) 
3527 3494
             #     deck.playAction("a_fak_fr_invert", 10,30, layer=303, play_mode=0, speed=1)
3528 3495
             #     trucks.playAction("a_fak_fr_invert", 10,30, layer=303, play_mode=0, speed=1)                           
@@ -3625,8 +3592,7 @@ def ylimit():
3625 3592
         newy = linVelocity4.y * .8 #.4    
3626 3593
         force = [linVelocity4.x, newy, linVelocity4.z]
3627 3594
         own.setLinearVelocity(force, True)   
3628
-        #print("limitting y")       
3629
-#        own["linVely"] = linVelocity.y 
3595
+
3630 3596
 def getoffboard():
3631 3597
     lasty = own['lasty']
3632 3598
     getoffboard = own['getoffboard']
@@ -4119,15 +4085,12 @@ def grind_turn():
4119 4085
                 if STANCE == False:
4120 4086
                     own.applyForce([-bsforce, 0, 0], True)
4121 4087
                 own.applyMovement([-bs_dloc,0,0], True)                                             
4122
-                                                       
4123
-    #print("setting linvel", own.linearVelocity, outvel)                     
4088
+                                                                          
4124 4089
     if own['gt_cd2'] > 0:
4125 4090
         own['gt_cd2'] -= 1
4126 4091
     if own['gt_cd2'] == 0:    
4127 4092
         own['grind_out_type'] = None 
4128
-#print(own['grind_out_type'])                       
4129
-             
4130
-#print(own["gt_cd"])
4093
+
4131 4094
 if own["grindoutturn"] > 0:
4132 4095
     own["grindoutturn"] = own["grindoutturn"] - 1
4133 4096
     
@@ -4212,8 +4175,6 @@ def wallride_sound():
4212 4175
 if own['revert_timer'] > 0:
4213 4176
     own['revert_timer'] = own['revert_timer'] - 1 
4214 4177
     
4215
-              
4216
-    
4217 4178
 def shutoff_timers():
4218 4179
     #print(wallride)
4219 4180
     if (LAST_GRIND == False and grindHit == True) or (jump_timer > 10 and own['wallride'] == None):

Loading…
Cancel
Save