shuvit 6 лет назад
Родитель
Сommit
eb19ff649d
3 измененных файлов: 341 добавлений и 37 удалений
  1. 62
    6
      co_ActionState.py
  2. 277
    30
      controller2.py
  3. 2
    1
      walk.py

+ 62
- 6
co_ActionState.py
Разница между файлами не показана из-за своего большого размера
Просмотреть файл


+ 277
- 30
controller2.py Просмотреть файл

89
     frame = own['framenum']
89
     frame = own['framenum']
90
     frames_since_grinding = frame - lgf
90
     frames_since_grinding = frame - lgf
91
     ground_since = own["framenum"] - own['lF_air_frame']
91
     ground_since = own["framenum"] - own['lF_air_frame']
92
+    gsf = frame - own['grind_start_frame']
92
     own['last_footplant'] = own['footplant_on']
93
     own['last_footplant'] = own['footplant_on']
93
     lastaBut_ground = own['lastaBut_ground'] 
94
     lastaBut_ground = own['lastaBut_ground'] 
94
     lastxBut_ground = own['lastxBut_ground'] 
95
     lastxBut_ground = own['lastxBut_ground'] 
288
             deck.stopAction(x)
289
             deck.stopAction(x)
289
             trucks.stopAction(x) 
290
             trucks.stopAction(x) 
290
 
291
 
292
+    def reset_rtimers_done():
293
+        print('rtimer reset:', q1oncd, q2oncd, q3oncd, q4oncd, q5oncd, q6oncd, q7oncd, q8oncd)
294
+
291
     def reset_rtimers():
295
     def reset_rtimers():
292
         own["Q1oncd"] = 0
296
         own["Q1oncd"] = 0
293
         own["Q2oncd"] = 0
297
         own["Q2oncd"] = 0
304
         q5oncd = 0
308
         q5oncd = 0
305
         q6oncd = 0
309
         q6oncd = 0
306
         q7oncd = 0
310
         q7oncd = 0
307
-        q8oncd = 0    
311
+        q8oncd = 0 
312
+        reset_rtimers_done()   
308
 
313
 
309
     def check_fall():
314
     def check_fall():
310
         playing_frame = 20
315
         playing_frame = 20
1076
             own['requestAction'] = 'fak_kickflip'
1081
             own['requestAction'] = 'fak_kickflip'
1077
             if own["wallride"] != None: 
1082
             if own["wallride"] != None: 
1078
                 jump()
1083
                 jump()
