shuvit 6 years ago
parent
commit
c0a43d4160
6 changed files with 94 additions and 76 deletions
  1. 3
    2
      Settings.py
  2. 46
    62
      co_ActionState.py
  3. 5
    4
      controller2.py
  4. 5
    1
      grindV2.py
  5. 30
    6
      menuV3.py
  6. 5
    1
      walk.py

+ 3
- 2
Settings.py View File

52
     print("Game play recorder on: ", recorder_on) 
52
     print("Game play recorder on: ", recorder_on) 
53
     #dict = bge.logic.globalDict
53
     #dict = bge.logic.globalDict
54
     dict['recorder_on'] = recorder_on
54
     dict['recorder_on'] = recorder_on
55
-    own['recorder_on'] = recorder_on  
55
+    own['recorder_on'] = recorder_on
56
+    dict['recorder_on'] = recorder_on  
56
     dict["shirt_color_r"] = float(data[16])
57
     dict["shirt_color_r"] = float(data[16])
57
     dict["shirt_color_g"] = float(data[17])
58
     dict["shirt_color_g"] = float(data[17])
58
     dict["shirt_color_b"] = float(data[18])
59
     dict["shirt_color_b"] = float(data[18])
114
         writing.write(str("//show profile")+"\n")
115
         writing.write(str("//show profile")+"\n")
115
         writing.write(str(own["profile"])+"\n")
116
         writing.write(str(own["profile"])+"\n")
116
         writing.write(str("//Game play recorder off/on (0,1)")+"\n")
117
         writing.write(str("//Game play recorder off/on (0,1)")+"\n")
117
-        writing.write(str(own["recorder_on"])+"\n") 
118
+        writing.write(str(own["recorder_on"])+"\n")
118
         writing.write(str("//Shirt color [r,g,b]")+"\n")
119
         writing.write(str("//Shirt color [r,g,b]")+"\n")
119
         writing.write(str(dict["shirt_color_r"])+"\n") #16
120
         writing.write(str(dict["shirt_color_r"])+"\n") #16
120
         writing.write(str(dict["shirt_color_g"])+"\n")
121
         writing.write(str(dict["shirt_color_g"])+"\n")

+ 46
- 62
co_ActionState.py View File

22
     
22
     
23
     pump_out_overList = ['reg_nosegr','reg_nosegl',  'fak_noseg','fak_nosegr', 'fak_nosegl', 'reg_nosegl', 'fak_tailg', 'fak_tailgr', 'fak_tailgl', 'reg_tailg', 'reg_tailgr', 'reg_tailgl', 'reg_tailslide', 'fak_tailslide', 'reg_noseslide', 'fak_noseslide', 'nose_stall','tail_stall', 'reg_5050', 'fak_5050', 'reg_tailg', 'reg_bsboard', 'fak_bsboard', 'reg_fsboard'] 
23
     pump_out_overList = ['reg_nosegr','reg_nosegl',  'fak_noseg','fak_nosegr', 'fak_nosegl', 'reg_nosegl', 'fak_tailg', 'fak_tailgr', 'fak_tailgl', 'reg_tailg', 'reg_tailgr', 'reg_tailgl', 'reg_tailslide', 'fak_tailslide', 'reg_noseslide', 'fak_noseslide', 'nose_stall','tail_stall', 'reg_5050', 'fak_5050', 'reg_tailg', 'reg_bsboard', 'fak_bsboard', 'reg_fsboard'] 
24
     
24
     
25
-    reg_fliplist = ['reg_ollie', 'reg_nollie', 'reg_nollie', 'reg_kickflip', 'reg_varial_kickflip', 'reg_nollie_varial_kickflip', 'reg_nollie_varial_heelflip', 'fak_nollie_varial_heelflip', 'reg_varial_heelflip', 'reg_nollie_kickflip',  'reg_heelflip', 'reg_nollie_heelflip', 'reg_shuvit', 'reg_shuvit360', 'reg_fsshuvit360', 'reg_nollie_shuvit', 'fak_nollie_shuvit', 'reg_fsshuvit', 'fak_fsshuvit',  'reg_nollie_fsshuvit', 'reg_nollie_shuvit360', 'reg_nollie_fsshuvit', 'reg_brfoot', 'reg_frfoot', 'reg_blfoot', 'reg_flfoot', 'reg_inward_heelflip', 'reg_hardflip', 'reg_nollie_inward_heelflip', 'reg_nollie_hardflip'] 
26
-    fak_fliplist = ['fak_ollie', 'fak_nollie', 'fak_nollie', 'fak_kickflip', 'fak_varial_kickflip', 'fak_nollie_varial_kickflip', 'fak_nollie_varial_heelflip', 'fak_nollie_varial_heelflip', 'fak_varial_heelflip', 'fak_nollie_kickflip',  'fak_heelflip','fak_nollie_heelflip', 'fak_shuvit', 'fak_shuvit360', 'fak_fsshuvit360', 'fak_nollie_shuvit', 'fak_nollie_shuvit', 'fak_fsshuvit', 'fak_fsshuvit',  'fak_nollie_fsshuvit', 'fak_nollie_shuvit360', 'fak_nollie_fsshuvit', 'fak_brfoot', 'fak_frfoot', 'fak_blfoot', 'fak_flfoot', 'fak_inward_heelflip', 'fak_hardflip', 'fak_nollie_inward_heelflip', 'fak_nollie_hardflip']     
25
+    reg_fliplist = ['reg_ollie', 'reg_nollie', 'reg_nollie', 'reg_kickflip', 'reg_varial_kickflip', 'reg_nollie_varial_kickflip', 'reg_nollie_varial_heelflip', 'fak_nollie_varial_heelflip', 'reg_varial_heelflip', 'reg_nollie_kickflip',  'reg_heelflip', 'reg_nollie_heelflip', 'reg_shuvit', 'reg_shuvit360', 'reg_fsshuvit360', 'reg_nollie_shuvit', 'fak_nollie_shuvit', 'reg_fsshuvit', 'fak_fsshuvit',  'reg_nollie_fsshuvit', 'reg_nollie_shuvit360', 'reg_nollie_fsshuvit', 'reg_brfoot', 'reg_frfoot', 'reg_blfoot', 'reg_flfoot', 'reg_inward_heelflip', 'reg_hardflip', 'reg_nollie_inward_heelflip', 'reg_nollie_hardflip', 'reg_offboard'] 
26
+    fak_fliplist = ['fak_ollie', 'fak_nollie', 'fak_nollie', 'fak_kickflip', 'fak_varial_kickflip', 'fak_nollie_varial_kickflip', 'fak_nollie_varial_heelflip', 'fak_nollie_varial_heelflip', 'fak_varial_heelflip', 'fak_nollie_kickflip',  'fak_heelflip','fak_nollie_heelflip', 'fak_shuvit', 'fak_shuvit360', 'fak_fsshuvit360', 'fak_nollie_shuvit', 'fak_nollie_shuvit', 'fak_fsshuvit', 'fak_fsshuvit',  'fak_nollie_fsshuvit', 'fak_nollie_shuvit360', 'fak_nollie_fsshuvit', 'fak_brfoot', 'fak_frfoot', 'fak_blfoot', 'fak_flfoot', 'fak_inward_heelflip', 'fak_hardflip', 'fak_nollie_inward_heelflip', 'fak_nollie_hardflip', 'fak_offboard']     
27
 
27
 
28
     #initialize variables
28
     #initialize variables
29
     try:
29
     try:
67
         own['requestAction'] = 'empty'              
67
         own['requestAction'] = 'empty'              
68
 #================
68
 #================
69
     #stance change detection
69
     #stance change detection
70
-    if (requestAction == 'reg_roll' and l_actionState in ('fak_roll', 'fak_land', 'fak_pump_out', 'fak_nopos_out', 'fak_opos_out', 'fak_air-roll')) or l_actionState == 'fak_land' and (requestAction == 'reg_turnLeft' or requestAction == 'reg_turnRight' or requestAction == 'reg_turnLeft_out' or requestAction == 'reg_turnRight_out' or requestAction == 'reg_opos' or requestAction == 'reg_nopos' or requestAction == 'reg_pump' or requestAction == 'reg_push' or requestAction == 'reg_push_goof' or requestAction == 'fak_5050-roll') and requestAction not in ['reg_push', 'reg_push_goof', 'fak_push', 'fak_push_goof'] or (requestAction in ('reg_turnLeft', 'reg_turnRight') and l_actionState in ('fak_turnLeft', 'fak_turnRight')):
70
+    if (requestAction == 'reg_roll' and l_actionState in ('fak_roll', 'fak_land', 'fak_pump_out', 'fak_nopos_out', 'fak_opos_out', 'fak_air-roll', 'fak_fs_powerslide_out', 'fak_bs_powerslide_out', 'fak_nmanual_out', 'fak_manual_out')) or l_actionState == 'fak_land' and (requestAction == 'reg_turnLeft' or requestAction == 'reg_turnRight' or requestAction == 'reg_turnLeft_out' or requestAction == 'reg_turnRight_out' or requestAction == 'reg_opos' or requestAction == 'reg_nopos' or requestAction == 'reg_pump' or requestAction == 'reg_push' or requestAction == 'reg_push_goof' or requestAction == 'fak_5050-roll') and requestAction not in ['reg_push', 'reg_push_goof', 'fak_push', 'fak_push_goof'] or (requestAction in ('reg_turnLeft', 'reg_turnRight') and l_actionState in ('fak_turnLeft', 'fak_turnRight')):
71
         #print("fak-reg_roll")
