Model frame tags.
Moderator: InsideQC Admins
11 posts
• Page 1 of 1
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.
-

Downsider - Posts: 621
- Joined: Tue Sep 16, 2008 1:35 am
You mean using $frame run1 run2 etc?
Or the frame function like:
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.
Or the frame function like:
- Code: Select all
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.
-

Orion - Posts: 476
- Joined: Fri Jan 12, 2007 6:32 pm
- Location: Brazil
-

Error - InsideQC Staff
- Posts: 865
- Joined: Fri Nov 05, 2004 5:15 am
- Location: VA, USA
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
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC
(LordHavoc)
-

frag.machine - Posts: 2090
- Joined: Sat Nov 25, 2006 1:49 pm
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.
-

Downsider - Posts: 621
- Joined: Tue Sep 16, 2008 1:35 am
Of course you can use variables. There's a number of mods doing animation this way, actually. but instead doing something like:
you can use:
It's a much clean and easy to understand code, both for you and to anyone else trying to learn by/modify your mod.
- Code: Select all
local float i;
i = 5;
(...)
if ((i >=5) && (i <= 10))
{
i = i + 1;
}
self.frame = i;
you can use:
- Code: Select all
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.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC
(LordHavoc)
-

frag.machine - Posts: 2090
- Joined: Sat Nov 25, 2006 1:49 pm
11 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest