shuvit 3 years ago
parent
commit
58c4016d42
3 changed files with 193 additions and 67 deletions
  1. 50
    12
      bike.py
  2. 142
    54
      co_ActionState.py
  3. 1
    1
      controller2.py

+ 50
- 12
bike.py View File

@@ -8,11 +8,44 @@ scene = bge.logic.getCurrentScene()
8 8
 skater = scene.objects["Char4"]
9 9
 TURN_SENS = .04
10 10
 TURNAMT = .03
11
-ACCEL_AMT = .05
11
+AIR_TURMAMT = .07
12
+ACCEL_AMT = .06
13
+JUMP_AMT = 1300
14
+
15
+
16
+def turnL(own, gray):
17
+    if gray.positive:
18
+        own.applyRotation([0,0,TURNAMT], True)
19
+    else:            
20
+        own.applyRotation([0,0,AIR_TURMAMT], True)
21
+def turnR(own, gray):
22
+    if gray.positive:
23
+        own.applyRotation([0,0,-TURNAMT], True)
24
+    else:            
25
+        own.applyRotation([0,0,-AIR_TURMAMT], True)    
26
+def reset_timers(own, q1oncd, q2oncd, q3oncd, q4oncd, q5oncd, q6oncd, q7oncd, q8oncd):
27
+     q1oncd = 0
28
+     q2oncd = 0 
29
+     q3oncd = 0 
30
+     q4oncd = 0 
31
+     q5oncd = 0 
32
+     q6oncd = 0 
33
+     q7oncd = 0 
34
+     q8oncd = 0 
35
+     own["Q1oncd"] = 0
36
+     own["Q2oncd"] = 0
37
+     own["Q3oncd"] = 0
38
+     own["Q4oncd"] = 0
39
+     own["Q5oncd"] = 0
40
+     own["Q6oncd"] = 0
41
+     own["Q7oncd"] = 0
42
+     own["Q8oncd"] = 0
43
+
12 44
 
13 45
 def get_physics_action(cont, own):
14 46
     #print(dict['lLR'])
15 47
     action = 'None'
48
+    gray = cont.sensors['r_Ground']
16 49
     
17 50
     lLR = dict['lLR']
18 51
     lUD = dict['lUD']
@@ -259,37 +292,42 @@ def get_physics_action(cont, own):
259 292
         action = 'forward'    
260 293
     if dict['lLR'] > TURN_SENS:
261 294
         action = 'turnR'
295
+        turnR(own, gray)
262 296
     if dict['lLR'] < -TURN_SENS:
263
-        action = 'turnL'    
264
-    if q5oncd > 0 and q1oncd > 0 and q5oncd < q1oncd:
265
-        action = 'jump'           
297
+        #action = 'turnL'    
298
+        turnL(own, gray)
299
+    if (q5oncd > 0 and q1oncd > 0 and q5oncd < q1oncd) or (q5oncd > 0 and q8oncd > 0 and q5oncd < q8oncd) or (q5oncd > 0 and q2oncd > 0 and q5oncd < q2oncd):
300
+        action = 'jump'
301
+        reset_timers(own, q1oncd, q2oncd, q3oncd, q4oncd, q5oncd, q6oncd, q7oncd, q8oncd)           
266 302
 
267 303
 
268 304
     return action
269 305
 
306
+
307
+
270 308
 def do_physics_action(cont, own, action):
271
-    if action == 'turnR':
272
-        own.applyRotation([0,0,-TURNAMT], True)
273
-    if action == 'turnL':
274
-        own.applyRotation([0,0,TURNAMT], True)
309
+#    if action == 'turnR':
310
+#        own.applyRotation([0,0,-TURNAMT], True)
311
+#    if action == 'turnL':
312
+#        own.applyRotation([0,0,TURNAMT], True)
275 313
     if action == 'forward':
276 314
         own.linearVelocity.x = own.linearVelocity.x - ACCEL_AMT
277 315
     
278 316
     if action == 'jump':
279
-        own.applyForce([0,0,100], False)
317
+        own.applyForce([0,0,JUMP_AMT], False)
280 318
         print('jump')    
