shuvit 5 years ago
parent
commit
f52ceb2d32

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


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


+ 163
- 99
scripts/actionPlayer.py View File

@@ -22,7 +22,7 @@ def actionPlayer(ac):
22 22
 	#--------------------------------
23 23
 	skater.playAction(name, start,end, layer=layer, play_mode=mode, speed=speed, blendin=blendin)
24 24
 	deck.playAction(dname, dstart,dend, layer=layer, play_mode=mode, speed=speed, blendin=blendin)
25
-
25
+	#print('playing', name)
26 26
 
27 27
 def get_frame(ac):
28 28
 	skater = dict['p1']
@@ -38,13 +38,21 @@ def set_frame(ac, frame):
38 38
 	deck.setActionFrame(frame, layer)
39 39
 	print('setting frame', frame)
40 40
 
41
-def check_exit(aState, rA, ac):
41
+def check_exit(aState, rA, timer, ac):
42 42
 	exits = getattr(ac, 'exits')
43
+	force = getattr(ac, 'force_exit')
44
+	fe = getattr(ac, 'fef')
43 45
 	if rA in exits:
44 46
 		return rA
45 47
 	else:
46 48
 		return aState
47 49
 
50
+	if force != None and fe >= timer:
51
+		return force
52
+			
53
+
54
+	
55
+
48 56
 
49 57
 def state_timer(own):
50 58
 	if own['aState'] == own['l_aState']:
@@ -66,147 +74,201 @@ def main(cont):
66 74
 	og_state = own['aState']
67 75
 	aState = own['aState']
68 76
 	rA = own['requestAction']
77
+	timer = own['stateTimer']
78
+	newState = own['aState']
69 79
 	
70 80
 	#-----------------------
71
-	if aState == 'reg_idle':
72
-		actionPlayer(actionsFSMlist.reg_idle)
73
-		aState = check_exit(aState, rA, actionsFSMlist.reg_idle)
74
-		
75
-	elif aState == 'reg_idle2':
76
-		actionPlayer(actionsFSMlist.reg_idle2)
77
-		aState = check_exit(aState, rA, actionsFSMlist.reg_idle2)
78
-
79
-	elif aState == 'reg_idle3':
80
-		actionPlayer(actionsFSMlist.reg_idle3)
81
-		aState = check_exit(aState, rA, actionsFSMlist.reg_idle3)
81
+	check_state = 'reg_idle'
82
+	if aState == check_state:
83
+		cl = getattr(actionsFSMlist, check_state)
84
+		actionPlayer(cl)
85
+		newState = check_exit(aState, rA, timer, cl)
86
+
87
+	check_state = 'reg_idle2'	
88
+	if aState == check_state:
89
+		cl = getattr(actionsFSMlist, check_state)
90
+		actionPlayer(cl)
91
+		newState = check_exit(aState, rA, timer, cl)
92
+
93
+	check_state = 'reg_idle3'
94
+	if aState == check_state:
95
+		cl = getattr(actionsFSMlist, check_state)
96
+		actionPlayer(cl)
97
+		newState = check_exit(aState, rA, timer, cl)
82 98
 	
83
-	elif aState == 'reg_idle4':
84
-		actionPlayer(actionsFSMlist.reg_idle4)
85
-		aState = check_exit(aState, rA, actionsFSMlist.reg_idle4)
86
-
87
-	elif aState == 'reg_idle5':
88
-		actionPlayer(actionsFSMlist.reg_idle5)
89
-		aState = check_exit(aState, rA, actionsFSMlist.reg_idle5)
99
+	check_state = 'reg_idle4'
100
+	if aState == check_state:
101
+		cl = getattr(actionsFSMlist, check_state)
102
+		actionPlayer(cl)
103
+		newState = check_exit(aState, rA, timer, cl)
104
+
105
+	check_state = 'reg_idle5'
106
+	if aState == check_state:
107
+		cl = getattr(actionsFSMlist, check_state)
108
+		actionPlayer(cl)
109
+		newState = check_exit(aState, rA, timer, cl)
90 110
 	
91
-	elif aState == 'reg_jump':
92
-		actionPlayer(actionsFSMlist.reg_jump)
93
-		aState = check_exit(aState, rA, actionsFSMlist.reg_jump)
111
+	check_state = 'reg_jump'
112
+	if aState == check_state:
113
+		cl = getattr(actionsFSMlist, check_state)
114
+		actionPlayer(cl)
115
+		if own['stateTimer'] > getattr(cl, 'fef'):
116
+			nl = getattr(cl, 'force_exit')
117
+			na = getattr(actionsFSMlist, nl)
118
+
119
+			newState = check_exit(aState, rA, timer, cl)
94 120
 	
