]> de.git.xonotic.org Git - xonotic/xonotic.wiki.git/blob - Framegroups.textile
fc563fd0869a5da12ce767cca0912223b3851ddb
[xonotic/xonotic.wiki.git] / Framegroups.textile
1 h1. .framegroups File
2
3 {{>toc}}
4
5 This file is needed to make md3, dpm, or iqm models play some animations in Xonotic.
6
7 h2. For modelers
8
9 It is named <modelname.extension>.framegroups. So if you are editing Ignis, it would be called <code>ignis.iqm.framegroups</code>.
10
11 Inside the file, the playermodel's animations are defined one per line.
12
13 Syntax:
14 <code>
15 <start frame> <frame count> <fps> <loop/noloop> // animname
16 </code>
17
18 Ex.
19 <code>
20 1 100 30 0 // dieone
21 </code>
22 Defines a 100 frame death animation that start at frame 1, plays at 30 frames per second and does not loop.
23
24 Animations must be in this order (these are the values for animname):
25 # <code>dieone</code>
26 # <code>dietwo</code>
27 # <code>draw</code> *
28 # <code>duck</code>
29 # <code>duckwalk</code> *
30 # <code>duckjump</code>
31 # <code>duckidle</code> *
32 # <code>idle</code> *
33 # <code>jump</code>
34 # <code>painone</code>
35 # <code>paintwo</code>
36 # <code>shoot</code> *
37 # <code>taunt</code> *
38 # <code>run</code> *
39 # <code>runbackwards</code> *
40 # <code>strafeleft</code> *
41 # <code>straferight</code> *
42 # <code>deadone</code>
43 # <code>deadtwo</code>
44 # <code>forwardright</code> *
45 # <code>forwardleft</code> *
46 # <code>backright</code> *
47 # <code>backleft</code> *
48 # <code>melee</code>
49
50 Lines marked with a * need to loop (last number on the line should be <code>1</code>).
51
52 If you make 1 looping animation and place model on map as misc_gamemodel it will be animated.
53
54 h2. For coders
55
56 To play such a self-playing animation you just use <code>self.frame=1</code> to play 1st animation, <code>self.frame=2</code> to play 2nd animation, etc.
57 If the animation does not loop, it will just stop at the last frame and stay there until you run another animation.