1084
+
1085
+
1086
+    def inward_heelflip():
1087
+        print("inward heelflip")
1088
+        dict['trick_string'] = 'Inward Heelflip'
1089
+        STANCE = own["stance"]
1090
+        if (r_ground.triggered == 1 and STANCE == False) or ((grindHit == True or wallride != None) and STANCE == False):
1091
+            own["wallride_off"] = 1
1092
+            own['requestAction'] = 'reg_inward_heelflip'
1093
+            jump()
1094
+        elif (r_ground.triggered == 1 and STANCE == True) or ((grindHit == True or wallride != None) and STANCE == True):
1095
+            own["wallride_off"] = 1
1096
+            own['requestAction'] = 'fak_inward_heelflip'
1097
+            jump()
1098
+        if r_ground.triggered == 0 and STANCE == False:
1099
+            own["wallride_off"] = 1
1100
+            if own["wallride"] != None: 
1101
+                jump()              
1102
+        elif r_ground.triggered == 0 and STANCE == True:
1103
+            own["wallride_off"] = 1
1104
+            if own["wallride"] != None: 
1105
+                jump()              
1106
+
1107
+    def hardflip():
1108
+        print("hardflip")
1109
+        dict['trick_string'] = 'Hardflip'
1110
+        STANCE = own["stance"]
1111
+        if (r_ground.triggered == 1 and STANCE == False) or ((grindHit == True or wallride != None) and STANCE == False):
1112
+            own["wallride_off"] = 1
1113
+            own['requestAction'] = 'reg_hardflip'
1114
+            jump()
1115
+        elif (r_ground.triggered == 1 and STANCE == True) or ((grindHit == True or wallride != None) and STANCE == True):
1116
+            own["wallride_off"] = 1
1117
+            own['requestAction'] = 'fak_hardflip'
1118
+            jump()
1119
+        if r_ground.triggered == 0 and STANCE == False:
1120
+            own["wallride_off"] = 1
1121
+            if own["wallride"] != None: 
1122
+                jump()              
1123
+        elif r_ground.triggered == 0 and STANCE == True:
1124
+            own["wallride_off"] = 1
1125
+            if own["wallride"] != None: 
1126
+                jump()
1127
+                
1128
+    def nollie_inward_heelflip():
1129
+        print("nollie inward heelflip")
1130
+        dict['trick_string'] = 'Nollie Inward Heelflip'
1131
+        STANCE = own["stance"]
1132
+        if (r_ground.triggered == 1 and STANCE == False) or ((grindHit == True or wallride != None) and STANCE == False):
1133
+            own["wallride_off"] = 1
1134
+            own['requestAction'] = 'reg_nollie_inward_heelflip'
1135
+            jump()
1136
+        elif (r_ground.triggered == 1 and STANCE == True) or ((grindHit == True or wallride != None) and STANCE == True):
1137
+            own["wallride_off"] = 1
1138
+            own['requestAction'] = 'fak_nollie_inward_heelflip'
1139
+            jump()
1140
+        if r_ground.triggered == 0 and STANCE == False:
1141
+            own["wallride_off"] = 1
1142
+            if own["wallride"] != None: 
1143
+                jump()              
1144
+        elif r_ground.triggered == 0 and STANCE == True:
1145
+            own["wallride_off"] = 1
1146
+            if own["wallride"] != None: 
1147
+                jump()
1148
+
1149
+    def nollie_hardflip():
1150
+        print("nollie hardflip")
1151
+        dict['trick_string'] = 'Nollie Hardflip'
1152
+        STANCE = own["stance"]
1153
+        if (r_ground.triggered == 1 and STANCE == False) or ((grindHit == True or wallride != None) and STANCE == False):
1154
+            own["wallride_off"] = 1
1155
+            own['requestAction'] = 'reg_nollie_hardflip'
1156
+            jump()
1157
+        elif (r_ground.triggered == 1 and STANCE == True) or ((grindHit == True or wallride != None) and STANCE == True):
1158
+            own["wallride_off"] = 1
1159
+            own['requestAction'] = 'fak_nollie_hardflip'
1160
+            jump()
1161
+        if r_ground.triggered == 0 and STANCE == False:
1162
+            own["wallride_off"] = 1
1163
+            if own["wallride"] != None: 
1164
+                jump()              
1165
+        elif r_ground.triggered == 0 and STANCE == True:
1166
+            own["wallride_off"] = 1
1167
+            if own["wallride"] != None: 
1168
+                jump()                  
1169
+
1079
                 
1170
                 
1080
     def varial_kickflip():
1171
     def varial_kickflip():
1081
         print("varial kickflip")
1172
         print("varial kickflip")
2979
     if q6oncd > 0 and q5oncd > 0 and q8oncd > 0 and q6oncd <= q5oncd <= q8oncd:
3070
     if q6oncd > 0 and q5oncd > 0 and q8oncd > 0 and q6oncd <= q5oncd <= q8oncd:
2980
         print ("Hardflip")
3071
         print ("Hardflip")
2981
         dict['trick_string'] = 'Hardflip'
3072
         dict['trick_string'] = 'Hardflip'
2982
-        aollie()
2983
-        reset_rtimers()    
3073
+        hardflip()
3074
+        reset_rtimers() 
3075
+        q1oncd = 0
3076
+        q2oncd = 0
3077
+        q3oncd = 0
3078
+        q4oncd = 0
3079
+        q5oncd = 0
3080
+        q6oncd = 0
3081
+        q7oncd = 0
3082
+        q8oncd = 0            
2984
 
3083
 
2985
     # inward heelflip
3084
     # inward heelflip
2986
     # 4 > 5 > 2
3085
     # 4 > 5 > 2
2988
     if q4oncd > 0 and q5oncd > 0 and q2oncd > 0 and q4oncd <= q5oncd <= q2oncd:
3087
     if q4oncd > 0 and q5oncd > 0 and q2oncd > 0 and q4oncd <= q5oncd <= q2oncd:
2989
         print ("Inward Heelflip")
3088
         print ("Inward Heelflip")
2990
         dict['trick_string'] = 'Inward Heelflip'
3089
         dict['trick_string'] = 'Inward Heelflip'