95
-	elif aState == 'reg_walk_air':
96
-		actionPlayer(actionsFSMlist.reg_walk_air)
121
+	check_state = 'reg_walk_air'
122
+	if aState == check_state:
123
+		cl = getattr(actionsFSMlist, check_state)
124
+		actionPlayer(cl)
97 125
 		if aState != rA:
98
-			aState = 'reg_walk_air_out'
99
-
100
-	elif aState == 'reg_walk_air_out':
101
-		actionPlayer(actionsFSMlist.reg_walk_air_out)
102
-		if own['stateTimer'] > 7:
103
-			aState = check_exit(aState, rA, actionsFSMlist.reg_walk_air_out)		
104
-		
105
-	elif aState == 'reg_sit':
106
-
126
+			newState = 'reg_walk_air_out'
127
+	
128
+	check_state = 'reg_walk_air_out' 			
129
+	if aState == check_state:
130
+		cl = getattr(actionsFSMlist, check_state)
131
+		actionPlayer(cl)
132
+		print(own['stateTimer'], getattr(cl, 'fef'))
133
+		if own['stateTimer'] > getattr(cl, 'fef'):	
134
+			#newState = check_exit(aState, rA, timer, actionsFSMlist.reg_idle)
135
+			newState = getattr(cl, 'force_exit')
136
+
137
+	check_state = 'reg_sit'
138
+	if aState == check_state:
139
+		cl = getattr(actionsFSMlist, check_state)
107 140
 		if own['stateTimer'] < 19:
108 141
 			actionPlayer(actionsFSMlist.reg_sit_in)
109 142
 		else:
110
-			actionPlayer(actionsFSMlist.reg_sit)
111
-		aState = check_exit(aState, rA, actionsFSMlist.reg_sit)
143
+			actionPlayer(cl)
144
+		newState = check_exit(aState, rA, timer, actionsFSMlist.reg_sit)
112 145
 
113 146
 	#-----------------------
114
-	elif aState == 'reg_walk':
115
-		
147
+	check_state = 'reg_walk'
148
+	if aState == check_state:
149
+		cl = getattr(actionsFSMlist, check_state)
116 150
 		if own['l_aState'] == 'reg_walkFast':
117 151
 			print('--------------------doing last frame')
118 152
 			frame = get_frame(actionsFSMlist.reg_walkFast)
119
-			actionPlayer(actionsFSMlist.reg_walk)
153
+			actionPlayer(cl)
120 154
 			set_frame(actionsFSMlist.reg_walk, frame)
121 155
 		else:	
122
-			frame = actionPlayer(actionsFSMlist.reg_walk)
156
+			frame = actionPlayer(cl)
123 157
 		
124
-		aState = check_exit(aState, rA, actionsFSMlist.reg_walk)
158
+		newState = check_exit(aState, rA, timer, cl)
125 159
 
126 160
 	#-----------------------
127
-	elif aState == 'reg_walkFast':
128
-		
129
-		aState = check_exit(aState, rA, actionsFSMlist.reg_walkFast)
161
+	check_state = 'reg_walkFast'
162
+	if aState == check_state:
163
+		cl = getattr(actionsFSMlist, check_state)
164
+		newState = check_exit(aState, rA, timer, actionsFSMlist.reg_walkFast)
130 165
 
131 166
 		if own['l_aState'] == 'reg_walk':
132 167
 			print('--------------------doing last framebbbb')
133 168
 			frame = get_frame(actionsFSMlist.reg_walk)
134
-			actionPlayer(actionsFSMlist.reg_walkFast)
169
+			actionPlayer(cl)
135 170
 			set_frame(actionsFSMlist.reg_walkFast, frame)
136 171
 
137 172
 		else:
138
-			actionPlayer(actionsFSMlist.reg_walkFast)
173
+			actionPlayer(cl)
139 174
 		#print(frame)
140 175
 
141 176
 
142
-
143
-	elif aState == 'reg_onboard':
144
-		actionPlayer(actionsFSMlist.reg_onboard)
177
+	check_state = 'reg_onboard'
178
+	if aState == check_state:
179
+		cl = getattr(actionsFSMlist, check_state)
180
+		actionPlayer(cl)
145 181
 		if own['stateTimer'] > 10:
146
-			aState = check_exit(aState, rA, actionsFSMlist.reg_onboard)
182
+			newState = check_exit(aState, rA, timer, actionsFSMlist.reg_onboard)
147 183
 
148
-	elif aState == 'reg_offboard':
149
-		actionPlayer(actionsFSMlist.reg_offboard)
184
+	check_state = 'reg_offboard'
185
+	if aState == check_state:
186
+		cl = getattr(actionsFSMlist, check_state)
187
+		actionPlayer(cl)
150 188
 		if own['stateTimer'] > 20:
151
-			aState = check_exit(aState, rA, actionsFSMlist.reg_offboard)			
152
-
153
-	elif aState == 'reg_roll':
154
-		actionPlayer(actionsFSMlist.reg_roll)
155
-		aState = check_exit(aState, rA, actionsFSMlist.reg_roll)
156
-
157
-	elif aState == 'reg_turnLeft':
158
-		actionPlayer(actionsFSMlist.reg_turnLeft)
159
-		aState = check_exit(aState, rA, actionsFSMlist.reg_turnLeft)
189
+			newState = check_exit(aState, rA, timer, actionsFSMlist.reg_offboard)			
190
+
191
+	check_state = 'reg_roll'
192
+	if aState == check_state:
193
+		cl = getattr(actionsFSMlist, check_state)
194
+		actionPlayer(cl)
195
+		newState = check_exit(aState, rA, timer, cl)
196
+
197
+	check_state = 'reg_turnLeft'
198
+	if aState == check_state:
199
+		cl = getattr(actionsFSMlist, check_state)
200
+		actionPlayer(cl)
201
+		newState = check_exit(aState, rA, timer, cl)
160 202
 	
161
-	elif aState == 'reg_turnRight':
162
-		actionPlayer(actionsFSMlist.reg_turnRight)
163
-		aState = check_exit(aState, rA, actionsFSMlist.reg_turnRight)
164
-
165
-	elif aState == 'reg_opos':
166
-		actionPlayer(actionsFSMlist.reg_opos)
167
-		aState = check_exit(aState, rA, actionsFSMlist.reg_opos)		
168
-
169
-	elif aState == 'reg_nopos':
170
-		actionPlayer(actionsFSMlist.reg_nopos)
171
-		aState = check_exit(aState, rA, actionsFSMlist.reg_nopos)		
172
-
173
-	elif aState == 'reg_pump':
174
-		actionPlayer(actionsFSMlist.reg_pump)
175
-		aState = check_exit(aState, rA, actionsFSMlist.reg_pump)		
176
-
177
-	elif aState == 'reg_push':
178
-		actionPlayer(actionsFSMlist.reg_push)
203
+	check_state = 'reg_turnRight'
204
+	if aState == check_state:
205
+		cl = getattr(actionsFSMlist, check_state)
206
+		actionPlayer(cl)
207
+		newState = check_exit(aState, rA, timer, cl)
208
+
209
+	check_state = 'reg_opos'
210
+	if aState == check_state:
211
+		cl = getattr(actionsFSMlist, check_state)
212
+		actionPlayer(cl)
213
+		newState = check_exit(aState, rA, timer, cl)		
214
+	
215
+	check_state = 'reg_nopos'
216
+	if aState == check_state:
217
+		cl = getattr(actionsFSMlist, check_state)
218
+		actionPlayer(cl)
219
+		newState = check_exit(aState, rA, timer, cl)		
220
+
221
+	check_state = 'reg_pump'
222
+	if aState == check_state:
223
+		cl = getattr(actionsFSMlist, check_state)
224
+		actionPlayer(cl)
225
+		newState = check_exit(aState, rA, timer, cl)		
226
+
227
+	check_state = 'reg_push'
228
+	if aState == check_state:
229
+		cl = getattr(actionsFSMlist, check_state)
230
+		actionPlayer(cl)
179 231
 		if own['stateTimer'] > 70:
180
-			aState = 'reg_roll'
232
+			newState = 'reg_roll'
181 233
 
182
-	elif aState == 'reg_push_goof':
183
-		actionPlayer(actionsFSMlist.reg_push_goof)
234
+	check_state = 'reg_push_goof'
235
+	if aState == check_state:
236
+		cl = getattr(actionsFSMlist, check_state)
237
+		actionPlayer(cl)
184 238
 		if own['stateTimer'] > 70:
185
-			aState = 'reg_roll'			
186
-		
187
-	elif aState == 'reg_powerslide':
239
+			newState = 'reg_roll'			
240
+	
241
+	check_state = 'reg_powerslide'
242
+	if aState == check_state:
243
+		cl = getattr(actionsFSMlist, check_state)
188 244
 		if own['stateTimer'] < 20:
189 245
 			actionPlayer(actionsFSMlist.reg_powerslide_in)
190 246
 		else:
191
-			actionPlayer(actionsFSMlist.reg_powerslide)
247
+			actionPlayer(cl)
192 248
 		
193 249
 
194
-		aState = check_exit(aState, rA, actionsFSMlist.reg_powerslide)
250
+		newState = check_exit(aState, rA, timer, actionsFSMlist.reg_powerslide)
195 251
 
196
-	elif aState == 'reg_fs_powerslide':
252
+	check_state = 'reg_fs_powerslide'
253
+	if aState == check_state:
254
+		cl = getattr(actionsFSMlist, check_state)
197 255
 		if own['stateTimer'] < 20:
198 256
 			actionPlayer(actionsFSMlist.reg_fs_powerslide_in)