71
         #print("fak-reg_roll")
72
         requestAction = 'fak-reg_roll'
72
         requestAction = 'fak-reg_roll'
73
         own['requestAction'] = 'fak-reg_roll' 
73
         own['requestAction'] = 'fak-reg_roll' 
74
-    if (requestAction == 'fak_roll' and l_actionState in ('reg_roll', 'reg_land', 'reg_pump_out', 'reg_nopos_out', 'reg_opos_out', 'reg_air-roll')) or l_actionState == 'reg_land' and (requestAction == 'fak_turnLeft' or requestAction == 'fak_turnRight' or requestAction == 'fak_turnLeft_out' or requestAction == 'fak_turnRight_out' or requestAction == 'fak_opos' or requestAction == 'fak_nopos' or requestAction == 'fak_pump' or requestAction == 'fak_push' or requestAction == 'reg_push_goof' or requestAction == 'reg_5050-roll') and requestAction not in ['reg_push', 'reg_push_goof', 'fak_push', 'fak_push_goof'] or (requestAction in ('fak_turnLeft', 'fak_turnRight') and l_actionState in ('reg_turnLeft', 'reg_turnRight')):
74
+    if (requestAction == 'fak_roll' and l_actionState in ('reg_roll', 'reg_land', 'reg_pump_out', 'reg_nopos_out', 'reg_opos_out', 'reg_air-roll', 'reg_fs_powerslide_out', 'reg_bs_powerslide_out', 'reg_nmanual_out', 'reg_manual_out')) or l_actionState == 'reg_land' and (requestAction == 'fak_turnLeft' or requestAction == 'fak_turnRight' or requestAction == 'fak_turnLeft_out' or requestAction == 'fak_turnRight_out' or requestAction == 'fak_opos' or requestAction == 'fak_nopos' or requestAction == 'fak_pump' or requestAction == 'fak_push' or requestAction == 'reg_push_goof' or requestAction == 'reg_5050-roll') and requestAction not in ['reg_push', 'reg_push_goof', 'fak_push', 'fak_push_goof'] or (requestAction in ('fak_turnLeft', 'fak_turnRight') and l_actionState in ('reg_turnLeft', 'reg_turnRight')):
75
         #print("reg-fak_roll")
75
         #print("reg-fak_roll")
76
         requestAction = 'reg-fak_roll'
76
         requestAction = 'reg-fak_roll'
77
         own['requestAction'] = 'reg-fak_roll'
77
         own['requestAction'] = 'reg-fak_roll'
301
             requestAction = 'fak_sit_out'
301
             requestAction = 'fak_sit_out'
302
             actionState = 'fak_sit_out'                                                      
302
             actionState = 'fak_sit_out'                                                      
303
             
303
             
304
-        if l_actionState == 'reg_manual' and requestAction != 'reg_manual':
305
-            if requestAction == 'fak_nmanual':
306
-                requestAction = 'reg-fak_nmanual'
307
-                actionState = 'reg-fak_nmanual'
308
-            else:    
309
-                requestAction = 'reg_manual_out'
310
-                actionState = 'reg_manual_out' 
311
-        if l_actionState == 'fak_manual' and requestAction != 'fak_manual':
312
-            if requestAction == 'reg_nmanual':
313
-                requestAction = 'fak-reg_nmanual'
314
-                actionState = 'fak-reg_manual'            
315
-            else:    
316
-                requestAction = 'fak_manual_out'
317
-                actionState = 'fak_manual_out'                        
318
-        if l_actionState == 'reg_nmanual' and requestAction != 'reg_nmanual':
319
-            if requestAction == 'fak_manual':
320
-                requestAction = 'reg-fak_manual'
321
-                actionState = 'reg-fak_manual'
322
-            else:    
323
-                requestAction = 'reg_nmanual_out'
324
-                actionState = 'reg_nmanual_out' 
325
-                
326
-        if l_actionState == 'fak_nmanual' and requestAction != 'fak_nmanual':
327
-            if requestAction == 'reg_manual':
328
-                requestAction = 'fak-reg_manual'
329
-                actionState = 'fak-reg_manual'
330
-            else:
331
-                requestAction = 'fak_nmanual_out'
332
-                actionState = 'fak_nmanual_out'
304
+
333
                 
