Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
illuknisaa

MODELDEF questions

Recommended Posts

in modeldef what does "frame" mean?

Frame <XXXX> <X> <model index> <"frame name">

http://zdoom.org/wiki/MODELDEF

Are those Xs something I just make up? Whats a model index and where I can find it?

I'm trying to make a crate which is a shootable, has "physics" (if two crates are stacked and bottom one gets destroyed, the top one will fall down) drops random "goodies" and player can climp on top of.

ty in advance.

Share this post


Link to post

You have to remember that models in GZDoom are just a substitution for sprites.

So suppose you have an imp model: there's a state in which the imp is in the TROO A frame (corresponding to sprites TROOA1 and co., depending on angle at which is it viewed.)

The MODELDEF for that imp says that when the imp state requires the TROO A sprites, instead use this model frame.

Model index will generally be 0. It's just that you can attach several different models together in a single definition, and then you have to give a different index to each one. When you use only one model, it has only one index, and that's 0.

Frame name is the model's own keyframe.

Look at the examples on the wiki, it should become a little bit clearer.

Share this post


Link to post

Ok I think I got it but I ran into another problem.

When I try to load up the model in gzdoom builder it shows up as an question mark ingame.

My modeldef

Model CardBoardBox
{
   Path "miktex/models/"   
   Model 0 "boxtestv2.md3"  
   Skin 0 "CRATELIT"  
   Scale 1 1 1
   FrameIndex TEST A 0 0
}
and decorate
Actor CardBoardBox 264
{
//$Category Decoration
  +FloorClip
  +solid
  Height 24
  Radius 15
  States
  {
  Spawn:
    TEST A -1
    Stop
  }
}

Share this post


Link to post

Adding sprite fixed that issue but I'm staring to sound like a broken record. For some reason my box is invisible.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×