Browse Source

turns and fall fix

shuvit 5 years ago
parent
commit
003fcc41be

+ 1
- 1
Recordings/shuvit replay.dat
File diff suppressed because it is too large
View File


+ 2
- 2
assets/sc.blend View File

1
 version https://git-lfs.github.com/spec/v1
1
 version https://git-lfs.github.com/spec/v1
2
-oid sha256:991b78d9292032bb795a33fe3a753a09b3469acb608e80fe1e9e0f9eb83a17f9
3
-size 8618540
2
+oid sha256:b435dd53ddd57602bd250de6ea3d4539a372c5ba88df92cf4c33d340e2c8067a
3
+size 8596056

+ 23
- 23
config.ini View File

20
 
20
 
21
 #level
21
 #level
22
 ######
22
 ######
23
-level = user1
23
+level = sc
24
 #------------
24
 #------------
25
 
25
 
26
 #replay recorder
26
 #replay recorder
48
 #character settings
48
 #character settings
49
 ###################
49
 ###################
50
 
50
 
51
-character = becky
51
+character = ralph
52
 
52
 
53
-shirt_logo = 3
53
+shirt_logo = 4
54
 
54
 
55
-shirt_color_r = 0.61
56
-shirt_color_g = 0.61
57
-shirt_color_b = 0.61
55
+shirt_color_r = 0.54
56
+shirt_color_g = 0.4
57
+shirt_color_b = 0.05
58
 
58
 
59
-shoe_color_r = 0.16
59
+shoe_color_r = 0.02
60
 shoe_color_g = 0.02
60
 shoe_color_g = 0.02
61
 shoe_color_b = 0.02
61
 shoe_color_b = 0.02
62
 #-----------------
62
 #-----------------
63
 
63
 
64
 #deck settings
64
 #deck settings
65
 ##############
65
 ##############
66
-deck_index = 2
66
+deck_index = 7
67
 deck_color_r = 1
67
 deck_color_r = 1
68
 deck_color_g = 1.0
68
 deck_color_g = 1.0
69
 deck_color_b = 1
69
 deck_color_b = 1
70
-trucks_r = 0.95
71
-trucks_g = 1.0
72
-trucks_b = 1
70
+trucks_r = 0.46
71
+trucks_g = 0.03
72
+trucks_b = 0.03
73
 
73
 
74
-wheel1_r = 0.4
75
-wheel1_g = 0.08
74
+wheel1_r = 1
75
+wheel1_g = 0.71
76
 wheel1_b = 0.08
76
 wheel1_b = 0.08
77
-wheel2_r = 0.08
78
-wheel2_g = 0.34
77
+wheel2_r = 1
78
+wheel2_g = 0.71
79
 wheel2_b = 0.08
79
 wheel2_b = 0.08
80
-wheel3_r = 0.08
81
-wheel3_g = 0.08
82
-wheel3_b = 0.54
83
-wheel4_r = 0.4
84
-wheel4_g = 0.37
80
+wheel3_r = 1
81
+wheel3_g = 0.71
82
+wheel3_b = 0.08
83
+wheel4_r = 1
84
+wheel4_g = 0.71
85
 wheel4_b = 0.08
85
 wheel4_b = 0.08
86
 #-------------------
86
 #-------------------
87
 
87
 
90
 
90
 
91
 #brightness / contrast
91
 #brightness / contrast
92
 bc = 1
92
 bc = 1
93
-BC_BRIGHTNESS = 1.0
93
+BC_BRIGHTNESS = 1.05
94
 BC_CONTRAST = 1.0
94
 BC_CONTRAST = 1.0
95
 
95
 
96
 #HDR
96
 #HDR
117
 
117
 
118
 #sun settings
118
 #sun settings
119
 #############
119
 #############
120
-sun_strength = 0.15
121
-ambient_strength = 1.25
120
+sun_strength = 1.05
121
+ambient_strength = 0.35
122
 sun_rot_x = -0.05
122
 sun_rot_x = -0.05
123
 sun_rot_y = -0.05
123
 sun_rot_y = -0.05
124
 shadow_on = 0
124
 shadow_on = 0

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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


+ 21
- 8
scripts/controller2.py View File

1832
         if lUD > turnsens or lUD < -turnsens:
1832
         if lUD > turnsens or lUD < -turnsens:
1833
             own["turnud"] = 1
1833
             own["turnud"] = 1
1834
         else:
1834
         else:
1835
-            own["turnud"] = 0        
1835
+            own["turnud"] = 0
1836
+
1837
+        turnVel = .01                
1836
     #light  
1838
     #light  