2991
-        aollie()
3090
+        inward_heelflip()
2992
         reset_rtimers()     
3091
         reset_rtimers()     
2993
-
3092
+        q1oncd = 0
3093
+        q2oncd = 0
3094
+        q3oncd = 0
3095
+        q4oncd = 0
3096
+        q5oncd = 0
3097
+        q6oncd = 0
3098
+        q7oncd = 0
3099
+        q8oncd = 0 
2994
     # nollie hard flip
3100
     # nollie hard flip
2995
     # 8 > 1 > 6
3101
     # 8 > 1 > 6
2996
 
3102
 
2997
     if q8oncd > 0 and q1oncd > 0 and q6oncd > 0 and q8oncd <= q1oncd <= q6oncd:
3103
     if q8oncd > 0 and q1oncd > 0 and q6oncd > 0 and q8oncd <= q1oncd <= q6oncd:
2998
         print ("Nollie Hardflip")
3104
         print ("Nollie Hardflip")
2999
         dict['trick_string'] = 'Nollie Hardflip'
3105
         dict['trick_string'] = 'Nollie Hardflip'
3000
-        aollie()
3106
+        nollie_hardflip()
3001
         reset_rtimers()
3107
         reset_rtimers()
3002
-
3108
+        q1oncd = 0
3109
+        q2oncd = 0
3110
+        q3oncd = 0
3111
+        q4oncd = 0
3112
+        q5oncd = 0
3113
+        q6oncd = 0
3114
+        q7oncd = 0
3115
+        q8oncd = 0 
3003
     # nollie inward heelflip
3116
     # nollie inward heelflip
3004
     # 2 > 1 > 4
3117
     # 2 > 1 > 4
3005
 
3118
 
3006
     if q2oncd > 0 and q1oncd > 0 and q4oncd > 0 and q2oncd <= q1oncd <= q4oncd:
3119
     if q2oncd > 0 and q1oncd > 0 and q4oncd > 0 and q2oncd <= q1oncd <= q4oncd:
3007
         print ("Nollie Inward Heelflip")
3120
         print ("Nollie Inward Heelflip")
3008
         dict['trick_string'] = 'Nollie Inward Heelflip'
3121
         dict['trick_string'] = 'Nollie Inward Heelflip'
3009
-        aollie()
3122
+        nollie_inward_heelflip()
3010
         reset_rtimers()    
3123
         reset_rtimers()    
3011
-
3124
+        q1oncd = 0
3125
+        q2oncd = 0
3126
+        q3oncd = 0
3127
+        q4oncd = 0
3128
+        q5oncd = 0
3129
+        q6oncd = 0
3130
+        q7oncd = 0
3131
+        q8oncd = 0 
3012
     # 360 flip
3132
     # 360 flip
3013
     # 3 > 4 > 5 > 8
3133
     # 3 > 4 > 5 > 8
3014
 
3134
 
3021
         dict['trick_string'] = 'Nollie 360 shuvit'
3141
         dict['trick_string'] = 'Nollie 360 shuvit'
3022
         nollie_shuvit360()
3142
         nollie_shuvit360()
3023
         reset_rtimers()
3143
         reset_rtimers()
3024
-
3144
+        q1oncd = 0
3145
+        q2oncd = 0
3146
+        q3oncd = 0
3147
+        q4oncd = 0
3148
+        q5oncd = 0
3149
+        q6oncd = 0
3150
+        q7oncd = 0
3151
+        q8oncd = 0 
3025
     #nollie fs 360 shuvit
3152
     #nollie fs 360 shuvit
3026
     if q7oncd > 0 and q8oncd > 0 and q1oncd > 0 and q2oncd > 0 and q3oncd > 0 and q3oncd <= q2oncd <= q1oncd <= q8oncd <= q7oncd:
3153
     if q7oncd > 0 and q8oncd > 0 and q1oncd > 0 and q2oncd > 0 and q3oncd > 0 and q3oncd <= q2oncd <= q1oncd <= q8oncd <= q7oncd:
3027
         #print("q4oncd: ", q4oncd, " q5oncd: ", q5oncd, " q6oncd: ", q6oncd)
3154
         #print("q4oncd: ", q4oncd, " q5oncd: ", q5oncd, " q6oncd: ", q6oncd)
3029
         dict['trick_string'] = 'Nollie FS 360 shuvit'
