|
@@ -788,21 +788,21 @@ def main():
|
788
|
788
|
reg_nmanual_on()
|
789
|
789
|
if own["Pump"] == False:
|
790
|
790
|
|
791
|
|
- if lLR < -turnsens and STANCE == 0:
|
|
791
|
+ if (lLR < -turnsens or dict['kb_la'] == 2) and STANCE == 0:
|
792
|
792
|
reg_stance_left_on()
|
793
|
|
- if lLR > -turnsens or LAST_GRIND != grindHit:
|
|
793
|
+ if lLR > -turnsens or LAST_GRIND != grindHit or dict['kb_la'] == 0:
|
794
|
794
|
reg_stance_left_off()
|
795
|
|
- if lLR > turnsens and STANCE == 0:
|
|
795
|
+ if (lLR > turnsens or dict['kb_ra'] == 2) and STANCE == 0:
|
796
|
796
|
reg_stance_right_on()
|
797
|
|
- if lLR < turnsens or LAST_GRIND != grindHit:
|
|
797
|
+ if lLR < turnsens or LAST_GRIND != grindHit or dict['kb_ra'] == 0:
|
798
|
798
|
reg_stance_right_off()
|
799
|
|
- if lLR < -turnsens and STANCE == 1:
|
|
799
|
+ if (lLR < -turnsens or dict['kb_la'] == 2) and STANCE == 1:
|
800
|
800
|
fak_stance_left_on()
|
801
|
|
- if lLR > -turnsens or LAST_GRIND != grindHit:
|
|
801
|
+ if lLR > -turnsens or LAST_GRIND != grindHit or dict['kb_la'] == 0:
|
802
|
802
|
fak_stance_left_off()
|
803
|
|
- if lLR > turnsens and STANCE == 1:
|
|
803
|
+ if (lLR > turnsens or dict['kb_ra'] == 2) and STANCE == 1:
|
804
|
804
|
fak_stance_right_on()
|
805
|
|
- if lLR < turnsens or LAST_GRIND != grindHit:
|
|
805
|
+ if lLR < turnsens or LAST_GRIND != grindHit or dict['kb_ra'] == 0:
|
806
|
806
|
fak_stance_right_off()
|
807
|
807
|
#air
|
808
|
808
|
playing = deck.isPlayingAction(fliplay)
|
|
@@ -1945,7 +1945,7 @@ def main():
|
1945
|
1945
|
if STANCE == 1:
|
1946
|
1946
|
own.setLinearVelocity([linVelocity2.x + speed, linVelocity2.y, linVelocity2.z], 1)
|
1947
|
1947
|
#medium
|
1948
|
|
- if lLR > (turnsens * 1.3) and (grindHit == False or (manual == 1 and grindHit == True)):
|
|
1948
|
+ if (lLR > (turnsens * 1.3) or dict['kb_ra'] == 2) and (grindHit == False or (manual == 1 and grindHit == True)):
|
1949
|
1949
|
#turn left
|
1950
|
1950
|
if rot.z < .4:
|
1951
|
1951
|
rotation = [ 0.0, 0.0, (-rotamt * 5)]
|
|
@@ -1961,7 +1961,7 @@ def main():
|
1961
|
1961
|
own.setLinearVelocity([linVelocity2.x - speed, linVelocity2.y, linVelocity2.z], 1)
|
1962
|
1962
|
if STANCE == 1:
|
1963
|
1963
|
own.setLinearVelocity([linVelocity2.x + speed, linVelocity2.y, linVelocity2.z], 1)
|
1964
|
|
- if lLR < (-turnsens * 1.3) and (grindHit == False or (manual == 1 and grindHit == True)):
|
|
1964
|
+ if (lLR < (-turnsens * 1.3) or dict['kb_la'] == 2) and (grindHit == False or (manual == 1 and grindHit == True)):
|
1965
|
1965
|
#turn right
|
1966
|
1966
|
if rot.z < .4:
|
1967
|
1967
|
rotation = [ 0.0, 0.0, (rotamt * 5)]
|
|
@@ -1979,13 +1979,13 @@ def main():
|
1979
|
1979
|
own.setLinearVelocity([linVelocity2.x + speed, linVelocity2.y, linVelocity2.z], 1)
|
1980
|
1980
|
|
1981
|
1981
|
#air
|
1982
|
|
- if r_ground.triggered == False and lLR > turnsens and (grindHit == False or (manual == 1 and grindHit == True)) and own["wallride"] == None:
|
|
1982
|
+ if r_ground.triggered == False and (lLR > turnsens or dict['kb_ra'] == 2) and (grindHit == False or (manual == 1 and grindHit == True)) and own["wallride"] == None:
|
1983
|
1983
|
rotamt = .07
|
1984
|
1984
|
if STANCE == 0:
|
1985
|
1985
|
own.applyRotation([0,0,-rotamt], 1)
|
1986
|
1986
|
if STANCE == 1:
|
1987
|
1987
|
own.applyRotation([0,0,-rotamt], 1)
|
1988
|
|
- if r_ground.triggered == False and lLR < -turnsens and (grindHit == False or (manual == 1 and grindHit == True)) and own["wallride"] == None:
|
|
1988
|
+ if r_ground.triggered == False and (lLR < -turnsens or dict['kb_la'] == 2) and (grindHit == False or (manual == 1 and grindHit == True)) and own["wallride"] == None:
|
1989
|
1989
|
rotamt = .07
|
1990
|
1990
|
if STANCE == 0:
|
1991
|
1991
|
own.applyRotation([0,0,rotamt], 1)
|
|
@@ -2893,15 +2893,16 @@ def main():
|
2893
|
2893
|
q4oncd = q4oncd - 1
|
2894
|
2894
|
own["Q4oncd"] = q4oncd
|
2895
|
2895
|
#q5
|
2896
|
|
- if rUD > .070:
|
|
2896
|
+ if rUD > .070 or dict['kb_space'] == 2:
|
2897
|
2897
|
if q4on == 0 and q6on == 0:
|
2898
|
2898
|
#print("q5on")
|
2899
|
2899
|
q5on = 1
|
2900
|
2900
|
q5oncd = countdown
|
2901
|
2901
|
own["Q5oncd"] = q5oncd
|
2902
|
2902
|
oposin()
|
|
2903
|
+ print('oposin')
|
2903
|
2904
|
ground_since = own["framenum"] - own['lF_air_frame']
|
2904
|
|
- 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) and ground_since > 10:
|
|
2905
|
+ if ((rTrig > 0.02 or dict['kb_lsh'] == 2) and GRAB_ON == False and r_ground.triggered == 1) or (lTrig > 0.02 and GRAB_ON == False and r_ground.triggered == 1) and ground_since > 10:
|
2905
|
2906
|
pump()
|
2906
|
2907
|
else:
|
2907
|
2908
|
own["lastPump"] = False
|
|
@@ -3060,6 +3061,21 @@ def main():
|
3060
|
3061
|
q3oncd = q3oncd - 1
|
3061
|
3062
|
own["Q3oncd"] = q3oncd
|
3062
|
3063
|
|
|
3064
|
+
|
|
3065
|
+###keyboard fliptricks
|
|
3066
|
+ if dict['kb_space'] == 3:
|
|
3067
|
+ if dict['kb_a'] == 2:
|
|
3068
|
+ kickflip()
|
|
3069
|
+ elif dict['kb_d'] == 2:
|
|
3070
|
+ heelflip()
|
|
3071
|
+ elif dict['kb_w'] == 2:
|
|
3072
|
+ fsshuvit()
|
|
3073
|
+ elif dict['kb_s'] == 2:
|
|
3074
|
+ shuvit()
|
|
3075
|
+ else:
|
|
3076
|
+ aollie()
|
|
3077
|
+
|
|
3078
|
+
|
3063
|
3079
|
##########################################
|
3064
|
3080
|
#trick calls
|
3065
|
3081
|
##########################################
|
|
@@ -3449,8 +3465,9 @@ def main():
|
3449
|
3465
|
own['hippy'] = 1
|
3450
|
3466
|
|
3451
|
3467
|
hippy_jump()
|
3452
|
|
- if since_a > cush and aBut == 1 and lasta == 1 and (lTrig < 0.02 and rTrig < 0.02) and own['last_hippy'] == 0:
|
3453
|
|
- if xBut == 0 and hippy == 0 and lastaBut_ground == True:
|
|
3468
|
+ if ((since_a > cush and aBut == 1 and lasta == 1) or dict['kb_ua'] == 2) and (lTrig < 0.02 and rTrig < 0.02) and own['last_hippy'] == 0:
|
|
3469
|
+ print('push')
|
|
3470
|
+ if xBut == 0 and hippy == 0 and (lastaBut_ground == True or dict['kb_ua'] == 2):
|
3454
|
3471
|
push()
|
3455
|
3472
|
if since_x > cush and xBut == 1 and lastx == 1 and (lTrig < 0.02 and rTrig < 0.02) and own['last_hippy'] == 0:
|
3456
|
3473
|
if aBut == 0 and hippy == 0 and lastxBut_ground == True:
|
|
@@ -3482,7 +3499,7 @@ def main():
|
3482
|
3499
|
####
|
3483
|
3500
|
|
3484
|
3501
|
#y button
|
3485
|
|
- if own['lasty'] == 1 and yBut ==0:
|
|
3502
|
+ if (own['lasty'] == 1 and yBut ==0) or dict['kb_q'] == 3:
|
3486
|
3503
|
offboard()
|
3487
|
3504
|
|
3488
|
3505
|
if own["GRAB_ON"] == True:
|
|
@@ -3680,7 +3697,7 @@ def main():
|
3680
|
3697
|
getoffboard = own['getoffboard']
|
3681
|
3698
|
if getoffboard == 1 and own['fall'] == False:
|
3682
|
3699
|
own['getoffboard'] = 0
|
3683
|
|
- if yBut == False and lasty == True:
|
|
3700
|
+ if (yBut == False and lasty == True) or dict['kb_q'] == 3:
|
3684
|
3701
|
own['getoffboard'] = 1
|
3685
|
3702
|
|
3686
|
3703
|
def switchcam():
|
|
@@ -4002,7 +4019,7 @@ def main():
|
4002
|
4019
|
if 'reg' in own['l_actionState']:
|
4003
|
4020
|
STANCE = 0
|
4004
|
4021
|
if own['grindpos'] == 'reg_5050':
|
4005
|
|
- if lq3on == 1 or lq2on:
|
|
4022
|
+ if lq3on == 1 or lq2on or dict['kb_ra'] == 2:
|
4006
|
4023
|
if own['gt_cd2'] == 0:
|
4007
|
4024
|
own['gt_cd2'] = 60
|
4008
|
4025
|
|
|
@@ -4013,7 +4030,7 @@ def main():
|
4013
|
4030
|
if own['grind_out_type'] == None:
|
4014
|
4031
|
own['grind_out_type'] = 'reg right'
|
4015
|
4032
|
own["grindoutturn"] = gotcd
|
4016
|
|
- if lq7on == 1 or lq8on:
|
|
4033
|
+ if lq7on == 1 or lq8on or dict['kb_la'] == 2:
|
4017
|
4034
|
if own['gt_cd2'] == 0:
|
4018
|
4035
|
own['gt_cd2'] = 60
|
4019
|
4036
|
if STANCE == True:
|
|
@@ -4048,7 +4065,7 @@ def main():
|
4048
|
4065
|
outvel = own.getLinearVelocity(1)
|
4049
|
4066
|
outact.dLoc = [0, 0, 0]
|
4050
|
4067
|
outact.dRot = [0, 0, 0]
|
4051
|
|
- if lq5on == 1:
|
|
4068
|
+ if lq5on == 1 or dict['kb_da'] == 2:
|
4052
|
4069
|
if own['gt_cd2'] == 0:
|
4053
|
4070
|
own['gt_cd2'] = 60
|
4054
|
4071
|
if STANCE == True:
|
|
@@ -4065,7 +4082,7 @@ def main():
|
4065
|
4082
|
own['grind_out_type'] = 'bs reg back'
|
4066
|
4083
|
own["grindoutturn"] = gotcd
|
4067
|
4084
|
own['invert_on'] = 0
|
4068
|
|
- if lq1on == 1:
|
|
4085
|
+ if lq1on == 1 or dict['kb_ua'] == 2:
|
4069
|
4086
|
if own['gt_cd2'] == 0:
|
4070
|
4087
|
own['gt_cd2'] = 60
|
4071
|
4088
|
if STANCE == True:
|