File: pato_playable.cfg

package info (click to toggle)
frogatto-data 1.0-2
  • links: PTS, VCS
  • area: non-free
  • in suites: squeeze
  • size: 155,116 kB
  • sloc: makefile: 1
file content (537 lines) | stat: -rw-r--r-- 10,835 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537

	[object_type]
	id=pato_playable
	hitpoints=2
	feet_width=1
	mass=5
	springiness=100
	friction=1000
	solid_area=8,8,24,30
	vehicle=false


		[editor_info]
		category=player
		[/editor_info]


		[vars]
		jump_power=1500
		jump_boost=50
		jump_glide=10
		unlocked_items="['heart_object','points_cube','points_cube']"
		[/vars]

	functions="
	  #function which returns true iff the object is in an animation that
	   requires frogatto be on the ground#	
	  def animation_requires_standing(obj)
	    obj.animation in ['stand', 'stand_up_slope', 'stand_down_slope', 'run', 'walk', 'lookup', 'crouch', 'enter_crouch', 'leave_crouch', 'turn', 'roll'];
	  def set_facing(obj, facing) if(obj.facing != facing,
	           [facing(facing), if(obj.is_standing, animation('turn'))]);

	  def stand(obj)
	   if(abs(obj.slope_standing_on) < 20, animation('stand'),
		  if(obj.slope_standing_on*obj.facing > 0, animation('stand_down_slope'),
			                                animation('stand_up_slope')));

	  #make Frogatto walk. anim can be either 'walk' or 'run'. Does checking
	   to make sure Frogatto is in a state where he can walk or run.
	   Will make Frogatto 'glide' if in mid air.#
	  def walk(obj, dir, anim)
	    if(obj.is_standing and (not (obj.animation in ['walk', 'run', 'jump', 'turn', 'run', 'crouch', 'enter_crouch', 'roll', 'run_attack', 'attack', 'up_attack'])), [animation(anim), if(anim = 'run', blur(10, 1, 20))],
	       #Frogatto is in the air, so make him glide.#
		   set(obj.velocity_x, obj.velocity_x + obj.jump_glide*dir));

	  #Function to attempt to make Frogatto crouch; does checking to make
	   sure he's in a state that allows entering a crouch.#
	  def crouch(obj)
	  	if(((not obj.animation in ['crouch', 'enter_crouch', 'roll'] ) and obj.is_standing), animation('enter_crouch'));
	  def roll(obj)
	    if( obj.animation in ['crouch'] and obj.is_standing, animation('roll'));
	  
	  #Function to make Frogatto attack. Does checking and chooses the
	   appropriate type of attack animation, if any.#
	  def attack(obj)
	    if(obj.animation in ['stand', 'stand_up_slope', 'stand_down_slope', 'walk', 'lookup'], animation(if(obj.ctrl_up, 'up_attack', 'attack')),
		  if(obj.animation in ['run'], animation('run_attack'),
		   if(obj.animation in ['jump', 'fall'], animation(if(obj.ctrl_down, 'fall_spin_attack', 'jump_attack')))));
	  1"

	on_create="[animation('stand')]"
	#on_collide_with="set(hitpoints, hitpoints - 1)"
	on_die="[spawn('die_cloud', midpoint_x, midpoint_y, facing)]"
	on_ctrl_left="[set_facing(self, -1), roll(self), if(tmp.left > cycle - 25, walk(self, -1, 'run')), set(tmp.left, cycle)]"
	on_ctrl_right="[set_facing(self, 1), roll(self), if(tmp.right > cycle - 25, walk(self, 1, 'run')), set(tmp.right, cycle)]"
	on_ctrl_jump="if(is_standing, [animation('jump'), set(velocity_y, velocity_y - jump_power)])"
	on_ctrl_attack="[attack(self)]"

	on_process="[
	    if((not is_standing) and animation_requires_standing(self), [animation('fall')]),
	    if(ctrl_up and (animation in ['stand','stand_up_slope','stand_down_slope']), animation('enter_lookup')),
	    if((animation in ['enter_lookup', 'lookup']) and (not ctrl_up), stand(self)),
	    if(ctrl_left, walk(self, -1, 'walk')),
		if(ctrl_right, walk(self, 1, 'walk')),
		if(ctrl_down, crouch(self)),
		if((not (ctrl_left or ctrl_right)) and (animation in ['walk', 'run']),
		   stand(self))
				]"
					
	on_process_jump="if(ctrl_jump, set(velocity_y, velocity_y - jump_boost))"
	on_process_fall="if(is_standing, animation('stand'))"

	#check if we end up on a slope in which case we re-calculate our standing.
	on_process_stand="if(abs(slope_standing_on) > 20, stand(self))"
	on_process_stand_up_slope="if(slope_standing_on*facing > -20, stand(self))"
	on_process_stand_down_slope="if(slope_standing_on*facing < 20, stand(self))"


	on_end_enter_crouch_anim="animation('crouch')"
	on_end_crouch_anim="if(ctrl_down, animation('crouch'), animation('leave_crouch'))"
	on_end_leave_crouch_anim="stand(self)"
	
	on_end_roll_anim="stand(self)"
	on_end_turn_anim="stand(self)"
	on_end_jump_anim="animation('fall')"
	on_end_walk_anim="animation('walk')"
	on_end_run_anim="animation('run')"
	on_end_stand_anim="stand(self)"
	on_end_stand_up_slope_anim="stand(self)"
	on_end_stand_down_slope_anim="stand(self)"
	on_end_attack_anim="stand(self)"
	on_end_enter_lookup_anim="animation('lookup')"
	on_end_lookup_anim="animation('lookup')"
	on_end_run_attack_anim="stand(self)"
	on_end_up_attack_anim="stand(self)"
	on_end_jump_attack_anim="animation('fall')"
	on_end_fall_spin_attack_anim="animation('fall')"

	on_collide_feet="stand(self)"
	on_collide_head="[if(animation = 'jump', animation('fall')), if(velocity_y < 0, set(velocity_y, 0))]"

	#when we leave the running animation, remove any blur
	on_leave_run_anim="blur(0, 1, 0)"

	[vars]
		unlocked_items="['heart_object','heart_object','fire_powerup']"
	[/vars]
	
		[animation]
		id=stand
		image=characters/pato-spritesheet1.png
		collide=10,6,25,22
		rect=2,2,42,42
		feet_x=16
		feet_y=36
		accel_x=0
		accel_y=80
		frames=3
		duration=6
		scale=2
		pad=3
		reverse=yes
		[/animation]

		[animation]
		id=stand_up_slope
		image=characters/pato-spritesheet1.png
		collide_x=10
		collide_y=4
		collide_w=15
		collide_h=16
		feet_x=16
		feet_y=30
		accel_x=0
		accel_y=80
		x=212
		y=2
		w=32
		h=35
		frames=3
		duration=6
		scale=2
		pad=3
		reverse=yes
		[/animation]

		[animation]
		id=stand_down_slope
		image=characters/pato-spritesheet1.png
		collide_x=10
		collide_y=4
		collide_w=15
		collide_h=16
		feet_x=16
		feet_y=26
		accel_x=0
		accel_y=80
		x=317
		y=2
		w=32
		h=35
		frames=3
		duration=6
		scale=2
		pad=3
		reverse=yes
		[/animation]

		[animation]
		id=lookup
		image=characters/pato-spritesheet1.png
		collide=10,6,25,22
		rect=37,233,68,265
		feet_x=16
		feet_y=32
		accel_x=0
		accel_y=80
		frames=1
		duration=3
		scale=2
		pad=3
		reverse=yes
		[/animation]

		[animation]
		id=enter_lookup
		image=characters/pato-spritesheet1.png
		collide=10,6,25,22
		rect=2,233,33,265
		feet_x=16
		feet_y=32
		accel_x=0
		accel_y=80
		frames=1
		duration=3
		scale=2
		pad=3
		reverse=yes
		[/animation]
		
		[animation]
		id=crouch
		image=characters/pato-spritesheet1.png
		collide_x=10,16,25,21
		rect=107,197,138,229
		feet_x=16
		feet_y=32
		accel_x=0
		accel_y=80
		frames=1
		duration=1
		scale=2
		pad=3
		rotate_on_slope=yes
		[/animation]

		[animation]
		id=enter_crouch
		image=characters/pato-spritesheet1.png
		collide_x=10,16,25,21
		rect=2,197,33,229
		feet_x=16
		feet_y=32
		accel_x=0
		accel_y=80
		frames=3
		duration=3
		scale=2
		pad=3
		rotate_on_slope=yes
		[/animation]

		[animation]
		id=leave_crouch
		image=characters/pato-spritesheet1.png
		collide_x=10,16,25,21
		rect=2,197,33,229
		feet_x=16
		feet_y=32
		accel_x=0
		accel_y=80
		frames=3
		duration=3
		scale=2
		pad=3
		play_backwards=yes
		rotate_on_slope=yes
		[/animation]


		[animation]
		id=roll
		image=characters/pato-spritesheet1.png
		sound=roll.ogg
		collide_x=10
		collide_y=16
		collide_w=15
		collide_h=5
		feet_x=17
		feet_y=32
		accel_y=80
		accel_x=500
		velocity_x=500
		x=107
		y=197
		w=32
		h=33
		frames=11
		duration=3
		scale=2		
		pad=3
		[/animation]

		
		[animation]
		id=walk
		solid_area=16,18,32,40
		image=characters/pato-spritesheet1.png
		collide=15,12,33,28
		rect=2,110,49,157
		feet_x=24
		feet_y=42
		accel_y=80
		accel_x=600
		frames=8
		duration=5
		scale=2
		pad=3
		[/animation]

		[animation]
		id=run
		solid_area=16,18,32,40
		image=characters/pato-spritesheet1.png
		sound=run.ogg
		collide_x=15
		collide_y=12
		collide_w=18
		collide_h=16
		feet_x=24
		feet_y=42
		accel_y=80
		accel_x=1400
		x=2
		y=110
		w=48
		h=48
		frames=8
		duration=5
		scale=2
		pad=3
		blur=80
		[/animation]

		[animation]
		id=turn
		image=characters/pato-spritesheet1.png
		collide_x=10
		collide_y=6
		collide_w=15
		collide_h=16
		feet_x=16
		feet_y=32
		accel_x=0
		accel_y=80
		rect=387,40,419,73
		frames=1
		duration=5
		[/animation]

		[animation]
		id=jump
		solid_area=8,13,24,35
		image=characters/pato-spritesheet1.png
		sound=FrogJump1.ogg,FrogJump2.ogg
		collide_x=10
		collide_y=10
		collide_w=15
		collide_h=15
		feet_x=16
		feet_y=40
		accel_y=80
		accel_x=0
		x=2
		y=46
		w=43
		h=43
		frames=2
		pad=3
		duration=6
		scale=2
		[/animation]
	
		[animation]
		id=fall
		solid_area=8,13,24,35
		image=characters/pato-spritesheet1.png
		collide_x=10
		collide_y=14
		collide_w=15
		collide_h=15
		feet_x=16
		feet_y=40
		accel_x=0
		accel_y=80
		x=94
		y=46
		w=43
		h=43
		scale=2
		pad=3
		duration=12
		frames=2
		[/animation]

		[animation]
		id=attack
		image=characters/pato-spritesheet1.png
		sound=punch.ogg
		events="3:side_attack_fx_one,6:side_attack_fx_two,9:side_attack_fx_three,8:side_attack_contact"
		collide_x=10
		collide_y=6
		collide_w=15
		collide_h=16
		feet_x=15
		feet_y=36
		accel_x=0
		accel_y=80
		x=2
		y=269
		w=49
		h=37
		hit_x=32
		hit_y=24
		hit_w=17
		hit_h=10
		hit_frames=3,4,5,6
		frames=8
		duration=3
		scale=2
		pad=3
		reverse=no
		damage=1
		[/animation]

		[animation]
		id=up_attack
		image=characters/pato-spritesheet1.png
		sound=punch.ogg
		events="6:up_attack_contact"
		collide_x=10
		collide_y=17
		collide_w=15
		collide_h=16
		feet_x=19
		feet_y=43
		accel_x=0
		accel_y=80
		x=2
		y=351
		w=41
		h=44
		hit_x=16
		hit_y=0
		hit_w=12
		hit_h=10
		hit_frames=3,4,5,6
		frames=6
		duration=2
		scale=2
		pad=3
		reverse=no
		damage=1
		[/animation]

		[animation]
		id=run_attack
		image=characters/pato-spritesheet1.png
		events="6:7:8:9:10:11:run_attack_contact"
		sound=slash.ogg
		collide_x=25
		collide_y=5
		collide_w=15
		collide_h=15
		feet_x=33
		feet_y=30
		accel_y=80
		accel_x=1600
		x=2
		y=403
		w=68
		h=29
		hit_x=20
		hit_y=14
		hit_w=50
		hit_h=20
		hit_frames=2,3
		frames=5
		duration=3
		scale=2
		pad=3
		reverse=no
		damage=2
		[/animation]

		[animation]
		id=jump_attack
		image=characters/pato-spritesheet1.png
		events="3:side_attack_fx_one,6:side_attack_fx_two,9:side_attack_fx_three,8:side_attack_contact"
		sound=kick.ogg
		collide_x=5
		collide_y=0
		collide_w=22
		collide_h=15
		feet_x=15
		feet_y=28
		accel_y=100
		accel_x=25
		x=2
		y=310
		w=49
		h=37
		hit_x=28
		hit_y=19
		hit_w=15
		hit_h=12
		hit_frames=2,3,4,5,6
		frames=9
		duration=2
		scale=2
		pad=3
		reverse=no
		damage=1
		[/animation]

		[animation]
		id=fall_spin_attack
		image=characters/pato-spritesheet1.png
		events="3:6:9:12:15:18:21:24:spin_attack_contact"
		sound=SpinAttack.ogg
		collide_x=5
		collide_y=7
		collide_w=22
		collide_h=16
		feet_x=15
		feet_y=36
		accel_y=80
		accel_x=0
		x=3
		y=436
		w=32
		h=42
		hit_x=8
		hit_y=30
		hit_w=16
		hit_h=12
		hit_frames=1,2,3,4,5,6,7,8
		frames=8
		duration=3
		scale=2
		pad=3
		reverse=no
		damage=1
		[/animation]


	[/object_type]