3156
         dict['trick_string'] = 'Nollie FS 360 shuvit'
3030
         nollie_fsshuvit360()
3157
         nollie_fsshuvit360()
3031
         reset_rtimers()   
3158
         reset_rtimers()   
3032
-
3159
+        q1oncd = 0
3160
+        q2oncd = 0
3161
+        q3oncd = 0
3162
+        q4oncd = 0
3163
+        q5oncd = 0
3164
+        q6oncd = 0
3165
+        q7oncd = 0
3166
+        q8oncd = 0 
3033
     # varial heelflip
3167
     # varial heelflip
3034
     # 7 < 6 < 2
3168
     # 7 < 6 < 2
3035
     if q7oncd > 0 and q6oncd > 0 and q2oncd > 0 and q7oncd < q6oncd < q2oncd:
3169
     if q7oncd > 0 and q6oncd > 0 and q2oncd > 0 and q7oncd < q6oncd < q2oncd:
3036
         dict['trick_string'] = 'Varial Heelflip'
3170
         dict['trick_string'] = 'Varial Heelflip'
3037
         varial_heelflip()
3171
         varial_heelflip()
3038
         reset_rtimers()
3172
         reset_rtimers()
3039
-        
3173
+        q1oncd = 0
3174
+        q2oncd = 0
3175
+        q3oncd = 0
3176
+        q4oncd = 0
3177
+        q5oncd = 0
3178
+        q6oncd = 0
3179
+        q7oncd = 0
3180
+        q8oncd = 0         
3040
     # varial kickflip 
3181
     # varial kickflip 
3041
     # 3 < 4 < 8
3182
     # 3 < 4 < 8
3042
     if q3oncd > 0 and q4oncd > 0 and q8oncd > 0 and q3oncd < q4oncd < q8oncd:
3183
     if q3oncd > 0 and q4oncd > 0 and q8oncd > 0 and q3oncd < q4oncd < q8oncd:
3043
         dict['trick_string'] = 'Varial Kickflip'
3184
         dict['trick_string'] = 'Varial Kickflip'
3044
         varial_kickflip()
3185
         varial_kickflip()
3045
         reset_rtimers()
3186
         reset_rtimers()
3046
-
3187
+        q1oncd = 0
3188
+        q2oncd = 0
3189
+        q3oncd = 0
3190
+        q4oncd = 0
3191
+        q5oncd = 0
3192
+        q6oncd = 0
3193
+        q7oncd = 0
3194
+        q8oncd = 0 
3047
     # nollie varial kickflip
3195
     # nollie varial kickflip
3048
     # 3 < 2 < 6
3196
     # 3 < 2 < 6
3049
     if q3oncd > 0 and q2oncd > 0 and q6oncd > 0 and q3oncd <= q2oncd <= q6oncd:
3197
     if q3oncd > 0 and q2oncd > 0 and q6oncd > 0 and q3oncd <= q2oncd <= q6oncd:
3051
         print('Nollie Varial Kickflip')
3199
         print('Nollie Varial Kickflip')
3052
         nollie_varial_kickflip()
3200
         nollie_varial_kickflip()
3053
         reset_rtimers()   
3201
         reset_rtimers()   
3054
-        
3202
+        q1oncd = 0
3203
+        q2oncd = 0
3204
+        q3oncd = 0
3205
+        q4oncd = 0
3206
+        q5oncd = 0
3207
+        q6oncd = 0
3208
+        q7oncd = 0
3209
+        q8oncd = 0         
3055
     # nollie varial heelflip
3210
     # nollie varial heelflip
3056
     # 7 < 8 < 4
3211
     # 7 < 8 < 4
3057
     if q7oncd > 0 and q8oncd > 0 and q4oncd > 0 and q7oncd <= q8oncd <= q4oncd:
3212
     if q7oncd > 0 and q8oncd > 0 and q4oncd > 0 and q7oncd <= q8oncd <= q4oncd:
3059
         print('Nollie Varial Heelflip')
3214
         print('Nollie Varial Heelflip')
3060
         nollie_varial_heelflip()
3215
         nollie_varial_heelflip()
3061
         reset_rtimers()   
3216
         reset_rtimers()   