305
                 
334
         if l_actionState == 'fak_nmanual_out' and requestAction == 'fak_nmanual':
306
         if l_actionState == 'fak_nmanual_out' and requestAction == 'fak_nmanual':
335
             actionTimer = 0
307
             actionTimer = 0
401
             
373
             
402
         if l_actionState == 'fak_air_tail' and requestAction in ('reg_roll', 'reg_manual', 'fak_land'):
374
         if l_actionState == 'fak_air_tail' and requestAction in ('reg_roll', 'reg_manual', 'fak_land'):
403
             requestAction = 'fak_air_tail to manual'
375
             requestAction = 'fak_air_tail to manual'
404
-            #print('fucking manuals')
405
-            
406
-#        if l_actionState == 'reg_air_tail' and requestAction in ('fak_roll', 'fak_manual'):
407
-#            requestAction = 'reg_manual'
408
-        
376
+
409
         if l_actionState == 'reg_air_tail' and requestAction in ('fak_manual', 'fak_roll', 'reg_land'):
377
         if l_actionState == 'reg_air_tail' and requestAction in ('fak_manual', 'fak_roll', 'reg_land'):
410
             requestAction = 'reg_air_tail to manual'
378
             requestAction = 'reg_air_tail to manual'
411
-            #print('fucking manuals')
412
-               
413
-#        if l_actionState == 'reg_air_tail' and requestAction in ('fak_manual', 'fak_roll'):
414
-#            requestAction = 'fak_nmanual'
415
-            
379
+
416
         if l_actionState == 'fak_air_nose' and requestAction in ('reg_roll', 'reg_nmanual', 'fak_land'):
380
         if l_actionState == 'fak_air_nose' and requestAction in ('reg_roll', 'reg_nmanual', 'fak_land'):
417
             requestAction = 'fak_air_nose to nmanual'
381
             requestAction = 'fak_air_nose to nmanual'
418
-            #print('fucking manuals')
419
             
382
             
420
         if l_actionState == 'reg_air_nose' and requestAction in ('fak_roll', 'fak_nmanual', 'reg_land'):
383
         if l_actionState == 'reg_air_nose' and requestAction in ('fak_roll', 'fak_nmanual', 'reg_land'):
421
             requestAction = 'reg_air_nose to nmanual'
384
             requestAction = 'reg_air_nose to nmanual'
422
-            #print('fucking manuals') 
423
-        #own['requestAction'] = requestAction
424
-#        if l_actionState == 'reg_air_nose' and requestAction in ('fak_nmanual', 'fak_roll', 'reg_nmanual', 'reg_roll', 'reg_manual'):
425
-#            requestAction == 'reg_air_nose to nmanual' 
426
-              
427
-#        if l_actionState == 'reg_air_nose' and requestAction in ('fak_nmanual', 'fak_roll'):
428
-#            requestAction = 'fak_manual' 
429
-
430
-
431
-
432
-#        if requestAction == 'reg_nmanual' and l_requestAction in ['fak-reg_manual', 'reg_nmanual']:
433
-#            requestAction == 'reg_manual'
434
-
435
 
385
 
436
 
386
 
437
 ####
387
 ####
451
             requestAction = 'fak-reg_manual' 
401
             requestAction = 'fak-reg_manual' 
452
             
402
             
453
             
403
             
404
+            
405
+            
406
+            
407
+        if l_actionState in ['reg_manual'] and requestAction != 'reg_manual':
408
+            if requestAction == 'fak_nmanual':
409
+                requestAction = 'reg-fak_nmanual'
410
+                actionState = 'reg-fak_nmanual'
411
+            else:    
412
+                requestAction = 'reg_manual_out'
413
+                actionState = 'reg_manual_out' 
414
+        if l_actionState in ['fak_manual'] and requestAction != 'fak_manual':
415
+            if requestAction == 'reg_nmanual':
416
+                requestAction = 'fak-reg_nmanual'
417
+                actionState = 'fak-reg_manual'            
418
+            else:    
419
+                requestAction = 'fak_manual_out'
420
+                actionState = 'fak_manual_out'                        
421
+        if l_actionState in ['reg_nmanual'] and requestAction != 'reg_nmanual':
422
+            if requestAction == 'fak_manual':
423
+                requestAction = 'reg-fak_manual'
424
+                actionState = 'reg-fak_manual'
425
+            else:    
426
+                requestAction = 'reg_nmanual_out'
427
+                actionState = 'reg_nmanual_out' 
428
+                
429
+        if l_actionState in ['fak_nmanual'] and requestAction != 'fak_nmanual':
430
+            if requestAction == 'reg_manual':
431
+                requestAction = 'fak-reg_manual'
432
+                actionState = 'fak-reg_manual'
433
+            else:
434
+                requestAction = 'fak_nmanual_out'
435
+                actionState = 'fak_nmanual_out'            
436
+            
454
 #        if l_actionState == 'fak_air_nose to nmanual' and requestAction in ['reg_nmanual', 'reg_manual']:
437
 #        if l_actionState == 'fak_air_nose to nmanual' and requestAction in ['reg_nmanual', 'reg_manual']:
455
 #            requestAction = 'fak-reg_manual'  
438
 #            requestAction = 'fak-reg_manual'  
456
             #print('this???')
439
             #print('this???')
474
         if l_actionState == 'reg_air_nose to nmanual' and requestAction == 'fak_roll':
457
         if l_actionState == 'reg_air_nose to nmanual' and requestAction == 'fak_roll':
475
             requestAction = 'reg_nmanual_out'
458
             requestAction = 'reg_nmanual_out'
476
         if l_actionState == 'fak_air_nose to nmanual' and requestAction == 'reg_roll':
459
         if l_actionState == 'fak_air_nose to nmanual' and requestAction == 'reg_roll':
477
-            requestAction = 'fak_nmanual_out'            
460
+            requestAction = 'fak_nmanual_out' 
461
+                                  
478
         if l_actionState == 'reg_air_tail to manual' and requestAction == 'fak_roll':
462
         if l_actionState == 'reg_air_tail to manual' and requestAction == 'fak_roll':
479
             requestAction = 'reg_manual_out'
463
             requestAction = 'reg_manual_out'
480
         if l_actionState == 'fak_air_tail to manual' and requestAction == 'reg_roll':
464
         if l_actionState == 'fak_air_tail to manual' and requestAction == 'reg_roll':
1743
                 deck.playAction("a_fak_noffboard", 10,1, layer=trans_layer, play_mode=0, speed=.5)
1727
                 deck.playAction("a_fak_noffboard", 10,1, layer=trans_layer, play_mode=0, speed=.5)
1744
                 trucks.playAction("a_fak_noffboard", 10,1, layer=trans_layer, play_mode=0, speed=.5)
1728
                 trucks.playAction("a_fak_noffboard", 10,1, layer=trans_layer, play_mode=0, speed=.5)
1745
                 
1729
                 
1746
-            if requestAction == 'reg_offboard':
1730
+            if requestAction == 'reg_offboard' and l_actionState != 'reg_offboard':
1747
                 actionState = 'reg_offboard'
1731
                 actionState = 'reg_offboard'
1748
                 own['actionTimer'] = 60
1732
                 own['actionTimer'] = 60
1749
                 skater.playAction("reg_noffboard", 1,30, layer=trans_layer, play_mode=0, speed=.5)
1733
                 skater.playAction("reg_noffboard", 1,30, layer=trans_layer, play_mode=0, speed=.5)
1750
                 deck.playAction("a_reg_noffboard", 1,30, layer=trans_layer, play_mode=0, speed=.5)
1734
                 deck.playAction("a_reg_noffboard", 1,30, layer=trans_layer, play_mode=0, speed=.5)
1751
                 trucks.playAction("a_reg_noffboard", 1,30, layer=trans_layer, play_mode=0, speed=.5)
1735
                 trucks.playAction("a_reg_noffboard", 1,30, layer=trans_layer, play_mode=0, speed=.5)
1752
 
1736
 
1753
-            if requestAction == 'fak_offboard':
1737
+            if requestAction == 'fak_offboard' and l_actionState != 'fak_offboard':
1754
                 actionState = 'fak_offboard'                
1738
                 actionState = 'fak_offboard'                
1755
                 own['actionTimer'] = 60
1739
                 own['actionTimer'] = 60
1756
                 skater.playAction("fak_noffboard", 1,30, layer=trans_layer, play_mode=0, speed=.5)
1740
                 skater.playAction("fak_noffboard", 1,30, layer=trans_layer, play_mode=0, speed=.5)
3829
     if trans_playing:
3813
     if trans_playing:
3830
         cur_frame = skater.getActionFrame(trans_layer)  
3814
         cur_frame = skater.getActionFrame(trans_layer)  
3831
         cur_frame = round(cur_frame, 2)     
3815
         cur_frame = round(cur_frame, 2)     
