In GZDoom, models need to be attached to an actor coded with traditional sprite frame references in DECORATE or ZScript. The modeldef file maps the different frames of the model to the sprites in the underlying actor and the game shows the model in place of those frames.
So, to look at what you typed earlier:
FrameIndex XXXX A 0 0
FrameIndex is used to let GZDoom know that you are going to use the index number of a frame in the model instead of a frame name. As far as I know, the only supported models that use frame names are MD2 models. So, if you are using MD3 models, FrameIndex is correct for you.
XXXX is the sprite name of the underling [wiki]Sprite[/wiki] for that frame.
A sprite has an identifying name that is exactly 4 characters long.
The "A" is which particular frame of the sprite is being mapped (more on that later).
The first 0 is the index of the model being used. GZDoom can allocate up to 4 models per actor frame. If you are only using 1 model, then the model index would normally be set at 0.
The final number is which frame within the model file is being mapped to that sprite. It's as simple as the first frame of animation inside the model file is frame 0, the next 1, the next 2 and so on.
So, with an actor such as the zombieman: [wiki]Classes:ZombieMan[/wiki] it has an spawn sequence like this (in old fashioned DECORATE):
So, it uses sprites called POSS and the spawn sequnce uses frames A and B. Mapping that to a model might look something like:
Code: Select all
Model Zombieman
{
Path "models"
Model 0 "Zombie.md3"
Skin 0 "Zombie.png"
FrameIndex POSS A 0 0
FrameIndex POSS B 0 1
}
I assume that you have already found the modeldef page but, just in case: [wiki]MODELDEF[/wiki]
In GZDoom, models need to be attached to an actor coded with traditional sprite frame references in DECORATE or ZScript. The modeldef file maps the different frames of the model to the sprites in the underlying actor and the game shows the model in place of those frames.
So, to look at what you typed earlier:
FrameIndex XXXX A 0 0
FrameIndex is used to let GZDoom know that you are going to use the index number of a frame in the model instead of a frame name. As far as I know, the only supported models that use frame names are MD2 models. So, if you are using MD3 models, FrameIndex is correct for you.
XXXX is the sprite name of the underling [wiki]Sprite[/wiki] for that frame.
A sprite has an identifying name that is exactly 4 characters long.
The "A" is which particular frame of the sprite is being mapped (more on that later).
The first 0 is the index of the model being used. GZDoom can allocate up to 4 models per actor frame. If you are only using 1 model, then the model index would normally be set at 0.
The final number is which frame within the model file is being mapped to that sprite. It's as simple as the first frame of animation inside the model file is frame 0, the next 1, the next 2 and so on.
So, with an actor such as the zombieman: [wiki]Classes:ZombieMan[/wiki] it has an spawn sequence like this (in old fashioned DECORATE):
[code] Spawn:
POSS AB 10 A_Look
Loop[/code]
So, it uses sprites called POSS and the spawn sequnce uses frames A and B. Mapping that to a model might look something like:
[code]
Model Zombieman
{
Path "models"
Model 0 "Zombie.md3"
Skin 0 "Zombie.png"
FrameIndex POSS A 0 0
FrameIndex POSS B 0 1
}[/code]
I assume that you have already found the modeldef page but, just in case: [wiki]MODELDEF[/wiki]