3062
-
3217
+        q1oncd = 0
3218
+        q2oncd = 0
3219
+        q3oncd = 0
3220
+        q4oncd = 0
3221
+        q5oncd = 0
3222
+        q6oncd = 0
3223
+        q7oncd = 0
3224
+        q8oncd = 0 
3063
     #360 shuvit
3225
     #360 shuvit
3064
     if q3oncd > 0 and q4oncd > 0 and q5oncd > 0 and q6oncd > 0 and q7oncd > 0 and q7oncd >= q6oncd >= q5oncd >= q4oncd >= q3oncd:
3226
     if q3oncd > 0 and q4oncd > 0 and q5oncd > 0 and q6oncd > 0 and q7oncd > 0 and q7oncd >= q6oncd >= q5oncd >= q4oncd >= q3oncd:
3065
     #    print("q4oncd: ", q4oncd, " q5oncd: ", q5oncd, " q6oncd: ", q6oncd)
3227
     #    print("q4oncd: ", q4oncd, " q5oncd: ", q5oncd, " q6oncd: ", q6oncd)
3067
         dict['trick_string'] = '360 shuvit'
3229
         dict['trick_string'] = '360 shuvit'
3068
         shuvit360()
3230
         shuvit360()
3069
         reset_rtimers()
3231
         reset_rtimers()
3232
+        q1oncd = 0
3233
+        q2oncd = 0
3234
+        q3oncd = 0
3235
+        q4oncd = 0
3236
+        q5oncd = 0
3237
+        q6oncd = 0
3238
+        q7oncd = 0
3239
+        q8oncd = 0         
3070
     #360 fs shuvit    
3240
     #360 fs shuvit    
3071
     if q3oncd > 0 and q4oncd > 0 and q5oncd > 0 and q6oncd >= 0 and q7oncd > 0 and q7oncd <= q6oncd <= q5oncd <= q4oncd <= q3oncd:
3241
     if q3oncd > 0 and q4oncd > 0 and q5oncd > 0 and q6oncd >= 0 and q7oncd > 0 and q7oncd <= q6oncd <= q5oncd <= q4oncd <= q3oncd:
3072
         dict['trick_string'] = '360 Frontside shuvit'
3242
         dict['trick_string'] = '360 Frontside shuvit'
3073
         fsshuvit360()
3243
         fsshuvit360()
3074
         reset_rtimers()    
3244
         reset_rtimers()    
3075
-
3245
+        q1oncd = 0
3246
+        q2oncd = 0
3247
+        q3oncd = 0
3248
+        q4oncd = 0
3249
+        q5oncd = 0
3250
+        q6oncd = 0
3251
+        q7oncd = 0
3252
+        q8oncd = 0 
3076
     #ollie
3253
     #ollie
3077
     if q5oncd > 0 and q1oncd > 0 and q5oncd < q1oncd:
3254
     if q5oncd > 0 and q1oncd > 0 and q5oncd < q1oncd:
3078
         JUMPSTRENGTH = q1oncd - q5oncd
3255
         JUMPSTRENGTH = q1oncd - q5oncd
3085
            JUMPSTRENGTH = .9               
3262
            JUMPSTRENGTH = .9               
3086
         aollie()
3263
         aollie()
3087
         reset_rtimers()
3264
         reset_rtimers()
3088
-        
3265
+        q1oncd = 0
3266
+        q2oncd = 0
3267
+        q3oncd = 0
3268
+        q4oncd = 0
3269
+        q5oncd = 0
3270
+        q6oncd = 0
3271
+        q7oncd = 0
3272
+        q8oncd = 0         
3089
     #nollie
3273
     #nollie
3090
     if q5oncd > 0 and q1oncd > 0 and q5oncd > q1oncd:
3274
     if q5oncd > 0 and q1oncd > 0 and q5oncd > q1oncd:
3091
         JUMPSTRENGTH = q5oncd - q1oncd
3275
         JUMPSTRENGTH = q5oncd - q1oncd
3099
         nollie()
3283
         nollie()
3100
         reset_rtimers()
3284
         reset_rtimers()
3101
         print("nollie")
3285
         print("nollie")
3102
-
3286
+        q1oncd = 0
3287
+        q2oncd = 0
3288
+        q3oncd = 0
3289
+        q4oncd = 0
3290
+        q5oncd = 0
3291
+        q6oncd = 0
3292
+        q7oncd = 0
3293
+        q8oncd = 0 
3103
     #kickflip
3294
     #kickflip
