Index | FAQ | Search | Memberlist | Usergroups | Profile | Log in to check your private messages | Log in | Register

Model frame tags.

| Inside3d Forums Forum Index -> QuakeC Programming

View previous topic :: View next topic
Author | Message
--- | ---
Downsider Joined: 16 Sep 2008 Posts: 478 |

Posted: Thu Feb 18, 2010 8:30 pm Post subject: Model frame tags. |

Are they necessary? I don't like them and think it was a severe fault of Quake's animation system. I think it would be better if you could simply set the frame as a number.

Back to top |

Orion Joined: 12 Jan 2007 Posts: 413 Location: Brazil |

Posted: Thu Feb 18, 2010 8:44 pm Post subject: |

You mean using $frame run1 run2 etc? Or the frame function like:

Code:
void() run1 = [$run1, run2] {ai_run(10);};

If you want to set the frame as a number you'll need to open your model in a model editor and count all the frames and set the number to the frame you want to, starting at 0. The first frame is not 1.
_________________
There's no signature here. Stop looking for one.

Back to top |

Downsider Joined: 16 Sep 2008 Posts: 478 |

Posted: Thu Feb 18, 2010 9:39 pm Post subject: |

I'd rather just do something like self.frame = 5;

Back to top |

metlslime Joined: 05 Feb 2008 Posts: 177 |

Posted: Thu Feb 18, 2010 10:14 pm Post subject: |

you don't need them, they are just a convenience.

Back to top |

Downsider Joined: 16 Sep 2008 Posts: 478 |

Posted: Thu Feb 18, 2010 10:15 pm Post subject: |

metlslime wrote:
you don't need them, they are just a convenience.

So instead of putting a name, I can just chuck a number in there?

Back to top |

Error Inside3D Staff Joined: 05 Nov 2004 Posts: 558 Location: VA, USA

Posted: Thu Feb 18, 2010 10:41 pm Post subject: |

yes, just replaces the $run1 with a number or whatever frame you wanna use _________________ Inside3D : Knowledge Is Power Darkplaces Documentation Wiki

Back to top |

Downsider Joined: 16 Sep 2008 Posts: 478 |

Posted: Thu Feb 18, 2010 11:08 pm Post subject: |

Error wrote:
yes, just replaces the $run1 with a number or whatever frame you wanna use

Awesome, thanks.

Back to top |

frag.machine Joined: 25 Nov 2006 Posts: 728 |

Posted: Fri Feb 19, 2010 3:40 am Post subject: |

Downsider wrote:

metlslime wrote:
you don't need them, they are just a convenience.

So instead of putting a name, I can just chuck a number in there?

Yup, just chunk a number and you're done. Of course this is OK for 4 or 5 frames long models, but quickly becomes a nightmare when you have elaborated animations and/or models that are being frequently edited (my current case). After manually renumbering all you code you'll then realize that frame constants are actually a bless .
_________________
frag.machine - Q2K4 Project
http://fragmachine.quakedev.com/

Back to top |

Downsider Joined: 16 Sep 2008 Posts: 478 |

Posted: Fri Feb 19, 2010 3:54 am Post subject: |

frag.machine wrote:

Downsider wrote:

metlslime wrote:
you don't need them, they are just a convenience.

So instead of putting a name, I can just chuck a number in there?

Yup, just chunk a number and you're done. Of course this is OK for 4 or 5 frames long models, but quickly becomes a nightmare when you have elaborated animations and/or models that are being frequently edited (my current case). After manually renumbering all you code you'll then realize that frame constants are actually a bless .

Well I don't have to use numbers, right? I can use variables too?
I had a clever idea for an animation manager and would like to do it up.

Back to top |

frag.machine Joined: 25 Nov 2006 Posts: 728 |

Posted: Fri Feb 19, 2010 1:55 pm Post subject: |

Of course you can use variables. There's a number of mods doing animation this way, actually. but instead doing something like:

Code:
local float i; i = 5; (...) if ((i >=5) && (i <= 10)) {
i = i + 1;
}
self.frame = i;

you can use:

Code:
local float i; i = $walk1; (...) if ((i >= $walk1 ) && (i <= $walk5 )) {
i = i + 1;
}
self.frame = i;

It's a much clean and easy to understand code, both for you and to anyone else trying to learn by/modify your mod.
_________________
frag.machine - Q2K4 Project
http://fragmachine.quakedev.com/

Back to top |

Downsider Joined: 16 Sep 2008 Posts: 478 |

Posted: Fri Feb 19, 2010 10:18 pm Post subject: |

Thanks! I always hated model frame naming

Back to top |

Display posts from previous:

| Inside3d Forums Forum Index -> QuakeC Programming | All times are GMT
Page 1 of 1

Jump to:

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2004 phpBB Group