Browse Source

airwalk - wallride fixing

shuvit 5 years ago
parent
commit
81a33fbb90

+ 2
- 2
assets/ground_tiles.blend View File

@@ -1,3 +1,3 @@
1 1
 version https://git-lfs.github.com/spec/v1
2
-oid sha256:82d619b631847635df093b8d606ab9e64703d7394c3c21a906f55f409d629311
3
-size 365688288
2
+oid sha256:4044275413f78cd963fa17cca17ffc960f4206fc9aeadd5b9e92bfba05b93902
3
+size 365686792

+ 2
- 2
assets/kits/base_kit.blend View File

@@ -1,3 +1,3 @@
1 1
 version https://git-lfs.github.com/spec/v1
2
-oid sha256:0c1b727010a09532fa0cad551832c28a528c110bb1f6e150840da43d17700cd7
3
-size 20213320
2
+oid sha256:899eaec580ed017e296970ad781adf4d70535d9daed67be002194dd20e6b9a86
3
+size 20208304

+ 2
- 2
assets/user2.blend View File

@@ -1,3 +1,3 @@
1 1
 version https://git-lfs.github.com/spec/v1
2
-oid sha256:6b45e74dfb02e4dbe0d0ba1780b93fb7108790789abde9facc21bb96f14ee5be
3
-size 36760708
2
+oid sha256:6b0c5168c4a4cb41d1d8cd5a8b9b6e00a40c7e091412a120f8dffc2ca0719325
3
+size 36770404

BIN
scripts/__pycache__/controller2.cpython-36.pyc View File


+ 33
- 3
scripts/actionPlayer.py View File

@@ -29,8 +29,8 @@ def actionPlayer(ac):
29 29
 	skater.playAction(name, start,end, layer=layer, play_mode=mode, speed=speed, blendin=blendin)
30 30
 	deck.playAction(dname, dstart,dend, layer=layer, play_mode=mode, speed=speed, blendin=blendin)
31 31
 	#print('playing', name, get_frame(ac))
32
-	if skater.isPlayingAction(3):
33
-		print(skater.getActionFrame(3))
32
+	#if skater.isPlayingAction(3):
33
+		#print(skater.getActionFrame(3))
34 34
 
35 35
 def get_frame(ac):
36 36
 	skater = dict['p1']
@@ -754,6 +754,36 @@ def main(cont):
754 754
 			actionPlayer(action)		
755 755
 		newState = check_exit(aState, rA, timer, action)
756 756
 
757
+	check_state = 'reg_airwalk'
758
+	if aState == check_state:
759
+		action = getattr(actionsFSMlist, check_state)
760
+		if own['stateTimer'] < getattr(action, 'intro_frames'):	
761
+			intro = getattr(action, 'intro')
762
+			actionPlayer(getattr(actionsFSMlist, intro))	
763
+		else:
764
+			actionPlayer(action)		
765
+		newState = check_exit(aState, rA, timer, action)		
766
+
767
+	check_state = 'reg_wall_r'
768
+	if aState == check_state:
769
+		action = getattr(actionsFSMlist, check_state)
770
+		if own['stateTimer'] < getattr(action, 'intro_frames'):	
771
+			intro = getattr(action, 'intro')
772
+			actionPlayer(getattr(actionsFSMlist, intro))	
773
+		else:
774
+			actionPlayer(action)		
775
+		newState = check_exit(aState, rA, timer, action)		
776
+
777
+	check_state = 'reg_wall_l'
778
+	if aState == check_state:
779
+		action = getattr(actionsFSMlist, check_state)
780
+		if own['stateTimer'] < getattr(action, 'intro_frames'):	
781
+			intro = getattr(action, 'intro')
782
+			actionPlayer(getattr(actionsFSMlist, intro))	
783
+		else:
784
+			actionPlayer(action)		
785
+		newState = check_exit(aState, rA, timer, action)		
786
+
757 787
 
758 788
 
759 789
 
@@ -1532,5 +1562,5 @@ def main(cont):
1532 1562
 	own['l_aState'] = og_state
1533 1563
 	own['l_actionState'] = og_state
1534 1564
 	#own['l_aState'] = newState
1535
-	print(own['l_aState'], '----l_aState', own['aState'], 'rA', rA)
1565
+	#print(own['l_aState'], '----l_aState', own['aState'], 'rA', rA)
1536 1566
 	state_timer(own)

+ 100
- 4
scripts/actionsFSMlist.py View File