3104
     if q5oncd > 0 and q8oncd > 0 and q5oncd < q8oncd and q3oncd < 1:
3295
     if q5oncd > 0 and q8oncd > 0 and q5oncd < q8oncd and q3oncd < 1:
3105
         kickflip()
3296
         kickflip()
3106
         reset_rtimers()
3297
         reset_rtimers()
3107
-        
3298
+        q1oncd = 0
3299
+        q2oncd = 0
3300
+        q3oncd = 0
3301
+        q4oncd = 0
3302
+        q5oncd = 0
3303
+        q6oncd = 0
3304
+        q7oncd = 0
3305
+        q8oncd = 0         
3108
     #nollie kickflip
3306
     #nollie kickflip
3109
     if q1oncd > 0 and q6oncd > 0 and q1oncd < q6oncd:
3307
     if q1oncd > 0 and q6oncd > 0 and q1oncd < q6oncd:
3110
         nollie_kickflip()
3308
         nollie_kickflip()
3111
         reset_rtimers()  
3309
         reset_rtimers()  
3112
-
3310
+        q1oncd = 0
3311
+        q2oncd = 0
3312
+        q3oncd = 0
3313
+        q4oncd = 0
3314
+        q5oncd = 0
3315
+        q6oncd = 0
3316
+        q7oncd = 0
3317
+        q8oncd = 0 
3113
     #heelflip
3318
     #heelflip
3114
     if q5oncd > 0 and q2oncd > 0 and q5oncd < q2oncd:
3319
     if q5oncd > 0 and q2oncd > 0 and q5oncd < q2oncd:
3115
         heelflip()
3320
         heelflip()
3116
         reset_rtimers()
3321
         reset_rtimers()
3117
-        
3322
+        q1oncd = 0
3323
+        q2oncd = 0
3324
+        q3oncd = 0
3325
+        q4oncd = 0
3326
+        q5oncd = 0
3327
+        q6oncd = 0
3328
+        q7oncd = 0
3329
+        q8oncd = 0         
3118
     #nollie_heelflip
3330
     #nollie_heelflip
3119
     if q1oncd > 0 and q4oncd > 0 and q1oncd < q4oncd:
3331
     if q1oncd > 0 and q4oncd > 0 and q1oncd < q4oncd:
3120
         nollie_heelflip()
3332
         nollie_heelflip()
3121
         reset_rtimers()
3333
         reset_rtimers()
3122
-           
3334
+        q1oncd = 0
3335
+        q2oncd = 0
3336
+        q3oncd = 0
3337
+        q4oncd = 0
3338
+        q5oncd = 0
3339
+        q6oncd = 0
3340
+        q7oncd = 0
3341
+        q8oncd = 0            
3123
 
3342
 
3124
     #shuvit
3343
     #shuvit
3125
     if q4oncd > 0 and q5oncd > 0 and q6oncd > 0 and q4oncd <= q5oncd <= q6oncd and q3oncd < 1:
3344
     if q4oncd > 0 and q5oncd > 0 and q6oncd > 0 and q4oncd <= q5oncd <= q6oncd and q3oncd < 1:
3126
-       shuvit()
3127
-       reset_rtimers()
3128
-        
3345
+        shuvit()
3346
+        reset_rtimers()
3347
+        q1oncd = 0
3348
+        q2oncd = 0
3349
+        q3oncd = 0
3350
+        q4oncd = 0
3351
+        q5oncd = 0
3352
+        q6oncd = 0
3353
+        q7oncd = 0
3354
+        q8oncd = 0         
3129
     #nollie_shuvit
3355
     #nollie_shuvit
3130
     if q2oncd > 0 and q1oncd > 0 and q8oncd > 0 and q2oncd <= q1oncd <= q8oncd and q3oncd == 0:
3356
     if q2oncd > 0 and q1oncd > 0 and q8oncd > 0 and q2oncd <= q1oncd <= q8oncd and q3oncd == 0:
3131
         nollie_shuvit()
3357
         nollie_shuvit()
3132
         print('nollie shuvit')
3358
         print('nollie shuvit')
3133
         #nollie_fsshuvit()
3359
         #nollie_fsshuvit()
3134
         reset_rtimers()   
3360
         reset_rtimers()   