281 319
     
282 320
     gray = cont.sensors['r_Ground']
283 321
     if gray.positive:
284 322
         own.alignAxisToVect(Vector(gray.hitNormal)*1, 2, .25)
285 323
     else:
286
-        own.alignAxisToVect(Vector([0,0,1]),2,.25)     
324
+        own.alignAxisToVect(Vector([0,0,1]),2,.005)     
325
+    
287 326
     
288
-    own.linearVelocity.y = 0  
289 327
     
290 328
     if gray.positive:
291 329
         own.linearVelocity.z = own.linearVelocity.z -.05    
292
-   
330
+        own.linearVelocity.y = 0  
293 331
 def do_anims(cont, own):
294 332
     
295 333
     skater = scene.objects["Char4"]

+ 142
- 54
co_ActionState.py View File

@@ -932,7 +932,7 @@ def main():
932 932
                 trans_playing = skater.isPlayingAction(trans_layer)
933 933
                 if trans_playing:
934 934
                     cur_frame = skater.getActionFrame(trans_layer)          
935
-                if trans_playing and cur_frame > .5:                
935
+                if trans_playing and cur_frame > .5 and cur_frame < 39:                  
936 936
                     skater.playAction("nfak_right", cur_frame,1, layer=trans_layer, play_mode=0, speed=.5)
937 937
                     deck.playAction("a_fak_right", cur_frame,1, layer=trans_layer, play_mode=0, speed=.5)
938 938
                     trucks.playAction("a_reg", cur_frame,1, layer=trans_layer, play_mode=0, speed=.5)
@@ -948,7 +948,7 @@ def main():
948 948
                 trans_playing = skater.isPlayingAction(trans_layer)
949 949
                 if trans_playing:
950 950
                     cur_frame = skater.getActionFrame(trans_layer)                   
951
-                if trans_playing and cur_frame > .5:                
951
+                if trans_playing and cur_frame > .5 and cur_frame < 39:                 
952 952
                     skater.playAction("nfak_left", cur_frame,1, layer=trans_layer, play_mode=0, speed=.5)
953 953
                     deck.playAction("a_fak_left", cur_frame,1, layer=trans_layer, play_mode=0, speed=.5)
954 954
                     trucks.playAction("a_reg", cur_frame,1, layer=trans_layer, play_mode=0, speed=.5)
@@ -999,23 +999,49 @@ def main():
999 999
                 else:    
1000 1000
                     skater.playAction("nreg_pump_right", 40,30, layer=trans_layer, play_mode=0, speed=.5)
1001 1001
                     deck.playAction("a_reg_right", 10,10, layer=trans_layer, play_mode=0, speed=.5)
1002
-                    trucks.playAction("a_reg", 10,10, layer=trans_layer, play_mode=0, speed=.5)       
1002
+                    trucks.playAction("a_reg", 10,10, layer=trans_layer, play_mode=0, speed=.5)  
1003
+                         
1003 1004
             if requestAction == 'fak_pump_left-left':
1004 1005
                 actionState = 'fak_pump_left-left'
1005 1006
                 own['actionTimer'] = 19