3832
-    #print("oG: ", og_request, "rA:", requestAction, "|aS:", own['actionState'], "q", queueAction, own['actionTimer'], 'cf', cur_frame)
3833
-    print("rA:", requestAction, "|aS:", own['actionState'], own['actionTimer'], 'cf', cur_frame)
3816
+    print("oG: ", og_request, "rA:", requestAction, "|aS:", own['actionState'], "q", queueAction, own['actionTimer'], 'cf', cur_frame)
3817
+    #print("rA:", requestAction, "|aS:", own['actionState'], own['actionTimer'], 'cf', cur_frame)
3834
     cur_frame = skater.getActionFrame(trans_layer)
3818
     cur_frame = skater.getActionFrame(trans_layer)
3835
     #print(cur_frame)
3819
     #print(cur_frame)
3836
     def printplaying():
3820
     def printplaying():

+ 5
- 4
controller2.py View File

4126
         reg_rot2 = .26
4126
         reg_rot2 = .26
4127
         reg_move2 = .13
4127
         reg_move2 = .13
4128
         bsforce = 50
4128
         bsforce = 50
4129
-        bs_dloc = .03
4129
+        bs_dloc = .04
4130
         outvel = own.linearVelocity
4130
         outvel = own.linearVelocity
4131
         if own["coping"] == 1:
4131
         if own["coping"] == 1:
4132
             reg_rot = reg_rot *3
4132
             reg_rot = reg_rot *3
4182
                         STANCE = False
4182
                         STANCE = False
4183
             if own['grind_out_type'] == 'bs reg back' or own['grind_out_type'] == 'bs fak forward':
4183
             if own['grind_out_type'] == 'bs reg back' or own['grind_out_type'] == 'bs fak forward':
4184
                 if own['gt_cd2'] > 50:
4184
                 if own['gt_cd2'] > 50:
4185
+                    print('a')
4185
                     if STANCE == True:
4186
                     if STANCE == True:
4186
                         own.applyForce([bsforce, 0, 0], True)
4187
                         own.applyForce([bsforce, 0, 0], True)
4187
                     if STANCE == False:
4188
                     if STANCE == False:
4189
                     own.applyMovement([bs_dloc,0,0], True)    
4190
                     own.applyMovement([bs_dloc,0,0], True)    
4190
             if own['grind_out_type'] == 'bs fak back' or own['grind_out_type'] == 'bs reg forward':
4191
             if own['grind_out_type'] == 'bs fak back' or own['grind_out_type'] == 'bs reg forward':
4191
                 if own['gt_cd2'] > 50:
4192
                 if own['gt_cd2'] > 50:
4193
+                    print('b')
4192
                     if STANCE == True:
4194
                     if STANCE == True:
4193
                         own.applyForce([-bsforce, 0, 0], True)
4195
                         own.applyForce([-bsforce, 0, 0], True)
4194
                     if STANCE == False:
4196
                     if STANCE == False:
4375
         if frames_since_ground < 10 and (abs(lastx) - abs(linvelx)) > .5:
4377
         if frames_since_ground < 10 and (abs(lastx) - abs(linvelx)) > .5:
4376
             print('**_____________land boost')
4378
             print('**_____________land boost')
4377
             force = (lastx, linVelocity.y, linVelocity.z )                    
4379
             force = (lastx, linVelocity.y, linVelocity.z )                    
4378
-            own.setLinearVelocity(force, True)             
4379
-        
4380
+            own.setLinearVelocity(force, True)                 
4380
     
4381
     
4381
     jump_Timer()
4382
     jump_Timer()
4382
     check_landing()
4383
     check_landing()
4444
         own.applyForce(force2, True)
4445
         own.applyForce(force2, True)
4445
     if (grindDar == False and r_ground.triggered and own['grindTouch'] == False) or own['jump_timer'] > 40:
4446
     if (grindDar == False and r_ground.triggered and own['grindTouch'] == False) or own['jump_timer'] > 40:
4446
         own['grindType'] = ''
4447
         own['grindType'] = ''
4447
-        
4448
+   
4448
     #print('q1:', q1oncd, 'q2:', q2oncd, 'q3:', q3oncd, 'q4:', q4oncd, 'q5:', q5oncd, 'q6:', q6oncd, 'q7:', q7oncd, 'q8:', q8oncd)     
4449
     #print('q1:', q1oncd, 'q2:', q2oncd, 'q3:', q3oncd, 'q4:', q4oncd, 'q5:', q5oncd, 'q6:', q6oncd, 'q7:', q7oncd, 'q8:', q8oncd)     

+ 5
- 1
grindV2.py View File