3135
-        
3361
+        q1oncd = 0
3362
+        q2oncd = 0
3363
+        q3oncd = 0
3364
+        q4oncd = 0
3365
+        q5oncd = 0
3366
+        q6oncd = 0
3367
+        q7oncd = 0
3368
+        q8oncd = 0         
3136
     #fsshuvit
3369
     #fsshuvit
3137
     if q4oncd > 0 and q5oncd > 0 and q6oncd > 0 and q6oncd <= q5oncd <= q4oncd and q7oncd < 1:
3370
     if q4oncd > 0 and q5oncd > 0 and q6oncd > 0 and q6oncd <= q5oncd <= q4oncd and q7oncd < 1:
3138
         fsshuvit()
3371
         fsshuvit()
3139
         reset_rtimers()
3372
         reset_rtimers()
3140
-        
3373
+        q1oncd = 0
3374
+        q2oncd = 0
3375
+        q3oncd = 0
3376
+        q4oncd = 0
3377
+        q5oncd = 0
3378
+        q6oncd = 0
3379
+        q7oncd = 0
3380
+        q8oncd = 0         
3141
     #nollie_fsshuvit
3381
     #nollie_fsshuvit
3142
     if q8oncd > 0 and q1oncd > 0 and q2oncd > 0 and q8oncd <= q1oncd <= q2oncd and q7oncd == 0:
3382
     if q8oncd > 0 and q1oncd > 0 and q2oncd > 0 and q8oncd <= q1oncd <= q2oncd and q7oncd == 0:
3143
         print ("nollie fsshuvit")
3383
         print ("nollie fsshuvit")
3144
         nollie_fsshuvit()
3384
         nollie_fsshuvit()
3145
         reset_rtimers()
3385
         reset_rtimers()
3146
-
3386
+        q1oncd = 0
3387
+        q2oncd = 0
3388
+        q3oncd = 0
3389
+        q4oncd = 0
3390
+        q5oncd = 0
3391
+        q6oncd = 0
3392
+        q7oncd = 0
3393
+        q8oncd = 0 
3147
     #360 shuvit
3394
     #360 shuvit
3148
 
3395
 
3149
     # 360 shuvit
3396
     # 360 shuvit
3325
         lF_air_frame = own['lF_air_frame']
3572
         lF_air_frame = own['lF_air_frame']
3326
         frames_since_ground = framenum - lF_air_frame
3573
         frames_since_ground = framenum - lF_air_frame
3327
         frames_since_grind = framenum - own['last_grind_frame']
3574
         frames_since_grind = framenum - own['last_grind_frame']
3328
-        if grindHit == True and aBut == True:
3575
+        if grindHit == True and aBut == True and ground_since < 10:
3329
             own.linearVelocity.x = 0
3576
             own.linearVelocity.x = 0
3330
             own.linearVelocity.y = 0                         
3577
             own.linearVelocity.y = 0                         
3331
             own['footplant_on'] = 1
3578
             own['footplant_on'] = 1
3342
                     own['requestAction'] = 'fak_fp_rback'
3589
                     own['requestAction'] = 'fak_fp_rback'
3343
                
3590
                
3344
     def invert():    
3591
     def invert():    
3345
-        if grindHit == True and own['grindpos'] == 'reg_board':   
3592
+        if grindHit == True and own['grindpos'] == 'reg_board' and gsf < 10:   
3346
             if lBump == 1:   
3593
             if lBump == 1:   
3347
                 own['invert_on'] = 1
3594
                 own['invert_on'] = 1
3348
                 own.linearVelocity.x = 0
3595
                 own.linearVelocity.x = 0

+ 2
- 1
walk.py Просмотреть файл

1075
                 own['requestAction'] = 'fak_walk_air' 
1075
                 own['requestAction'] = 'fak_walk_air' 
1076
     #if control bottom is touching ground object, turn ground on            
1076
     #if control bottom is touching ground object, turn ground on            
1077
     if cb.positive:
1077
     if cb.positive:
1078
-        if own['framenum'] - own['lF_ground_frame'] > 30:
1078
+        #if own['framenum'] - own['lF_ground_frame'] > 30:
1079
+        if own['framenum'] - own['last_fall_frame'] < 90:
1079
             own['lF_ground_frame'] = own['framenum']
1080
             own['lF_ground_frame'] = own['framenum']
1080
                                     
1081
                                     
1081
                 
1082
                 

Загрузка…
Отмена
Сохранить