1837
     #if manual and grindhit = true  
1839
     #if manual and grindhit = true  
1838
         if lLR > turnsens and lLR < (turnsens * 1.3) and (grindHit == False or (manual == 1 and grindHit == True)):       
1840
         if lLR > turnsens and lLR < (turnsens * 1.3) and (grindHit == False or (manual == 1 and grindHit == True)):       
1871
             if r_ground.triggered == True:
1873
             if r_ground.triggered == True:
1872
                 #print("med turn")
1874
                 #print("med turn")
1873
                 if STANCE == 0:   
1875
                 if STANCE == 0:   
1874
-                    own.setLinearVelocity([linVelocity2.x - speed, linVelocity2.y, linVelocity2.z], 1)
1876
+                    own.setLinearVelocity([linVelocity2.x - speed, linVelocity2.y - turnVel, linVelocity2.z], 1)
1875
                 if STANCE == 1:   
1877
                 if STANCE == 1:   
1876
-                    own.setLinearVelocity([linVelocity2.x + speed, linVelocity2.y, linVelocity2.z], 1)  
1878
+                    own.setLinearVelocity([linVelocity2.x + speed, linVelocity2.y - turnVel, linVelocity2.z], 1)  
1877
         if (lLR < (-turnsens * 1.3) or dict['kb_la'] == 2) and (grindHit == False or (manual == 1 and grindHit == True)):
1879
         if (lLR < (-turnsens * 1.3) or dict['kb_la'] == 2) and (grindHit == False or (manual == 1 and grindHit == True)):
1878
             #turn right
1880
             #turn right
1879
             if rot.z < .4:
1881
             if rot.z < .4:
3598
             if STANCE == 0:
3600
             if STANCE == 0:
3599
                 yvel *= -1
3601
                 yvel *= -1
3600
             try:    
3602
             try:    
3601
-                dist = r_ground.hitObject.worldPosition - own.worldPosition
3603
+                #dist = r_ground.hitObject.worldPosition - own.worldPosition
3602
                 #print('ground dist', dist)
3604
                 #print('ground dist', dist)
3603
                 if own.linearVelocity.y > .01 or own.linearVelocity.y < -.01:
3605
                 if own.linearVelocity.y > .01 or own.linearVelocity.y < -.01:
3604
                     own.applyRotation([0,0,yvel], True)
3606
                     own.applyRotation([0,0,yvel], True)
3609
                 pass       
3611
                 pass       
3610
         else:    
3612
         else:    
3611
             if r_ground.triggered and touched == False and grindHit == 0 and frames_since_grinding > 20:    
3613
             if r_ground.triggered and touched == False and grindHit == 0 and frames_since_grinding > 20:    
3612
-                linVelocity4 = own.getLinearVelocity(True)
3613
-                newy = linVelocity4.y * ylimit   
3614
-                force = [linVelocity4.x, newy, linVelocity4.z]
3615
-                own.setLinearVelocity(force, True) 
3614
+            #     linVelocity4 = own.getLinearVelocity(True)
3615
+            #     newy = linVelocity4.y * ylimit   
3616
+            #     force = [linVelocity4.x, newy, linVelocity4.z]
3617
+            #     own.setLinearVelocity(force, True) 
3618
+                yvel = own.linearVelocity.y
3619
+                yvel = yvel *.03
3620
+                if STANCE == 0:
3621
+                    yvel *= -1
3622
+                try:    
3623
+                    if own.linearVelocity.y > .01 or own.linearVelocity.y < -.01:
3624
+                        own.applyRotation([0,0,yvel], True)
3625
+                    
3626
+                except:
3627
+                    pass 
3628
+
3616
         #print(ylimit, 'ylimit')       
3629
         #print(ylimit, 'ylimit')       
3617
 
3630
 
3618
     def getoffboard():
3631
     def getoffboard():

+ 1
- 1
scripts/grindV2.py View File

548
                         stre = .45
548
                         stre = .45
549
                         own.alignAxisToVect(hitNormal, 2, stre) 
549
                         own.alignAxisToVect(hitNormal, 2, stre) 
550
                         #print("align")                   
550
                         #print("align")                   
551
-                    own.worldPosition = [nearpos.x, nearpos.y, nearpos.z + .2975]
551
+                    #own.worldPosition = [nearpos.x, nearpos.y, nearpos.z + .2975]
552
                     #print('moving world')
552
                     #print('moving world')
553
             #print("grinding")
553
             #print("grinding")
554
             grind_height_dif = (own.worldPosition[2] - nearestObject.worldPosition[2]) - .287
554
             grind_height_dif = (own.worldPosition[2] - nearestObject.worldPosition[2]) - .287