1006
-                    
1007
-                skater.playAction("nfak_pump_left", 40,30, layer=trans_layer, play_mode=0, speed=.5)
1008
-                deck.playAction("a_fak_left", 10,10, layer=trans_layer, play_mode=0, speed=.5)
1009
-                trucks.playAction("a_reg", 10,1, layer=trans_layer, play_mode=0, speed=.5)  
1007
+                
1008
+                if l_actionState == 'fak_pump_left-leftb':
1009
+                    trans_playing = skater.isPlayingAction(trans_layer)
1010
+                    if trans_playing:
1011
+                        cur_frame = skater.getActionFrame(trans_layer)       
1012
+                        skater.playAction("nfak_pump_left", 40,30, layer=trans_layer, play_mode=0, speed=.5)
1013
+                        deck.playAction("a_fak_left", 10,10, layer=trans_layer, play_mode=0, speed=.5)
1014
+                        trucks.playAction("a_reg", 10,1, layer=trans_layer, play_mode=0, speed=.5)  
1015
+                        own['actionTimer'] = cur_frame * 2    
1016
+                    else:
1017
+                        skater.playAction("nfak_pump_left", 40,30, layer=trans_layer, play_mode=0, speed=.5)
1018
+                        deck.playAction("a_fak_left", 10,10, layer=trans_layer, play_mode=0, speed=.5)
1019
+                        trucks.playAction("a_reg", 10,1, layer=trans_layer, play_mode=0, speed=.5)                                                
1020
+                else:    
1021
+                    skater.playAction("nfak_pump_left", 40,30, layer=trans_layer, play_mode=0, speed=.5)
1022
+                    deck.playAction("a_fak_left", 10,10, layer=trans_layer, play_mode=0, speed=.5)
1023
+                    trucks.playAction("a_reg", 10,1, layer=trans_layer, play_mode=0, speed=.5)                   
1024
+
1010 1025
                 
1011 1026
             if requestAction == 'fak_pump_right-right':
1012 1027
                 actionState = 'fak_pump_right-right'
1013
-                own['actionState'] = 'fak_pump_right-right'
1014 1028
                 own['actionTimer'] = 19
1015
-                    
1016
-                skater.playAction("nfak_pump_right", 40,30, layer=trans_layer, play_mode=0, speed=.5)
1017
-                deck.playAction("a_fak_right", 10,10, layer=trans_layer, play_mode=0, speed=.5)
1018
-                trucks.playAction("a_reg", 10,1, layer=trans_layer, play_mode=0, speed=.5)       
1029
+                if l_actionState == 'fak_pump_right-rightb':
1030
+                    trans_playing = skater.isPlayingAction(trans_layer)
1031
+                    if trans_playing:
1032
+                        cur_frame = skater.getActionFrame(trans_layer)       
1033
+                        skater.playAction("nfak_pump_right", 40,30, layer=trans_layer, play_mode=0, speed=.5)
1034
+                        deck.playAction("a_fak_right", 10,10, layer=trans_layer, play_mode=0, speed=.5)
1035
+                        trucks.playAction("a_reg", 10,1, layer=trans_layer, play_mode=0, speed=.5)  
1036
+                        own['actionTimer'] = cur_frame * 2    
1037
+                    else:
1038
+                        skater.playAction("nfak_pump_right", 40,30, layer=trans_layer, play_mode=0, speed=.5)
1039
+                        deck.playAction("a_fak_right", 10,10, layer=trans_layer, play_mode=0, speed=.5)
1040
+                        trucks.playAction("a_reg", 10,1, layer=trans_layer, play_mode=0, speed=.5)                                                
1041
+                else:    
1042
+                    skater.playAction("nfak_pump_right", 40,30, layer=trans_layer, play_mode=0, speed=.5)
1043
+                    deck.playAction("a_fak_right", 10,10, layer=trans_layer, play_mode=0, speed=.5)
1044
+                    trucks.playAction("a_reg", 10,1, layer=trans_layer, play_mode=0, speed=.5)      
1019 1045
                 
1020 1046
             if requestAction == 'reg_pump_right-rightb':
1021 1047
                 actionState = 'reg_pump_right-rightb'
@@ -1062,15 +1088,50 @@ def main():
1062 1088
                     deck.playAction("a_reg_left", 10,10, layer=trans_layer, play_mode=0, speed=.5)
1063 1089
                     trucks.playAction("a_reg", 10,1, layer=trans_layer, play_mode=0, speed=.5)                     
1064 1090
                     