84
         no_grind = 1
84
         no_grind = 1
85
     
85
     
86
     #check manual
86
     #check manual
87
-    manual = 0
87
+    if (own['fak_nmanual'] == 1 or own['reg_nmanual'] == 1 or own['fak_manual'] == 1 or own['reg_manual'] == 1):
88
+        manual = 1    
89
+    else:
90
+        manual = 0
91
+    #manual = own['manual']
88
     own["nogrindsound"] = 0
92
     own["nogrindsound"] = 0
89
     
93
     
90
 #---------###########___###########-----------    
94
 #---------###########___###########-----------    

+ 30
- 6
menuV3.py View File

472
             b += .1
472
             b += .1
473
         else:
473
         else:
474
             b -= .1    
474
             b -= .1    
475
-        dict['cam_max'] = round(b,2)                 
475
+        dict['cam_max'] = round(b,2) 
476
+        
477
+    if funct == 'recorder on':
478
+        if motion == 'inc':
479
+            cam['recorder_on'] = 1
480
+            dict['recorder_on'] = 1
481
+        else:         
482
+            cam['recorder_on'] = 0
483
+            dict['recorder_on'] = 0                        
476
         
484
         
477
         
485
         
478
     #levels
486
     #levels
552
             #Settings.loadlevel()
560
             #Settings.loadlevel()
553
             dict['load_timer'] = load_timer
561
             dict['load_timer'] = load_timer
554
             dict['reload_timer'] = 250
562
             dict['reload_timer'] = 250
555
-            dict['overlay_fadein'] = 1  
563
+            dict['overlay_fadein'] = 1 
564
+            
565
+    if funct == 'Shop':
566
+        if motion == 'inc':
567
+            level = "shop"
568
+            main_empty["level"] = "shop"
569
+            own["level"] = level
570
+            Settings.writeSettings()
571
+            Settings.readSettings()
572
+            #cont.activate(own.actuators['restart']) 
573
+            #Settings.loadlevel()
574
+            dict['load_timer'] = load_timer
575
+            dict['reload_timer'] = 250
576
+            dict['overlay_fadein'] = 1              
556
                                          
577
                                          
557
                                          
578
                                          
558
 #'1920x1080', '1280x720', '1024x768', '800x600', 'fullscreen'                            
579
 #'1920x1080', '1280x720', '1024x768', '800x600', 'fullscreen'                            
625
         #if opt == 'settings':
646
         #if opt == 'settings':
626
             dict['current_list'] = ['resolution', 'graphics', 'player', 'level', 'camera', 'physics']
647
             dict['current_list'] = ['resolution', 'graphics', 'player', 'level', 'camera', 'physics']
627
         if dict['lv0_opt'] == 'replay':
648
         if dict['lv0_opt'] == 'replay':
628
-            dict['current_list'] = ['enter replay', 'recorder on', 'record length'] 
649
+            dict['current_list'] = ['enter replay (n/a)', 'recorder on', 'record length (n/a)'] 
629
         if dict['lv0_opt'] == 'level':
650
         if dict['lv0_opt'] == 'level':
630
-            dict['current_list'] = ['Demo Scene', 'Empty Lot', 'Training', 'Spine', 'Warehouse', 'Slavonski Brod (WIP)']  
651
+            dict['current_list'] = ['Demo Scene', 'Empty Lot', 'Training', 'Spine', 'Warehouse', 'Shop', 'Slavonski Brod (WIP)']  
631
             
652
             
632
     if dict['mlevel'] == 2:
653
     if dict['mlevel'] == 2:
633
         if dict['lv1_opt'] == 'resolution':
654
         if dict['lv1_opt'] == 'resolution':
791
     dict['mlevel'] = 0
812
     dict['mlevel'] = 0
792
     dict['current_opt'] = ''
813
     dict['current_opt'] = ''
793
     dict['pause_menu_text'] = ''
814
     dict['pause_menu_text'] = ''
