BlendtoAnimation or AnimateBlend

Topics regarding Scripting with Reality Factory
Post Reply
hike1
RF FAQ-Keeper
Posts: 607
Joined: Tue Jul 05, 2005 4:19 am
Contact:

BlendtoAnimation or AnimateBlend

Post by hike1 » Wed Jul 20, 2005 5:57 pm

Which is the correct command to give?
Where are the script docs, I have 1 version
with 1 of these another with another, most
important, do they work and how to implement them? The transitions between my animations are very jerky, I can make transitions in
3ds max, this is what half-life does I believe,
but I'd rather not if the engine can do it.

User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Post by QuestOfDreams » Wed Jul 20, 2005 6:22 pm

http://dhost.info/realityfactory/onlinehelp/index.htm

high level command
BlendToAnimation(char *Animation, float Time, bool State, char *Sound );

Blend from the current animation to Animation animation in Time amount of seconds, then play that animation. If State is true then wait until animation is complete before continuing on to the next action.

low level command
AnimateBlend(char *Animation, float Time );

Blend to the first keyframe of the animation specified, in the specified time. The blend will hold at the first keyframe of the specified motion.

hike1
RF FAQ-Keeper
Posts: 607
Joined: Tue Jul 05, 2005 4:19 am
Contact:

Post by hike1 » Thu Jul 21, 2005 3:11 am

Why do I have to log in every time when I've told it to log me in automatically?


K, here's the standard mislmelee, I'm using strafeleft and right for the turns, where if anywhere would I put either of the 2 blend commands, I'm assuming the stuff below is high level?

Idle[ ()
{
PlayAnimation(STAND, true, "");
if(random(1,10)>6)
{
if(random(1,10)>5)
{
Rotate(TURNL, 102, 0, 90, 0, "");
PlayAnimation(STAND, true, "");
Rotate(TURNR, 108, 0, -90, 0, "");
}
else
{
Rotate(TURNR, 108, 0, -90, 0, "");
PlayAnimation(STAND, true, "");
Rotate(TURNL, 102, 0, 90, 0, "");
}
}
RestartOrder();
} ]

GD1
Posts: 413
Joined: Tue Jul 05, 2005 2:33 pm

Post by GD1 » Thu Jul 21, 2005 3:40 am

Why do I have to log in every time when I've told it to log me in automatically?
if you delete your cookies you wont be logged in on your next visit.

for the script you would use the blendtoanimation() command four times. put it between the rotate() and playanimation() commands, sorta sandwich playanimation() with it.

one note though, high-level motion orders like rotate() will cause a slowdown if you go overboard. this is one of the flaws of the genericmonster.s scripts.
Check out my band
Tougher Than Fort Knox
Image

hike1
RF FAQ-Keeper
Posts: 607
Joined: Tue Jul 05, 2005 4:19 am
Contact:

Post by hike1 » Thu Jul 21, 2005 5:02 pm

one note though, high-level motion orders like rotate() will cause a slowdown if you go overboard. this is one of the flaws of the genericmonster.s scripts.

So is there anything better out there? Just about all my baddie actors use this.

GD1
Posts: 413
Joined: Tue Jul 05, 2005 2:33 pm

Post by GD1 » Thu Jul 21, 2005 6:04 pm

low-level orders are much faster. I haven't scripted in a while so you'll have to check the docs for the exact order names. It's really a pain to script this way and you'll probably be fine with the High-level stuff if you dont over-do it or have dozens of actors on screen running this script at the same time, but if you get a slowdown you might want to look into writing your script as mostly low-level.
Check out my band
Tougher Than Fort Knox
Image

Post Reply