1065
-                         
1066
-            if requestAction == 'fak_pump_left-left':
1067
-                actionState = 'fak_pump_left-left'
1068
-                own['actionTimer'] = 19
1091
+            if requestAction == 'fak_pump_right-rightb':
1092
+                actionState = 'fak_pump_right-rightb'
1093
+                own['actionState'] = 'fak_pump_right-rightb'
1094
+                own['actionTimer'] = 20
1095
+                
1096
+                if l_actionState == 'fak_pump_right-right':
1097
+                    trans_playing = skater.isPlayingAction(trans_layer)
1098
+                    if trans_playing:
1099
+                        cur_frame = skater.getActionFrame(trans_layer)
1100
+                        skater.playAction("nfak_pump_right", cur_frame,40, layer=trans_layer, play_mode=0, speed=.5)
1101
+                        deck.playAction("a_fak_right", 10,10, layer=trans_layer, play_mode=0, speed=.5)
1102
+                        trucks.playAction("a_reg", 10,1, layer=trans_layer, play_mode=0, speed=.5)  
1103
+                        own['actionTimer'] = cur_frame * 2 
1104
+                    else:    
1105
+                        skater.playAction("nfak_pump_right", 30,40, layer=trans_layer, play_mode=0, speed=.5)
1106
+                        deck.playAction("a_fak_right", 10,10, layer=trans_layer, play_mode=0, speed=.5)
1107
+                        trucks.playAction("a_reg", 10,1, layer=trans_layer, play_mode=0, speed=.5)                                                             
1108
+                else:    
1109
+                    skater.playAction("nfak_pump_right", 30,40, layer=trans_layer, play_mode=0, speed=.5)
1110
+                    deck.playAction("a_fak_right", 10,10, layer=trans_layer, play_mode=0, speed=.5)
1111
+                    trucks.playAction("a_reg", 10,1, layer=trans_layer, play_mode=0, speed=.5)  
1069 1112
                     
1070
-                skater.playAction("nfak_pump_left", 30,40, layer=trans_layer, play_mode=0, speed=.5)
1071
-                deck.playAction("a_fak_left", 10,10, layer=trans_layer, play_mode=0, speed=.5)
1072
-                trucks.playAction("a_reg", 10,1, layer=trans_layer, play_mode=0, speed=.5)       
1073
-     
1113
+                    
1114
+            if requestAction == 'fak_pump_left-leftb':
1115
+                actionState = 'fak_pump_left-leftb'
1116
+                own['actionState'] = 'fak_pump_left-leftb'
1117
+                own['actionTimer'] = 20
1118
+                
1119
+                if l_actionState == 'fak_pump_left-left':
1120
+                    trans_playing = skater.isPlayingAction(trans_layer)
1121
+                    if trans_playing:
1122
+                        cur_frame = skater.getActionFrame(trans_layer)
1123
+                        skater.playAction("nfak_pump_left", cur_frame,40, layer=trans_layer, play_mode=0, speed=.5)
1124
+                        deck.playAction("a_fak_left", 10,10, layer=trans_layer, play_mode=0, speed=.5)
1125
+                        trucks.playAction("a_reg", 10,1, layer=trans_layer, play_mode=0, speed=.5)  
1126
+                        own['actionTimer'] = cur_frame * 2 
1127
+                    else:    
1128
+                        skater.playAction("nfak_pump_left", 30,40, layer=trans_layer, play_mode=0, speed=.5)
1129
+                        deck.playAction("a_fak_left", 10,10, layer=trans_layer, play_mode=0, speed=.5)
1130
+                        trucks.playAction("a_reg", 10,1, layer=trans_layer, play_mode=0, speed=.5)                                                             
1131
+                else:    
1132
+                    skater.playAction("nfak_pump_left", 30,40, layer=trans_layer, play_mode=0, speed=.5)
1133
+                    deck.playAction("a_fak_left", 10,10, layer=trans_layer, play_mode=0, speed=.5)
1134
+                    trucks.playAction("a_reg", 10,1, layer=trans_layer, play_mode=0, speed=.5)  
1074 1135
                 
1075 1136
                 
1076 1137
 #*************************
@@ -1112,7 +1173,7 @@ def main():
1112 1173
 
1113 1174
             if requestAction == 'reg_pump_right_out':
1114 1175
                 actionState = 'reg_pump_right_out'
1115
-                requestAction = 'req_pump_right_out'
1176
+                requestAction = 'reg_pump_right_out'
1116 1177
                 own['actionState'] = 'reg_pump_right_out'
1117 1178
                 own['actionTimer'] = 18