794
-    dict['menu_end_points'] = ['exit', 'restart', 'shirt color r', 'shirt color g', 'shirt color b', 'shoe color r', 'shoe color g', 'shoe color b','deck color r', 'deck color g', 'deck color b', 'shirt logo', 'brightness / contrast on', 'brightness value', 'contrast value', 'hdr on', 'avgL', 'hdr strength', 'ao on', 'ao radius', 'ao width', 'ao only', 'dof on', 'sun strength', 'sun rot x', 'sun rot y', 'shadow on', 'ambient strength', 'Demo Scene', 'Empty Lot', 'Park A', 'Training', 'Spine', 'Warehouse', '1920x1080', '1280x720', '1024x768', '800x600', 'fullscreen', 'bloom on', 'cam height', 'focal length', 'min dist', 'max dist', 'enter replay', 'recorder on', 'record length']
815
+    dict['menu_end_points'] = ['exit', 'restart', 'shirt color r', 'shirt color g', 'shirt color b', 'shoe color r', 'shoe color g', 'shoe color b','deck color r', 'deck color g', 'deck color b', 'shirt logo', 'brightness / contrast on', 'brightness value', 'contrast value', 'hdr on', 'avgL', 'hdr strength', 'ao on', 'ao radius', 'ao width', 'ao only', 'dof on', 'sun strength', 'sun rot x', 'sun rot y', 'shadow on', 'ambient strength', 'Demo Scene', 'Empty Lot', 'Park A', 'Training', 'Spine', 'Warehouse', 'Shop', '1920x1080', '1280x720', '1024x768', '800x600', 'fullscreen', 'bloom on', 'cam height', 'focal length', 'min dist', 'max dist', 'enter replay', 'recorder on', 'record length', 'enter replay (n/a)', 'recorder on', 'record length (n/a)']
795
     
816
     
796
 def output(dict):
817
 def output(dict):
797
     try:
818
     try:
894
         if dict['current_opt'] ==  'min dist':
915
         if dict['current_opt'] ==  'min dist':
895
             outp = outp + '(1.6): ' + str(dict['cam_min'])  
916
             outp = outp + '(1.6): ' + str(dict['cam_min'])  
896
         if dict['current_opt'] ==  'max dist':
917
         if dict['current_opt'] ==  'max dist':
897
-            outp = outp + '(2.4): ' + str(dict['cam_max'])                                                                                         
918
+            outp = outp + '(2.4): ' + str(dict['cam_max'])  
919
+        if dict['current_opt'] ==  'recorder on':
920
+            outp = outp + ': ' + str(dict['recorder_on']) 
921
+                                
898
             
922
             
899
     dict['pause_menu_text'] = outp
923
     dict['pause_menu_text'] = outp
900
 def main(cont):
924
 def main(cont):

+ 5
- 1
walk.py View File

325
 def onboard():
325
 def onboard():
326
     if own['walk'] == 0:
326
     if own['walk'] == 0:
327
         print("start walking")
327
         print("start walking")
328
+        own['walk_idling'] = 0
328
         if own['framenum'] > 100 and own['fall'] == False:
329
         if own['framenum'] > 100 and own['fall'] == False:
329
             #pass
330
             #pass
330
             cont.activate(own.actuators['pop'])
331
             cont.activate(own.actuators['pop'])
445
         fliplay3 = 6000 
446
         fliplay3 = 6000 
446
         onboard_speed = .1                                      
447
         onboard_speed = .1                                      
447
         own['getonboard'] = 0 
448
         own['getonboard'] = 0 
449
+        own['walk_idling'] = 0
448
     if (yBut == False and lasty == True) or (yBut == True or dict['kb_q'] == 2) and dropinCol.positive:
450
     if (yBut == False and lasty == True) or (yBut == True or dict['kb_q'] == 2) and dropinCol.positive:
449
         deckact = deck.actuators["Visibility"]
451
         deckact = deck.actuators["Visibility"]
450
         trucksact = trucks.actuators["Visibility"]
452
         trucksact = trucks.actuators["Visibility"]
468
         throw_deck_empty = scene.objects["throw_deck_empty"]
470
         throw_deck_empty = scene.objects["throw_deck_empty"]
469
         throw_deck_empty['kill_deck'] = 1 
471
         throw_deck_empty['kill_deck'] = 1 
470
     if (yBut == False and lasty == True) or dict['kb_q'] == 3:               
472
     if (yBut == False and lasty == True) or dict['kb_q'] == 3:               
471
-        own['getonboard'] = 1       
473
+        own['getonboard'] = 1 
474
+        own['walk_idling'] = 0      
472
 
475
 
473
 def nextframe():
476
 def nextframe():
474
     framenumber = own["framenum"]
477
     framenumber = own["framenum"]
1114
 own['lastrts'] = rtsBut        
1117
 own['lastrts'] = rtsBut        
1115
 own['lastbkBut'] = bkBut
1118
 own['lastbkBut'] = bkBut
1116
 own['dropinCol'] = dropinCol
1119
 own['dropinCol'] = dropinCol
1120
+#if own['actionTimer'] < 1:
1117
 own['walk'] = 1
1121
 own['walk'] = 1
1118
     
1122
     

Loading…
Cancel
Save