199 257
 		else:
200
-			actionPlayer(actionsFSMlist.reg_fs_powerslide)
201
-		aState = check_exit(aState, rA, actionsFSMlist.reg_fs_powerslide)				
258
+			actionPlayer(cl)
259
+		newState = check_exit(aState, rA, timer, actionsFSMlist.reg_fs_powerslide)				
202 260
 
203
-	elif aState == 'reg_manual':
204
-		actionPlayer(actionsFSMlist.reg_manual)
205
-		aState = check_exit(aState, rA, actionsFSMlist.reg_manual)
261
+	check_state = 'reg_manual'
262
+	if aState == check_state:
263
+		cl = getattr(actionsFSMlist, check_state)
264
+		actionPlayer(cl)
265
+		newState = check_exit(aState, rA, timer, cl)
206 266
 
207
-	elif aState == 'reg_nmanual':
208
-		actionPlayer(actionsFSMlist.reg_nmanual)
209
-		aState = check_exit(aState, rA, actionsFSMlist.reg_nmanual)
267
+	check_state = 'reg_nmanual'
268
+	if aState == check_state:
269
+		cl = getattr(actionsFSMlist, check_state)
270
+		actionPlayer(cl)
271
+		newState = check_exit(aState, rA, timer, cl)
210 272
 
211 273
 
212 274
 
@@ -233,8 +295,10 @@ def main(cont):
233 295
 
234 296
 
235 297
 	#-----------------------
236
-	own['aState'] = aState
237
-	print(own['l_aState'], '----l_aState', own['aState'])
298
+	#own['aState'] = aState
299
+	if newState != '':
300
+		own['aState'] = newState 
301
+	#print(own['l_aState'], '----l_aState', own['aState'])
238 302
 	own['l_aState'] = og_state
239
-	
303
+	print(own['l_aState'], '----l_aState', own['aState'], 'rA', rA)
240 304
 	state_timer(own)

+ 146
- 33
scripts/actionsFSMlist.py View File

@@ -6,7 +6,7 @@ fak_fliplist = ['fak_ollie', 'fak_nollie', 'fak_nollie', 'fak_kickflip', 'fak_va
6 6
 
7 7
 
8 8
 class a_class:
9
-	def __init__(self, name, start, end, dname, dstart, dend, layer, speed, mode, blendin, exits):
9
+	def __init__(self, name, start, end, dname, dstart, dend, layer, speed, mode, blendin, exits, fe, fef):
10 10
 		self.name = name
11 11
 		self.start = start
12 12
 		self.end = end
@@ -18,6 +18,8 @@ class a_class:
18 18
 		self.mode = mode
19 19
 		self.blendin = blendin
20 20
 		self.exits = exits
21
+		self.force_exit = fe
22
+		self.fef = fef
21 23
 
22 24
 reg_walk = a_class(
23 25
 	#player armature action name
@@ -41,8 +43,11 @@ reg_walk = a_class(
41 43
 	#blendin
42 44
 	20,
43 45
 	#exits
44
-	['reg_walkFast', 'reg_idle', 'reg_jump', 'reg_onboard'])
45
-
46
+	['reg_walkFast', 'reg_idle', 'reg_jump', 'reg_onboard', 'reg_idle2', 'reg_idle3', 'reg_idle4', 'reg_walk_air', 'reg_walk_air_out'],
47
+	#force exit
48
+	None,
49
+	#force exit frame
50
+	0)
46 51
 reg_walkFast = a_class(
47 52
 	#player armature action name
48 53
 	'reg_nwalk', 
@@ -65,7 +70,11 @@ reg_walkFast = a_class(
65 70
 	#blendin
66 71
 	0, 
67 72
 	#exits
68
-	['reg_walk', 'reg_idle', 'reg_jump', 'reg_onboard'])
73
+	['reg_walk', 'reg_idle', 'reg_jump', 'reg_onboard'],
74
+	#force exit
75
+	None,
76
+	#force exit frame
77
+	0)
69 78
 
70 79
 
71 80
 
@@ -91,7 +100,11 @@ reg_idle = a_class(
91 100
 	#blendin
92 101
 	20,
93 102
 	#exits
94
-	['reg_walk', 'reg_idle2', 'reg_idle3', 'reg_idle4', 'reg_idle5', 'reg_jump', 'reg_sit', 'reg_onboard'])
103
+	['reg_walk', 'reg_idle2', 'reg_idle3', 'reg_idle4', 'reg_idle5', 'reg_jump', 'reg_sit', 'reg_onboard'],
104
+	#force exit
105
+	None,
106
+	#force exit frame
107
+	0)
95 108
 