1118 1179
                 trans_playing = skater.isPlayingAction(trans_layer)
@@ -1167,35 +1228,56 @@ def main():
1167 1228
                      
1168 1229
             if requestAction == 'fak_pump_right_out':
1169 1230
                 actionState = 'fak_pump_right_out'
1170
-                own['actionTimer'] = 19
1231
+                requestAction = 'fak_pump_right_out'
1232
+                own['actionState'] = 'fak_pump_right_out'
1233
+                own['actionTimer'] = 18
1171 1234
                 trans_playing = skater.isPlayingAction(trans_layer)
1235
+                
1172 1236
                 if trans_playing:
1173 1237
                     cur_frame = skater.getActionFrame(trans_layer)
1174
-                if trans_playing and cur_frame > .5:                
1175
-                    skater.playAction("nfak_pump_right", cur_frame,1, layer=trans_layer, play_mode=0, speed=.5)
1176
-                    deck.playAction("a_fak_right", cur_frame,1, layer=trans_layer, play_mode=0, speed=.5)
1177
-                    trucks.playAction("a_reg", cur_frame,1, layer=trans_layer, play_mode=0, speed=.5)
1178
-                    own['actionTimer'] = (10 - cur_frame) *2
1179
-                else:                      
1238
+                    stopActs()
1239
+                    if cur_frame >= 32 and cur_frame <= 40 and l_actionState == 'fak_pump_right':
1240
+                        cur_frame = cur_frame - 30   
1241
+                    if cur_frame < 32 and cur_frame > 26:
1242
+                        cur_frame = 10
1243
+                    if trans_playing and cur_frame > .5:      
1244
+                        #cur_frame = 20 - cur_frame         
1245
+                        skater.playAction("nfak_pump_right", cur_frame,1, layer=trans_layer, play_mode=0, speed=.5)
1246
+                        deck.playAction("a_fak_right", cur_frame,1, layer=trans_layer, play_mode=0, speed=.5)
1247
+                        trucks.playAction("a_reg", cur_frame,1, layer=trans_layer, play_mode=0, speed=.5)
1248
+                        own['actionTimer'] = cur_frame *2
1249
+                        #own['actionTimer'] = 19
1250
+                else:                     
1180 1251
                     skater.playAction("nfak_pump_right", 10,1, layer=trans_layer, play_mode=0, speed=.5)
1181 1252
                     deck.playAction("a_fak_right", 10,1, layer=trans_layer, play_mode=0, speed=.5)
1182 1253
                     trucks.playAction("a_reg", 10,1, layer=trans_layer, play_mode=0, speed=.5)  
1254
+                    
1255
+                    
1256
+                    
1183 1257
             if requestAction == 'fak_pump_left_out':
1184 1258
                 actionState = 'fak_pump_left_out'
1185
-                own['actionTimer'] = 19
1259
+                own['actionState'] = 'fak_pump_left_out'
1260
+                requestAction = 'fak_pump_left_out'
1261
+                own['actionTimer'] = 18
1186 1262
                 trans_playing = skater.isPlayingAction(trans_layer)
1187 1263
                 if trans_playing:
1188 1264
                     cur_frame = skater.getActionFrame(trans_layer)
1189
-                if trans_playing and cur_frame > .5:                
1190
-                    skater.playAction("nfak_pump_left", cur_frame,1, layer=trans_layer, play_mode=0, speed=.5)
1191
-                    deck.playAction("a_fak_left", cur_frame,1, layer=trans_layer, play_mode=0, speed=.5)
1192
-                    trucks.playAction("a_reg", cur_frame,1, layer=trans_layer, play_mode=0, speed=.5)
1193
-                    own['actionTimer'] = (10 - cur_frame) *2
1194
-                else:                      
1265
+                    stopActs()
1266
+                    if cur_frame >= 32 and cur_frame <= 40 and l_actionState == 'fak_pump_left':
1267
+                        cur_frame = cur_frame - 30   
1268
+                    if cur_frame < 32 and cur_frame > 26:
1269
+                        cur_frame = 10
1270
+                    if trans_playing and cur_frame > .5:      
1271
+                        #cur_frame = 20 - cur_frame         
1272
+                        skater.playAction("nfak_pump_left", cur_frame,1, layer=trans_layer, play_mode=0, speed=.5)
1273
+                        deck.playAction("a_fak_left", cur_frame,1, layer=trans_layer, play_mode=0, speed=.5)
1274
+                        trucks.playAction("a_reg", cur_frame,1, layer=trans_layer, play_mode=0, speed=.5)
1275
+                        own['actionTimer'] = cur_frame *2
1276
+                        #own['actionTimer'] = 19
1277
+                else:                     
1195 1278
                     skater.playAction("nfak_pump_left", 10,1, layer=trans_layer, play_mode=0, speed=.5)
