|
@@ -199,62 +199,6 @@ own['flip_manual_stance'] = 0
|
199
|
199
|
LAND_LAYER = 100
|
200
|
200
|
LAND_END = 20
|
201
|
201
|
|
202
|
|
-#Sensor logic bricks connected to the python Controller
|
203
|
|
-#aXis = cont.sensors["sControla"]
|
204
|
|
-#bUtt = cont.sensors["sControlb"]
|
205
|
|
-
|
206
|
|
-#onW = onWindows()
|
207
|
|
-
|
208
|
|
-## windows stuff
|
209
|
|
-#lar_lts = 0
|
210
|
|
-#uad_lts = 1
|
211
|
|
-#lar_rts = 2 if onW else 2
|
212
|
|
-#uad_rts = 3 if onW else 3
|
213
|
|
-#lt = 4 if onW else 4
|
214
|
|
-#rt = 5 if onW else 5
|
215
|
|
-
|
216
|
|
-# These are the numerical values associated with the buttons on the Xbox Controller
|
217
|
|
-# Called with - SensorName.getButtonStatus(buttonnumber) -
|
218
|
|
-# A joystick sensor logic brick (with the 'Button' Event Type; 'All Events' selected; and 'Tap' enabled) must be connected to the Python Controller logic brick to call these buttons
|
219
|
|
-
|
220
|
|
-#a_but = 0 if onW else 0
|
221
|
|
-#b_but = 1 if onW else 1
|
222
|
|
-#x_but = 2 if onW else 2
|
223
|
|
-#y_but = 3 if onW else 3
|
224
|
|
-#l_bump = 9 if onW else 9
|
225
|
|
-#r_bump = 10 if onW else 10
|
226
|
|
-#bk_but = 4 if onW else 4
|
227
|
|
-#st_but = 6 if onW else 6
|
228
|
|
-#xb_but = 5 if onW else 5
|
229
|
|
-#lts_pr = 7 if onW else 7
|
230
|
|
-#rts_pr = 8 if onW else 8
|
231
|
|
-#l_dp = 13 if onW else 13
|
232
|
|
-#r_dp = 14 if onW else 14
|
233
|
|
-#u_dp = 11 if onW else 11
|
234
|
|
-#d_dp = 12 if onW else 12
|
235
|
|
-
|
236
|
|
-#lLR = aXis.axisValues[lar_lts] / reduction
|
237
|
|
-#lUD = aXis.axisValues[uad_lts] / reduction
|
238
|
|
-#rLR = aXis.axisValues[lar_rts] / reduction
|
239
|
|
-#rUD = aXis.axisValues[uad_rts] / reduction
|
240
|
|
-#lTrig = aXis.axisValues[lt] / reduction
|
241
|
|
-#rTrig = aXis.axisValues[rt] / reduction
|
242
|
|
-#aBut = bUtt.getButtonStatus(a_but)
|
243
|
|
-#bBut = bUtt.getButtonStatus(b_but)
|
244
|
|
-#xBut = bUtt.getButtonStatus(x_but)
|
245
|
|
-#yBut = bUtt.getButtonStatus(y_but)
|
246
|
|
-#lBump = bUtt.getButtonStatus(l_bump)
|
247
|
|
-#rBump = bUtt.getButtonStatus(r_bump)
|
248
|
|
-#bkBut = bUtt.getButtonStatus(bk_but)
|
249
|
|
-#stBut = bUtt.getButtonStatus(st_but)
|
250
|
|
-#xbBut = bUtt.getButtonStatus(xb_but)
|
251
|
|
-#ltsBut = bUtt.getButtonStatus(lts_pr)
|
252
|
|
-#rtsBut = bUtt.getButtonStatus(rts_pr)
|
253
|
|
-#ldPad = bUtt.getButtonStatus(l_dp)
|
254
|
|
-#rdPad = bUtt.getButtonStatus(r_dp)
|
255
|
|
-#udPad = bUtt.getButtonStatus(u_dp)
|
256
|
|
-#ddPad = bUtt.getButtonStatus(d_dp)
|
257
|
|
-
|
258
|
202
|
lLR = dict['lLR']
|
259
|
203
|
lUD = dict['lUD']
|
260
|
204
|
rLR = dict['rLR']
|
|
@@ -277,22 +221,6 @@ rdPad = dict['rdPad']
|
277
|
221
|
udPad = dict['udPad']
|
278
|
222
|
ddPad = dict['ddPad']
|
279
|
223
|
|
280
|
|
-
|
281
|
|
-## -End- ##
|
282
|
|
-#list = bUtt.getButtonActiveList()
|
283
|
|
-#print(list)
|
284
|
|
-
|
285
|
|
-#no input
|
286
|
|
-#def cutOff():
|
287
|
|
-#
|
288
|
|
-# if (abs(lLR) < axisTh
|
289
|
|
-# and abs(lUD) < axisTh
|
290
|
|
-# and abs(rLR) < axisTh
|
291
|
|
-# and abs(rUD) < axisTh
|
292
|
|
-# and aBut == False):
|
293
|
|
-#
|
294
|
|
-# return True
|
295
|
|
-
|
296
|
224
|
#fliptricks after manuals
|
297
|
225
|
if (frame - own['last_manual_frame']) < 25:
|
298
|
226
|
flip_start_lay = 8
|
|
@@ -354,15 +282,7 @@ def killall():
|
354
|
282
|
for x in range(9000):
|
355
|
283
|
skater.stopAction(x)
|
356
|
284
|
deck.stopAction(x)
|
357
|
|
- trucks.stopAction(x)
|
358
|
|
-
|
359
|
|
-def grind_stance():
|
360
|
|
- #own["last_grind_stance"] = own["grind_stance"]
|
361
|
|
-# if grindHit == 1 and LAST_GRIND == 1 and (own['grindCountdown'] < 15 or own['grindCountdown'] >19):
|
362
|
|
-# own["last_grind_stance"] = own["grind_stance"]
|
363
|
|
- #own["grind_stance"] = STANCE
|
364
|
|
- pass
|
365
|
|
-grind_stance()
|
|
285
|
+ trucks.stopAction(x)
|
366
|
286
|
|
367
|
287
|
def reset_rtimers():
|
368
|
288
|
own["Q1oncd"] = 0
|
|
@@ -392,27 +312,18 @@ def check_fall():
|
392
|
312
|
check_fall()
|
393
|
313
|
def check_landing():
|
394
|
314
|
lf_ground = own["lF_ground"]
|
395
|
|
- #zvel = own.getLinearVelocity
|
396
|
|
- #print(zvel)
|
397
|
315
|
STANCE = own["stance"]
|
398
|
|
- #if lf_ground == False and r_ground.triggered == True and grindDar == 0:
|
399
|
316
|
playing_action_frame = skater.getActionFrame(LAND_LAYER)
|
400
|
|
- #if playing_action_frame < (LAND_END):
|
401
|
|
- #own["lastPump"] = False
|
402
|
|
- #own["Pump"] = False
|
403
|
317
|
if lf_ground == False and r_ground.triggered == True:
|
404
|
318
|
own['jump_from_trans'] = 0
|
405
|
319
|
nearestObject = None
|
406
|
320
|
minDist = None
|
407
|
321
|
detectedObjects = grindDar2.hitObjectList
|
408
|
|
-
|
409
|
322
|
if grindDar == 0:
|
410
|
|
- #print("you are not grinding", grindHit)
|
411
|
323
|
lastheight = own["air_height"]
|
412
|
324
|
pos = own.worldPosition.z
|
413
|
325
|
dist = lastheight - pos
|
414
|
326
|
dist = dist * 2
|
415
|
|
-
|
416
|
327
|
if dist > 1:
|
417
|
328
|
dist = 1
|
418
|
329
|
own.actuators["land"].volume = dist
|
|
@@ -442,7 +353,6 @@ def check_landing():
|
442
|
353
|
if vib_countdown == 1:
|
443
|
354
|
stopAnims()
|
444
|
355
|
stance()
|
445
|
|
-
|
446
|
356
|
|
447
|
357
|
#air anim
|
448
|
358
|
if r_ground.triggered == False:
|
|
@@ -592,13 +502,8 @@ if own["fak_nmanual_timer"] == 0 and own['reg_manual'] == 0:
|
592
|
502
|
#if own['flip_manual_stance'] == 0:
|
593
|
503
|
own["fak_nmanual"] = 0
|
594
|
504
|
if own['last_fak_nmanual'] == 1 and own['fak_nmanual'] == 0:
|
595
|
|
- #killall()
|
596
|
505
|
pass
|
597
|
506
|
|
598
|
|
-
|
599
|
|
-#print("rm ", own["reg_manual"], "rnm ", own["reg_nmanual"], "fm ", own["fak_manual"], "fnm ", own["fak_nmanual"])
|
600
|
|
-
|
601
|
|
-
|
602
|
507
|
def reg_stance_left_off():
|
603
|
508
|
LAST_LEFT = own["LAST_LEFT"]
|
604
|
509
|
own["LAST_LEFT"] = 0
|
|
@@ -3536,8 +3441,7 @@ if own['invert_on'] == 0:
|
3536
|
3441
|
|
3537
|
3442
|
def reset_pos():
|
3538
|
3443
|
#reset
|
3539
|
|
- if ddPad == 1:
|
3540
|
|
-
|
|
3444
|
+ if ddPad == 1:
|
3541
|
3445
|
spawn_pos = own['spawn_pos']
|
3542
|
3446
|
spawn_rot = own['spawn_rot']
|
3543
|
3447
|
try:
|
|
@@ -4225,18 +4129,7 @@ def trans_jump():
|
4225
|
4129
|
move = [deltamove, 0, 0]
|
4226
|
4130
|
#print(deltamove)
|
4227
|
4131
|
if abs(deltamove) < 1 and delta[1] < 1:
|
4228
|
|
- own.applyMovement(move, True)
|
4229
|
|
- #print(deltamove, delta, "delta.......")
|
4230
|
|
- #pos = ground_ray.hitPosition
|
4231
|
|
- #print(pos)
|
4232
|
|
-
|
4233
|
|
- #linvelloc6 = own.getLinearVelocity(True)
|
4234
|
|
- #xvel6 = linvelloc6.x * .95
|
4235
|
|
- #force = (xvel6, linvelloc6.y, linvelloc6.z)
|
4236
|
|
- #own.setLinearVelocity(force, True)
|
4237
|
|
-
|
4238
|
|
-
|
4239
|
|
-
|
|
4132
|
+ own.applyMovement(move, True)
|
4240
|
4133
|
|
4241
|
4134
|
#control_calib() #scene must be enabled in main
|
4242
|
4135
|
jump_Timer()
|
|
@@ -4259,13 +4152,9 @@ wallride()
|
4259
|
4152
|
wallride_sound()
|
4260
|
4153
|
shutoff_timers()
|
4261
|
4154
|
grindout_cleanup()
|
4262
|
|
-#trans_jump()
|
4263
|
|
-
|
4264
|
4155
|
|
4265
|
|
-#printplaying()
|
4266
|
|
-#transmult()
|
4267
|
4156
|
linvelx = own.getLinearVelocity(True)
|
4268
|
|
-#print(linvelx)
|
|
4157
|
+
|
4269
|
4158
|
own["linvelx"] = linvelx.x
|
4270
|
4159
|
LAST_STANCE = STANCE
|
4271
|
4160
|
LAST_STANCE = own["stance"]
|
|
@@ -4293,10 +4182,7 @@ own['last_reg_nmanual'] = own['reg_nmanual']
|
4293
|
4182
|
if own['manual'] == 1:
|
4294
|
4183
|
own['last_manual_frame'] = frame
|
4295
|
4184
|
|
4296
|
|
-
|
4297
|
|
-#print(own['hippy'], own['last_hippy'])
|
4298
|
4185
|
own['last_hippy'] = own['hippy']
|
4299
|
|
-#last pressed down frame
|
4300
|
4186
|
if aBut == 1 and own["lasta"] == 0:
|
4301
|
4187
|
own["lastaf"] = frame
|
4302
|
4188
|
if xBut == 1 and own["lastx"] == 0:
|
|
@@ -4313,6 +4199,4 @@ if r_ground.triggered and own["jump_timer"] < 20:
|
4313
|
4199
|
own.applyForce(force2, True)
|
4314
|
4200
|
#print('grindtouch = ', own['grindTouch'])
|
4315
|
4201
|
if grindDar == False and r_ground.triggered and own['grindTouch'] == False:
|
4316
|
|
- own['grindType'] = ''
|
4317
|
|
-
|
4318
|
|
-
|
|
4202
|
+ own['grindType'] = ''
|