96 109
 reg_idle2 = a_class(
97 110
 	#player armature action name
@@ -115,7 +128,11 @@ reg_idle2 = a_class(
115 128
 	#blendin
116 129
 	20,
117 130
 	#exits
118
-	['reg_walk', 'reg_idle', 'reg_idle3', 'reg_idle4', 'reg_idle5', 'reg_jump', 'reg_onboard'])
131
+	['reg_walk', 'reg_idle', 'reg_idle3', 'reg_idle4', 'reg_idle5', 'reg_jump', 'reg_onboard'],
132
+	#force exit
133
+	None,
134
+	#force exit frame
135
+	0)
119 136
 
120 137
 reg_idle3 = a_class(
121 138
 	#player armature action name
@@ -139,7 +156,11 @@ reg_idle3 = a_class(
139 156
 	#blendin
140 157
 	20,
141 158
 	#exits
142
-	['reg_walk', 'reg_idle2', 'reg_idle', 'reg_idle4', 'reg_idle5', 'reg_jump', 'reg_onboard'])
159
+	['reg_walk', 'reg_idle2', 'reg_idle', 'reg_idle4', 'reg_idle5', 'reg_jump', 'reg_onboard'],
160
+	#force exit
161
+	None,
162
+	#force exit frame
163
+	0)
143 164
 
144 165
 reg_idle4 = a_class(
145 166
 	#player armature action name
@@ -163,7 +184,11 @@ reg_idle4 = a_class(
163 184
 	#blendin
164 185
 	20,
165 186
 	#exits
166
-	['reg_walk', 'reg_idle2', 'reg_idle3', 'reg_idle', 'reg_idle5', 'reg_jump', 'reg_onboard'])
187
+	['reg_walk', 'reg_idle2', 'reg_idle3', 'reg_idle', 'reg_idle5', 'reg_jump', 'reg_onboard'],
188
+	#force exit
189
+	None,
190
+	#force exit frame
191
+	0)
167 192
 
168 193
 reg_idle5 = a_class(
169 194
 	#player armature action name
@@ -187,7 +212,11 @@ reg_idle5 = a_class(
187 212
 	#blendin
188 213
 	20,
189 214
 	#exits
190
-	['reg_walk', 'reg_idle2', 'reg_idle3', 'reg_idle4', 'reg_idle', 'reg_jump', 'reg_onboard'])
215
+	['reg_walk', 'reg_idle2', 'reg_idle3', 'reg_idle4', 'reg_idle', 'reg_jump', 'reg_onboard'],
216
+	#force exit
217
+	None,
218
+	#force exit frame
219
+	0)
191 220
 
192 221
 reg_jump = a_class(
193 222
 	#player armature action name
@@ -207,11 +236,15 @@ reg_jump = a_class(
207 236
 	#speed
208 237
 	.5,
209 238
 	#mode (1 = play, 0 = loop)
210
-	1,
239
+	0,
211 240
 	#blendin
212 241
 	10,
213 242
 	#exits
214
-	['reg_idle', 'reg_walk_air', 'reg_onboard'])
243
+	['reg_idle', 'reg_walk_air', 'reg_onboard'],
244
+	#force exit
245
+	'reg_walk_air',
246
+	#force exit frame
247
+	20)
215 248
 
216 249
 reg_walk_air = a_class(
217 250
 	#player armature action name
@@ -233,9 +266,13 @@ reg_walk_air = a_class(
233 266
 	#mode (1 = play, 0 = loop)
234 267
 	0,
235 268
 	#blendin
236
-	10,
269
+	5,
237 270
 	#exits
238
-	['reg_walk_air_out'])
271
+	['reg_walk_air_out'],
272
+	#force exit
273
+	None,
274
+	#force exit frame
275
+	0)
239 276
 
240 277
 reg_walk_air_out = a_class(
241 278
 	#player armature action name
@@ -257,9 +294,13 @@ reg_walk_air_out = a_class(
257 294
 	#mode (1 = play, 0 = loop)
258 295
 	1,
259 296
 	#blendin
260
-	10,
297
+	5,
261 298
 	#exits
262
-	['reg_idle', 'reg_walk', 'reg_walkFast', 'reg_onboard'])
299
+	['reg_idle', 'reg_walk', 'reg_walkFast', 'reg_onboard'],
300
+	#force exit
301
+	'reg_idle',
302
+	#force exit frame
303
+	10)
263 304
 
264 305
 reg_sit_in = a_class(
265 306
 	#player armature action name
@@ -283,7 +324,11 @@ reg_sit_in = a_class(
283 324
 	#blendin
284 325
 	20,
285 326
 	#exits
286
-	['reg_idle', 'reg_walk'])
327
+	['reg_idle', 'reg_walk'],
328
+	#force exit
329
+	None,
330
+	#force exit frame
331
+	0)
287 332
 