1196 1279
                     deck.playAction("a_fak_left", 10,1, layer=trans_layer, play_mode=0, speed=.5)
1197 1280
                     trucks.playAction("a_reg", 10,1, layer=trans_layer, play_mode=0, speed=.5)  
1198
-
1199 1281
                                       
1200 1282
 
1201 1283
             if requestAction == 'reg_opos_out':
@@ -1268,8 +1350,8 @@ def main():
1268 1350
                 trans_playing = skater.isPlayingAction(trans_layer)
1269 1351
                 if trans_playing:
1270 1352
                     cur_frame = skater.getActionFrame(trans_layer)  
1271
-                if l_actionState in ['reg_pump_right', 'reg_pump_left']:
1272
-                    cur_frame = cur_frame * 2              
1353
+                    if l_actionState in ['reg_pump_right', 'reg_pump_left']:
1354
+                        cur_frame = cur_frame * 2              
1273 1355
                 if trans_playing and cur_frame > 2:                
1274 1356
                     skater.playAction("nreg_pump_in", cur_frame,1, layer=trans_layer, play_mode=0, speed=.5)
1275 1357
                     deck.playAction("a_reg", cur_frame,1, layer=trans_layer, play_mode=1, speed=1)
@@ -1286,17 +1368,19 @@ def main():
1286 1368
                 own['actionTimer'] = 19
1287 1369
                 trans_playing = skater.isPlayingAction(trans_layer)
1288 1370
                 if trans_playing:
1289
-                    cur_frame = skater.getActionFrame(trans_layer)
1290
-                
1291
-                if trans_playing and cur_frame > .5:                
1292
-                    skater.playAction("nfak_pump_in", cur_frame,1, layer=trans_layer, play_mode=0, speed=1)
1371
+                    cur_frame = skater.getActionFrame(trans_layer)  
1372
+                    if l_actionState in ['fak_pump_right', 'fak_pump_left']:
1373
+                        cur_frame = cur_frame * 2              
1374
+                if trans_playing and cur_frame > 2:                
1375
+                    skater.playAction("nfak_pump_in", cur_frame,1, layer=trans_layer, play_mode=0, speed=.5)
1293 1376
                     deck.playAction("a_reg", cur_frame,1, layer=trans_layer, play_mode=1, speed=1)
1294 1377
                     trucks.playAction("a_reg", cur_frame,1, layer=trans_layer, play_mode=1, speed=1)
1378
+                    
1295 1379
                     own['actionTimer'] = cur_frame
1296 1380
                 else:                      
1297 1381
                     skater.playAction("nfak_pump_in", 20,1, layer=trans_layer, play_mode=0, speed=1)
1298
-                    deck.playAction("a_reg", 20,1, layer=trans_layer, play_mode=1, speed=1)
1299
-                    trucks.playAction("a_reg", 20,1, layer=trans_layer, play_mode=1, speed=1)
1382
+                    deck.playAction("a_reg", 1,20, layer=trans_layer, play_mode=1, speed=1)
1383
+                    trucks.playAction("a_reg", 1,20, layer=trans_layer, play_mode=1, speed=1) 
1300 1384
 
1301 1385
             if requestAction == 'reg_stop_out':
1302 1386
                 actionState = 'reg_stop_out'
@@ -2890,9 +2974,9 @@ def main():
2890 2974
                     trucks.playAction("a_reg", 1,10, layer=trans_layer, play_mode=0, speed=.5)