@@ -702,7 +702,7 @@ reg_air = a_class(
702 702
 	#intro, length
703 703
 	None, 0,
704 704
 	#exits
705
-	['reg_offboard', 'reg_land', 'frontside_grab', 'backside_grab', 'frontside_nose_grab', 'backside_nose_grab', 'frontside_tail_grab', 'backside_tail_grab', 'reg_air_nose', 'reg_air_tail', 'reg_ollie_north', 'reg_ollie_south', 'reg_judo', 'reg_frigid', 'reg_onefoot', 'reg_fsonefoot'],
705
+	['reg_offboard', 'reg_land', 'frontside_grab', 'backside_grab', 'frontside_nose_grab', 'backside_nose_grab', 'frontside_tail_grab', 'backside_tail_grab', 'reg_air_nose', 'reg_air_tail', 'reg_ollie_north', 'reg_ollie_south', 'reg_judo', 'reg_frigid', 'reg_onefoot', 'reg_fsonefoot', 'reg_airwalk', 'reg_wall_r', 'reg_wall_l'],
706 706
 	#force exit, frame
707 707
 	None, 0,
708 708
 	#opposite
@@ -718,7 +718,7 @@ reg_air_nb = a_class(
718 718
 	#intro, length
719 719
 	None, 0,
720 720
 	#exits
721
-	['reg_offboard', 'reg_land', 'frontside_grab', 'backside_grab', 'frontside_nose_grab', 'backside_nose_grab', 'frontside_tail_grab', 'backside_tail_grab', 'reg_air_nose', 'reg_air_tail', 'reg_ollie_north', 'reg_ollie_south', 'reg_judo', 'reg_frigid', 'reg_onefoot', 'reg_fsonefoot'],
721
+	['reg_offboard', 'reg_land', 'frontside_grab', 'backside_grab', 'frontside_nose_grab', 'backside_nose_grab', 'frontside_tail_grab', 'backside_tail_grab', 'reg_air_nose', 'reg_air_tail', 'reg_ollie_north', 'reg_ollie_south', 'reg_judo', 'reg_frigid', 'reg_onefoot', 'reg_fsonefoot', 'reg_airwalk', 'reg_wall_r', 'reg_wall_l'],
722 722
 	#force exit, frame
723 723
 	None, 0,
724 724
 	#opposite
@@ -735,7 +735,7 @@ reg_air_nose = a_class(
735 735
 	#intro, length
736 736
 	None, 0,
737 737
 	#exits
738
-	['reg_offboard', 'reg_land', 'frontside_grab', 'backside_grab', 'frontside_nose_grab', 'backside_nose_grab', 'frontside_tail_grab', 'backside_tail_grab', 'reg_manual', 'reg_nmanual', 'reg_air_tail', 'reg_ollie_north', 'reg_ollie_south'],
738
+	['reg_offboard', 'reg_land', 'frontside_grab', 'backside_grab', 'frontside_nose_grab', 'backside_nose_grab', 'frontside_tail_grab', 'backside_tail_grab', 'reg_manual', 'reg_nmanual', 'reg_air_tail', 'reg_ollie_north', 'reg_ollie_south', 'reg_airwalk', 'reg_wall_r', 'reg_wall_l'],
739 739
 	#force exit, frame
740 740
 	None, 0,
741 741
 	#opposite
@@ -751,7 +751,7 @@ reg_air_tail = a_class(
751 751
 	#intro, length
752 752
 	None, 0,
753 753
 	#exits
754
-	['reg_offboard', 'reg_land', 'frontside_grab', 'backside_grab', 'frontside_nose_grab', 'backside_nose_grab', 'frontside_tail_grab', 'backside_tail_grab', 'reg_manual', 'reg_nmanual', 'reg_air_nose', 'reg_ollie_north', 'reg_ollie_south'],
754
+	['reg_offboard', 'reg_land', 'frontside_grab', 'backside_grab', 'frontside_nose_grab', 'backside_nose_grab', 'frontside_tail_grab', 'backside_tail_grab', 'reg_manual', 'reg_nmanual', 'reg_air_nose', 'reg_ollie_north', 'reg_ollie_south', 'reg_airwalk', 'reg_wall_r', 'reg_wall_l'],
755 755
 	#force exit, frame
756 756
 	None, 0,
757 757
 	#opposite
@@ -1459,6 +1459,102 @@ reg_ollie_south = a_class(
1459 1459
 	#opposite
1460 1460
 	None)
1461 1461
 
1462
+reg_airwalk_in = a_class(
1463
+	#player armature action name, start, end frames
1464
+	'reg_airwalk', 1, 10,
1465
+	#deck action name, start, end frames  
1466
+	'b_reg_airwalk', 1, 10,
1467
+	#layer, speed, mode (0 = play, 1 = loop), blendin
1468
+	1, .5, 0, 5,
1469
+	#intro, length
1470
+	None, 0,
1471
+	#exits
1472
+	['reg_airwalk'],
1473
+	#force exit, frame
1474
+	'reg_airwalk', 20,
1475
+	#opposite
1476
+	None)
1477
+
1478
+reg_airwalk = a_class(
1479
+	#player armature action name, start, end frames
1480
+	'reg_airwalk', 10, 10,
1481
+	#deck action name, start, end frames  
1482
+	'b_reg_airwalk', 10, 10,
1483
+	#layer, speed, mode (0 = play, 1 = loop), blendin
1484
+	1, .5, 0, 5,
1485
+	#intro, length
1486
+	'reg_airwalk_in', 10,
1487
+	#exits
1488
+	['reg_air'],
1489
+	#force exit, frame
1490
+	None, 0,
1491
+	#opposite
1492
+	None)
1493
+
1494
+reg_wall_r_in = a_class(
1495
+	#player armature action name, start, end frames
1496
+	'reg_wall_r', 1, 10,
1497
+	#deck action name, start, end frames  
1498
+	'b_reg', 1, 10,
1499
+	#layer, speed, mode (0 = play, 1 = loop), blendin
1500
+	1, .5, 0, 5,
1501
+	#intro, length
1502
+	None, 0,
1503
+	#exits
1504
+	['reg_airwalk'],
1505
+	#force exit, frame
1506
+	'reg_airwalk', 20,
1507
+	#opposite
1508
+	None)
1509
+
1510
+reg_wall_r = a_class(
1511
+	#player armature action name, start, end frames
1512
+	'reg_wall_r', 10, 10,
1513
+	#deck action name, start, end frames  
1514
+	'b_reg', 10, 10,
1515
+	#layer, speed, mode (0 = play, 1 = loop), blendin
1516
+	1, .5, 0, 5,
1517
+	#intro, length
1518
+	'reg_wall_r_in', 10,
1519
+	#exits
1520
+	['reg_air'],
1521
+	#force exit, frame
1522
+	None, 0,
1523
+	#opposite
1524
+	None)
1525
+
1526
+reg_wall_l_in = a_class(
1527
+	#player armature action name, start, end frames
1528
+	'reg_wall_l', 1, 10,
1529
+	#deck action name, start, end frames  
1530
+	'b_reg', 1, 10,
1531
+	#layer, speed, mode (0 = play, 1 = loop), blendin
1532
+	1, .5, 0, 5,
1533
+	#intro, length
1534
+	None, 0,
1535
+	#exits
1536
+	['reg_air'],
1537
+	#force exit, frame
1538
+	'reg_wall_l', 20,
1539
+	#opposite
1540
+	None)
1541
+
1542
+reg_wall_l = a_class(
1543
+	#player armature action name, start, end frames
1544
+	'reg_wall_l', 10, 10,
1545
+	#deck action name, start, end frames  
1546
+	'b_reg', 10, 10,
1547
+	#layer, speed, mode (0 = play, 1 = loop), blendin
1548
+	1, .5, 0, 5,
1549
+	#intro, length
1550
+	'reg_wall_l_in', 10,
1551
+	#exits
1552
+	['reg_air'],
1553
+	#force exit, frame
1554
+	None, 0,
1555
+	#opposite
1556
+	None)
1557
+
1462 1558
 
1463 1559
 
1464 1560
 

+ 6
- 0
scripts/controller2.py View File

@@ -4265,15 +4265,19 @@ def main():
4265 4265
     #wallride
4266 4266
     def wallride():
4267 4267
         wallride_off = own['wallride_off']
4268
+        wallride_off = False
4268 4269
         distance = own.getDistanceTo(gray.hitPosition)
4269 4270
         upforce = 25
4270 4271
         sideforce = 15
4272
+        if wallrideL.triggered or wallrideR.triggered:
4273
+            print('----wall triggered', wallride_off, onGround)
4271 4274
         try:
4272 4275
             obj = gray.hitObject
4273 4276
             objpos = obj.worldPosition
4274 4277
             ownpos = own.worldPosition
4275 4278
             distance = ownpos.z - objpos.z
4276 4279
         except:
4280
+            print('gray broke')
4277 4281
             pass
4278 4282
         if wallrideL.triggered and wallride_off == 0 and not onGround:
4279 4283
             own['jump_timer'] = 0
@@ -4283,6 +4287,7 @@ def main():
4283 4287
                 force = [0, sideforce, upforce]
4284 4288
                 own.applyForce(force, 1)
4285 4289
                 #align
4290
+                print('wallride')
4286 4291
                 if STANCE == 0:
4287 4292
                     own['requestAction'] = 'reg_wall_r'
4288 4293
                 else:
@@ -4300,6 +4305,7 @@ def main():
4300 4305
                 cont.activate(wallrideconstR)
4301 4306
                 force = [0, -sideforce, upforce]
4302 4307
                 own.applyForce(force, 1)
4308
+                print('wallride')
4303 4309
                 if STANCE == 0:
4304 4310
                     own['requestAction'] = 'reg_wall_l'
4305 4311
                 else:

+ 2
- 2
shuvit.blend View File

@@ -1,3 +1,3 @@
1 1
 version https://git-lfs.github.com/spec/v1
2
-oid sha256:33e3c5ed51f18d1b07c3d6ba29e7b4f9469b0267bd9b878b318caa91661649fd
3
-size 146591652
2
+oid sha256:f26d4c6a7055e275ff34007ccab66e1fd1880e2b38aea35414d14915a05288fa
3
+size 147755636

Loading…
Cancel
Save