288 333
 reg_sit = a_class(
289 334
 	#player armature action name
@@ -307,7 +352,11 @@ reg_sit = a_class(
307 352
 	#blendin
308 353
 	20,
309 354
 	#exits
310
-	['reg_idle', 'reg_walk'])
355
+	['reg_idle', 'reg_walk'],
356
+	#force exit
357
+	None,
358
+	#force exit frame
359
+	0)
311 360
 
312 361
 #------news
313 362
 
@@ -333,7 +382,11 @@ reg_onboard = a_class(
333 382
 	#blendin
334 383
 	10,
335 384
 	#exits
336
-	['reg_roll'])
385
+	['reg_roll'],
386
+	#force exit
387
+	None,
388
+	#force exit frame
389
+	0)
337 390
 
338 391
 reg_offboard = a_class(
339 392
 	#player armature action name
@@ -357,7 +410,11 @@ reg_offboard = a_class(
357 410
 	#blendin
358 411
 	5,
359 412
 	#exits
360
-	['reg_idle', 'reg_walkFast', 'reg_walk'])
413
+	['reg_idle', 'reg_walkFast', 'reg_walk'],
414
+	#force exit
415
+	None,
416
+	#force exit frame
417
+	0)
361 418
 
362 419
 reg_roll = a_class(
363 420
 	#player armature action name
@@ -381,7 +438,11 @@ reg_roll = a_class(
381 438
 	#blendin
382 439
 	10,
383 440
 	#exits
384
-	['reg_idle', 'reg_offboard', 'reg_turnLeft', 'reg_turnRight', 'reg_opos', 'reg_nopos', 'reg_pump', 'reg_push', 'reg_push_goof', 'reg_powerslide', 'reg_fs_powerslide', 'reg_manual', 'reg_nmanual'])
441
+	['reg_idle', 'reg_offboard', 'reg_turnLeft', 'reg_turnRight', 'reg_opos', 'reg_nopos', 'reg_pump', 'reg_push', 'reg_push_goof', 'reg_powerslide', 'reg_fs_powerslide', 'reg_manual', 'reg_nmanual'],
442
+	#force exit
443
+	None,
444
+	#force exit frame
445
+	0)
385 446
 
386 447
 reg_turnLeft = a_class(
387 448
 	#player armature action name
@@ -405,7 +466,11 @@ reg_turnLeft = a_class(
405 466
 	#blendin
406 467
 	20,
407 468
 	#exits
408
-	['reg_roll', 'reg_opos', 'reg_nopos', 'reg_pump', 'reg_push', 'reg_push_goof', 'reg_powerslide', 'reg_fs_powerslide', 'reg_manual', 'reg_nmanual'])
469
+	['reg_roll', 'reg_opos', 'reg_nopos', 'reg_pump', 'reg_push', 'reg_push_goof', 'reg_powerslide', 'reg_fs_powerslide', 'reg_manual', 'reg_nmanual'],
470
+	#force exit
471
+	None,
472
+	#force exit frame
473
+	0)
409 474
 
410 475
 reg_turnRight = a_class(
411 476
 	#player armature action name
@@ -429,7 +494,11 @@ reg_turnRight = a_class(
429 494
 	#blendin
430 495
 	20,
431 496
 	#exits
432
-	['reg_roll', 'reg_opos', 'reg_nopos', 'reg_pump', 'reg_push', 'reg_push_goof', 'reg_powerslide', 'reg_fs_powerslide', 'reg_manual', 'reg_nmanual'])
497
+	['reg_roll', 'reg_opos', 'reg_nopos', 'reg_pump', 'reg_push', 'reg_push_goof', 'reg_powerslide', 'reg_fs_powerslide', 'reg_manual', 'reg_nmanual'],
498
+	#force exit
499
+	None,
500
+	#force exit frame
501
+	0)
433 502
 
434 503
 
435 504
 reg_opos = a_class(
@@ -454,7 +523,11 @@ reg_opos = a_class(
454 523
 	#blendin
455 524
 	15,
456 525
 	#exits
457
-	['reg_roll', 'reg_turnRight', 'reg_turnLeft', 'reg_pump', 'reg_push', 'reg_push_goof', 'reg_powerslide', 'reg_fs_powerslide', 'reg_manual', 'reg_nmanual'])
526
+	['reg_roll', 'reg_turnRight', 'reg_turnLeft', 'reg_pump', 'reg_push', 'reg_push_goof', 'reg_powerslide', 'reg_fs_powerslide', 'reg_manual', 'reg_nmanual'],
527
+	#force exit
528
+	None,
529
+	#force exit frame
530
+	0)
458 531
 