2891 2975
                 #loop
2892 2976
                 else:
2893
-                    skater.playAction("nreg_left", 10,30, layer=loop_layer, play_mode=1, speed=.5) 
2894
-                    deck.playAction("a_reg_left", 10,30, layer=loop_layer, play_mode=1, speed=.5)
2895
-                    trucks.playAction("a_reg", 10,30, layer=loop_layer, play_mode=1, speed=.5)
2977
+                    skater.playAction("nreg_left", 10,10, layer=loop_layer, play_mode=1, speed=.5) 
2978
+                    deck.playAction("a_reg_left", 10,10, layer=loop_layer, play_mode=1, speed=.5)
2979
+                    trucks.playAction("a_reg", 10,10, layer=loop_layer, play_mode=1, speed=.5)
2896 2980
             #reg_turnRight        
2897 2981
             if requestAction == 'reg_turnRight':
2898 2982
                 actionState = 'reg_turnRight'
@@ -2910,7 +2994,7 @@ def main():
2910 2994
             if requestAction == 'fak_turnLeft':
2911 2995
                 actionState = 'fak_turnLeft'
2912 2996
                 #in
2913
-                if l_actionState != 'fak_turnLeft':
2997
+                if l_actionState not in ['fak_turnLeft', 'fak_pump_left-leftb']:
2914 2998
                     skater.playAction("nfak_left", 1,10, layer=trans_layer, play_mode=0, speed=.5)
2915 2999
                     deck.playAction("a_fak_left", 1,10, layer=trans_layer, play_mode=0, speed=.5)
2916 3000
                     trucks.playAction("a_reg", 1,10, layer=trans_layer, play_mode=0, speed=.5)
@@ -2923,7 +3007,7 @@ def main():
2923 3007
             if requestAction == 'fak_turnRight':
2924 3008
                 actionState = 'fak_turnRight'
2925 3009
                 #in
2926
-                if l_actionState != 'fak_turnRight':
3010
+                if l_actionState not in ['fak_turnRight', 'fak_pump_right-rightb']:
2927 3011
                     skater.playAction("nfak_right", 1,10, layer=trans_layer, play_mode=0, speed=.5)
2928 3012
                     deck.playAction("a_fak_right", 1,10, layer=trans_layer, play_mode=0, speed=.5)
2929 3013
                     trucks.playAction("a_reg", 1,10, layer=trans_layer, play_mode=0, speed=.5)
@@ -2967,7 +3051,7 @@ def main():
2967 3051
                 actionState = 'fak_pump_left'
2968 3052
                 #in
2969 3053
                 if l_actionState not in ['fak_pump_left', 'fak_pump_left-left', 'fak_left-pump']:
2970
-                    own['actionTimer'] = 19
3054
+                    own['actionTimer'] = 18
2971 3055
                     skater.playAction("nfak_pump_left", 1,10, layer=trans_layer, play_mode=0, speed=.5)
2972 3056
                     deck.playAction("a_fak_left", 1,10, layer=trans_layer, play_mode=0, speed=.5)
2973 3057
                     trucks.playAction("a_reg", 1,10, layer=trans_layer, play_mode=0, speed=.5)
@@ -2981,7 +3065,7 @@ def main():
2981 3065
                 actionState = 'fak_pump_right'
2982 3066
                 #in
2983 3067
                 if l_actionState not in ['fak_pump_right', 'fak_pump_right-right', 'fak_right-pump']:
2984
-                    own['actionTimer'] = 19
3068
+                    own['actionTimer'] = 18
2985 3069
                     skater.playAction("nfak_pump_right", 1,10, layer=trans_layer, play_mode=0, speed=.5)
2986 3070
                     deck.playAction("a_fak_right", 1,10, layer=trans_layer, play_mode=0, speed=.5)
2987 3071
                     trucks.playAction("a_reg", 1,10, layer=trans_layer, play_mode=0, speed=.5)
@@ -3130,7 +3214,7 @@ def main():
3130 3214
                         skater.playAction("nreg_left", 10,1, layer=trans_layer, play_mode=0, speed=.5)