+ 26
- 4
scripts/walk.py View File

667
             own["spawn_stance"] = stance   
667
             own["spawn_stance"] = stance   
668
     def falldeck():
668
     def falldeck():
669
         throw_deck_empty = scene.objects["throw_deck_empty"]
669
         throw_deck_empty = scene.objects["throw_deck_empty"]
670
+        throw_deck_empty.worldPosition.y += .5
671
+        throw_deck_empty.worldPosition.x += .5
670
         deckact = deck.actuators["Visibility"]
672
         deckact = deck.actuators["Visibility"]
671
         trucksact = trucks.actuators["Visibility"]
673
         trucksact = trucks.actuators["Visibility"]
672
         wheel1act = wheel1.actuators["Visibility"]
674
         wheel1act = wheel1.actuators["Visibility"]
788
             falldeck()        
790
             falldeck()        
789
             if STANCE == 1:
791
             if STANCE == 1:
790
                 own['requestAction'] = 'fak_air-walk_air'            
792
                 own['requestAction'] = 'fak_air-walk_air'            
791
-                own.setLinearVelocity([3,2,0], True)
793
+                #own.setLinearVelocity([3,2,0], True)
792
             else:
794
             else:
793
                 own['requestAction'] = 'reg_air-walk_air'
795
                 own['requestAction'] = 'reg_air-walk_air'
794
-                own.setLinearVelocity([-3,-2,0], True)    
796
+                #own.setLinearVelocity([-3,-2,0], True)    
795
             own['fall'] = False
797
             own['fall'] = False
798
+            own.worldPosition.z += .3
796
 
799
 
797
     def sit():
800
     def sit():
798
         #turn off sit
801
         #turn off sit
1105
             own['lF_ground_frame'] = own['framenum']
1108
             own['lF_ground_frame'] = own['framenum']
1106
             if 'grind' in r_ground.hitObject:
1109
             if 'grind' in r_ground.hitObject:
1107
                 if own['framenum'] - own['last_fall_frame'] < 90:
1110
                 if own['framenum'] - own['last_fall_frame'] < 90:
1108
-                    own.applyForce([0,100,0], True)
1111
+                    #own.applyForce([0,100,0], True)
1112
+                    pass
1109
                     #print('moving away from rail')
1113
                     #print('moving away from rail')
1110
                     
1114
                     
1111
             yvel = own.linearVelocity.y
1115
             yvel = own.linearVelocity.y
1216
     if own['requestAction'] == 'reg_walkFast_nb' and own.linearVelocity.x > (wts * -1):
1220
     if own['requestAction'] == 'reg_walkFast_nb' and own.linearVelocity.x > (wts * -1):
1217
         own['requestAction'] = 'reg_walk_nb' 
1221
         own['requestAction'] = 'reg_walk_nb' 
1218
     if own['requestAction'] == 'fak_walkFast_nb' and own.linearVelocity.x < wts:
1222
     if own['requestAction'] == 'fak_walkFast_nb' and own.linearVelocity.x < wts:
1219
-        own['requestAction'] = 'fak_walk_nb'                         
1223
+        own['requestAction'] = 'fak_walk_nb'   
1224
+
1225
+
1226
+    if r_ground.triggered:
1227
+        #force2 = [0.0, 0, dict['antibounce']]
1228
+        #own.applyForce(force2, True)
1229
+
1230
+        gdist = ((own.worldPosition.z - r_ground.hitPosition[2]))  
1231
+        #print(gdist)
1232
+        if gdist < .3 and gdist > .1:
1233
+            #move = 2.875 - gdist
1234
+            move = (.3 - gdist)*.5
1235
+            #move = (own.worldPosition.z + gdist)
1236
+            if move > 0:
1237
+                own.worldPosition.z = own.worldPosition.z + move
1238
+            else:
1239
+                own.worldPosition.z = own.worldPosition.z - move    
1240
+            own.linearVelocity.z = 0        
1241
+
1220
     onboard() 
1242
     onboard() 
1221
     jump()
1243
     jump()
1222
     dropin()
1244
     dropin()

+ 2
- 2
shuvit.blend View File

1
 version https://git-lfs.github.com/spec/v1
1
 version https://git-lfs.github.com/spec/v1
2
-oid sha256:2a6cee59049ae4f760ee3d6ca3d0270335b6ed7422cf02346bbf3729cf009e5d
3
-size 180312212
2
+oid sha256:ff5b5e06025aeb3b56c49383416fe76749cc34457c74537362de4614673b62fe
3
+size 180304480

Loading…
Cancel
Save