459 532
 reg_nopos = a_class(
460 533
 	#player armature action name
@@ -478,7 +551,11 @@ reg_nopos = a_class(
478 551
 	#blendin
479 552
 	15,
480 553
 	#exits
481
-	['reg_roll', 'reg_turnRight', 'reg_turnLeft', 'reg_pump', 'reg_push', 'reg_push_goof', 'reg_powerslide', 'reg_fs_powerslide', 'reg_manual', 'reg_nmanual'])
554
+	['reg_roll', 'reg_turnRight', 'reg_turnLeft', 'reg_pump', 'reg_push', 'reg_push_goof', 'reg_powerslide', 'reg_fs_powerslide', 'reg_manual', 'reg_nmanual'],
555
+	#force exit
556
+	None,
557
+	#force exit frame
558
+	0)
482 559
 
483 560
 reg_pump = a_class(
484 561
 	#player armature action name
@@ -502,7 +579,11 @@ reg_pump = a_class(
502 579
 	#blendin
503 580
 	15,
504 581
 	#exits
505
-	['reg_roll', 'reg_turnRight', 'reg_turnLeft', 'reg_push', 'reg_push_goof', 'reg_powerslide', 'reg_fs_powerslide', 'reg_manual', 'reg_nmanual'])
582
+	['reg_roll', 'reg_turnRight', 'reg_turnLeft', 'reg_push', 'reg_push_goof', 'reg_powerslide', 'reg_fs_powerslide', 'reg_manual', 'reg_nmanual'],
583
+	#force exit
584
+	None,
585
+	#force exit frame
586
+	0)
506 587
 
507 588
 reg_push = a_class(
508 589
 	#player armature action name
@@ -526,7 +607,11 @@ reg_push = a_class(
526 607
 	#blendin
527 608
 	10,
528 609
 	#exits
529
-	['reg_roll', 'reg_turnRight', 'reg_turnLeft', 'reg_push', 'reg_push_goof', 'reg_powerslide', 'reg_fs_powerslide', 'reg_manual', 'reg_nmanual'])
610
+	['reg_roll', 'reg_turnRight', 'reg_turnLeft', 'reg_push', 'reg_push_goof', 'reg_powerslide', 'reg_fs_powerslide', 'reg_manual', 'reg_nmanual'],
611
+	#force exit
612
+	None,
613
+	#force exit frame
614
+	0)
530 615
 
531 616
 reg_push_goof = a_class(
532 617
 	#player armature action name
@@ -550,7 +635,11 @@ reg_push_goof = a_class(
550 635
 	#blendin
551 636
 	10,
552 637
 	#exits
553
-	['reg_roll', 'reg_turnRight', 'reg_turnLeft', 'reg_push', 'reg_push_goof', 'reg_powerslide', 'reg_fs_powerslide', 'reg_manual', 'reg_nmanual'])
638
+	['reg_roll', 'reg_turnRight', 'reg_turnLeft', 'reg_push', 'reg_push_goof', 'reg_powerslide', 'reg_fs_powerslide', 'reg_manual', 'reg_nmanual'],
639
+	#force exit
640
+	None,
641
+	#force exit frame
642
+	0)
554 643
 
555 644
 
556 645
 reg_powerslide_in = a_class(
@@ -575,7 +664,11 @@ reg_powerslide_in = a_class(
575 664
 	#blendin
576 665
 	10,
577 666
 	#exits
578
-	['reg_roll', 'reg_turnRight', 'reg_turnLeft', 'reg_push', 'reg_push_goof', 'reg_pump', 'reg_nopos', 'reg_opos', 'reg_manual', 'reg_nmanual'])
667
+	['reg_roll', 'reg_turnRight', 'reg_turnLeft', 'reg_push', 'reg_push_goof', 'reg_pump', 'reg_nopos', 'reg_opos', 'reg_manual', 'reg_nmanual'],
668
+	#force exit
669
+	None,
670
+	#force exit frame
671
+	0)
579 672
 
580 673
 reg_fs_powerslide_in = a_class(
581 674
 	#player armature action name
@@ -599,7 +692,11 @@ reg_fs_powerslide_in = a_class(
599 692
 	#blendin
600 693
 	10,
601 694
 	#exits
602
-	['reg_roll', 'reg_turnRight', 'reg_turnLeft', 'reg_push', 'reg_push_goof', 'reg_pump', 'reg_nopos', 'reg_opos', 'reg_manual', 'reg_nmanual'])
695
+	['reg_roll', 'reg_turnRight', 'reg_turnLeft', 'reg_push', 'reg_push_goof', 'reg_pump', 'reg_nopos', 'reg_opos', 'reg_manual', 'reg_nmanual'],
696
+	#force exit
697
+	None,
698
+	#force exit frame
699
+	0)
603 700
 