3131 3215
                         deck.playAction("a_reg_left", 10,1, layer=trans_layer, play_mode=0, speed=.5)
3132 3216
                         trucks.playAction("a_reg", 10,1, layer=trans_layer, play_mode=0, speed=.5) 
3133
-                if l_actionState == 'reg_Right':
3217
+                if l_actionState == 'reg_turnRight':
3134 3218
                     trans_playing = skater.isPlayingAction(trans_layer)
3135 3219
                     if trans_playing:
3136 3220
                         cur_frame = skater.getActionFrame(trans_layer)                   
@@ -3140,9 +3224,13 @@ def main():
3140 3224
                         trucks.playAction("a_reg", cur_frame,1, layer=trans_layer, play_mode=0, speed=.5) 
3141 3225
                     else:
3142 3226
                         own['actionTimer'] = 20
3227
+                        requestAction = 'reg_turnRight_out'
3228
+                        actionState = 'reg_turnRight_out'                        
3143 3229
                         skater.playAction("nreg_right", 10,1, layer=trans_layer, play_mode=0, speed=.5)
3144 3230
                         deck.playAction("a_reg_right", 10,1, layer=trans_layer, play_mode=0, speed=.5)
3145 3231
                         trucks.playAction("a_reg", 10,1, layer=trans_layer, play_mode=0, speed=.5) 
3232
+                        
3233
+                        
3146 3234
                 if requestAction == 'reg_roll':
3147 3235
                     actionState = 'reg_roll' 
3148 3236
                     skater.playAction("nreg", 1,60, layer=loop_layer, play_mode=1, speed=.5)
@@ -3325,7 +3413,7 @@ def main():
3325 3413
             #fak_pump
3326 3414
             if requestAction == 'fak_pump':
3327 3415
                 actionState = 'fak_pump'
3328
-                if l_actionState not in ['fak_pump', 'fak_pump_left', 'fak_pump_right', 'fak_pump_left_out', 'fak_pump_right_out']:
3416
+                if l_actionState not in ['fak_pump', 'fak_pump_left', 'fak_pump_right', 'fak_pump_left_out', 'fak_pump_right_out', 'fak_pump_right-rightb', 'fak_pump_left-leftb']:
3329 3417
                     skater.playAction("nfak_pump_in", 1,20, layer=trans_layer, play_mode=0, speed=1)
3330 3418
                     deck.playAction("a_reg", 1,20, layer=trans_layer, play_mode=0, speed=1)
3331 3419
                     trucks.playAction("a_reg", 1,20, layer=trans_layer, play_mode=0, speed=1)    
@@ -4461,7 +4549,7 @@ def main():
4461 4549
         cur_frame = skater.getActionFrame(trans_layer)  
4462 4550
         cur_frame = round(cur_frame, 2)     
4463 4551
     #print("oG: ", og_request, "rA:", requestAction, "|aS:", own['actionState'], "q", queueAction, own['actionTimer'], 'cf', cur_frame)
4464
-    #print("rA:", requestAction, "|aS:", own['actionState'], own['actionTimer'], 'cf', cur_frame)
4552
+    print("rA:", requestAction, "|aS:", own['actionState'], own['actionTimer'], 'cf', cur_frame)
4465 4553
     cur_frame = skater.getActionFrame(trans_layer)
4466 4554
     #print(cur_frame)
4467 4555
     def printplaying():

+ 1
- 1
controller2.py View File

@@ -2568,7 +2568,7 @@ def main():
2568 2568
         except:
2569 2569
             pass 
2570 2570
         psxvel = abs(linVelocity.x)
2571
-        if (lUD > .08 or lUD < -.08) and own['manual_v2'] == False and r_ground.triggered == True and psxvel > .1:
2571
+        if (lUD > .08 or lUD < -.08) and own['manual_v2'] == False and r_ground.triggered == True and psxvel > .1 and own["Pump"] == False:
2572 2572
             if lUD > .08:
2573 2573
                 powerslide()
2574 2574
             else:

Loading…
Cancel
Save