604 701
 reg_powerslide = a_class(
605 702
 	#player armature action name
@@ -623,7 +720,11 @@ reg_powerslide = a_class(
623 720
 	#blendin
624 721
 	10,
625 722
 	#exits
626
-	['reg_roll', 'reg_turnRight', 'reg_turnLeft', 'reg_push', 'reg_push_goof', 'reg_pump', 'reg_nopos', 'reg_opos', 'reg_manual', 'reg_nmanual'])
723
+	['reg_roll', 'reg_turnRight', 'reg_turnLeft', 'reg_push', 'reg_push_goof', 'reg_pump', 'reg_nopos', 'reg_opos', 'reg_manual', 'reg_nmanual'],
724
+	#force exit
725
+	None,
726
+	#force exit frame
727
+	0)
627 728
 
628 729
 reg_fs_powerslide = a_class(
629 730
 	#player armature action name
@@ -647,7 +748,11 @@ reg_fs_powerslide = a_class(
647 748
 	#blendin
648 749
 	10,
649 750
 	#exits
650
-	['reg_roll', 'reg_turnRight', 'reg_turnLeft', 'reg_push', 'reg_push_goof', 'reg_pump', 'reg_nopos', 'reg_opos', 'reg_manual', 'reg_nmanual'])
751
+	['reg_roll', 'reg_turnRight', 'reg_turnLeft', 'reg_push', 'reg_push_goof', 'reg_pump', 'reg_nopos', 'reg_opos', 'reg_manual', 'reg_nmanual'],
752
+	#force exit
753
+	None,
754
+	#force exit frame
755
+	0)
651 756
 
652 757
 
653 758
 reg_manual = a_class(
@@ -672,7 +777,11 @@ reg_manual = a_class(
672 777
 	#blendin
673 778
 	10,
674 779
 	#exits
675
-	['reg_roll', 'reg_turnRight', 'reg_turnLeft', 'reg_push', 'reg_push_goof', 'reg_pump', 'reg_nopos', 'reg_opos'])
780
+	['reg_roll', 'reg_turnRight', 'reg_turnLeft', 'reg_push', 'reg_push_goof', 'reg_pump', 'reg_nopos', 'reg_opos'],
781
+	#force exit
782
+	None,
783
+	#force exit frame
784
+	0)
676 785
 
677 786
 
678 787
 reg_nmanual = a_class(
@@ -697,7 +806,11 @@ reg_nmanual = a_class(
697 806
 	#blendin
698 807
 	10,
699 808
 	#exits
700
-	['reg_roll', 'reg_turnRight', 'reg_turnLeft', 'reg_push', 'reg_push_goof', 'reg_pump', 'reg_nopos', 'reg_opos'])
809
+	['reg_roll', 'reg_turnRight', 'reg_turnLeft', 'reg_push', 'reg_push_goof', 'reg_pump', 'reg_nopos', 'reg_opos'],
810
+	#force exit
811
+	None,
812
+	#force exit frame
813
+	0)
701 814
 
702 815
 
703 816
 #******************(((((((((((((((((())))))))))))))))))*************

+ 28
- 0
scripts/inputs.py View File

@@ -266,6 +266,34 @@ def main():
266 266
         dict['mTrig'] = 0
267 267
         dict['rTrig'] = 0
268 268
         dict['lTrig'] = 0
269
+
270
+        dict['last_aBut'] = 0
271
+        dict['last_bBut'] = 0
272
+        dict['last_xBut'] = 0
273
+        dict['last_yBut'] = 0
274
+        dict['last_lBump'] = 0
275
+        dict['last_rBump'] = 0
276
+        dict['last_bkBut'] = 0
277
+        dict['last_stBut'] = 0
278
+        dict['last_xbBut'] = 0
279
+        dict['last_ltsBut'] = 0
280
+        dict['last_rtsBut'] = 0
281
+        dict['last_ldPad'] = 0
282
+        dict['last_rdPad'] = 0
283
+        dict['last_udPad'] = 0
284
+        dict['last_ddPad'] = 0
285
+        dict['last_rUD'] = 0
286
+        dict['last_lUD'] = 0
287
+        dict['last_rLR'] = 0
288
+        dict['last_lLR'] = 0
289
+        dict['last_rmUD'] = 0
290
+        dict['last_lmUD'] = 0
291
+        dict['last_rmLR'] = 0
292
+        dict['last_lmLR'] = 0
293
+        dict['last_mTrig'] = 0
294
+        dict['last_rTrig'] = 0
295
+        dict['last_lTrig'] = 0
296
+
269 297
         #dict['last_joy_con'] = 0    
270 298
 
271 299
     if dict['driving_reset'] == True:

+ 1
- 1
scripts/walk.py View File

@@ -423,7 +423,7 @@ def main(cont):
423 423
                     own.linearVelocity.z += 5
424 424
                     own.linearVelocity.x = linvel.x
425 425
                     own.linearVelocity.y = linvel.y
426
-                    own['walk_jump_timer'] = 20
426
+                    own['walk_jump_timer'] = 6
427 427
             own['lastx'] = 1
428 428
         else:
429 429
             own['lastx'] = 0  

Loading…
Cancel
Save