lfnetwork.com mark read register faq members calendar

Thread: Freezing an animation
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 05-10-2007, 11:39 AM   #1
XycaleTh
Rookie
 
XycaleTh's Avatar
 
Join Date: Apr 2006
Location: UK
Posts: 67
Freezing an animation

I'm in the middle of making a competition mod and at the moment through rcon you can 'pause' the match, which extends the timelimit with the correct amount of time, and pauses all players and prevents them from turning etc. It's not a great deal of a problem, but while the match is paused some animations (such as running animations) continue to run but the player remains stationary. I was wondering if it was possible to freeze the animation to stop it from doing this. I'm currently freezing the players by setting the player's ps->pm_type to PM_FREEZE.

This isn't a major problem, but it would be a neat little extra and thanks for any help in advance
XycaleTh is offline   you may: quote & reply,
Old 05-10-2007, 04:27 PM   #2
ensiform
The Stig
 
ensiform's Avatar
 
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,241
Current Game: Borderlands 2
I'm sure there is, but I don't think you can achieve it with a server-side mod.


iojamp project lead / coder
ensiform is offline   you may: quote & reply,
Old 05-10-2007, 05:47 PM   #3
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,176
Yeah, it's possible, but not without modifications to the bg_pmove code.


---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder
razorace is offline   you may: quote & reply,
Old 05-11-2007, 12:05 PM   #4
XycaleTh
Rookie
 
XycaleTh's Avatar
 
Join Date: Apr 2006
Location: UK
Posts: 67
Oh, I forgot to mention it's a full-game mod, so client, ui and server are being modified. I've tried stopping the ps->legsTimer/ps->torsoTimer (at least I think it stopped), but it made no difference.
XycaleTh is offline   you may: quote & reply,
Old 05-11-2007, 02:10 PM   #5
ensiform
The Stig
 
ensiform's Avatar
 
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,241
Current Game: Borderlands 2
Well, I herd that setting the timers might freeze the animation. You will need to do some searching in the animation code for comments, etc.


iojamp project lead / coder
ensiform is offline   you may: quote & reply,
Old 05-11-2007, 02:20 PM   #6
XycaleTh
Rookie
 
XycaleTh's Avatar
 
Join Date: Apr 2006
Location: UK
Posts: 67
okay
XycaleTh is offline   you may: quote & reply,
Old 05-11-2007, 02:22 PM   #7
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,176
ACtually, altering the animation timer won't work for any animation that loops (walking, running, etc).

What you're really going to want to do is slam the animation's speed to near zero (you probably can't have exactly zero) based on a gamestate check (look to see how Force Rage alters the animation speeds) and then jack up the animation timers so that the animation still freeze that way.


---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder
razorace is offline   you may: quote & reply,
Old 05-11-2007, 03:04 PM   #8
XycaleTh
Rookie
 
XycaleTh's Avatar
 
Join Date: Apr 2006
Location: UK
Posts: 67
I've spent about 30 mins trying to figure out a few things to do with the animation code but I'm kind of confused. I've always thought as the animation timers (legsTimer, torsoTimer) to be something like a countdown timer where it gets set to however long the chosen animation takes to finish. Then I've seen in some places where it gets set to 1, even though the animation stays for quite a long time.

Another thing is I'm wondering why the ANIM_TOGGLEBIT is used? Is it to restrict the number of animations that can be held in the game, or...?
XycaleTh is offline   you may: quote & reply,
Old 05-11-2007, 03:07 PM   #9
ensiform
The Stig
 
ensiform's Avatar
 
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,241
Current Game: Borderlands 2
I don't think it ever *IS* used.


iojamp project lead / coder
ensiform is offline   you may: quote & reply,
Old 05-11-2007, 03:28 PM   #10
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,176
The animation timers are only used to determine when an animation is "finished", it doesn't determine how quickly the animation plays. In fact, actual animation system in the engine doesn't care what the animation timers since it's exclusively used to determine when the next animation should play.

Some animation timers are set to 1 because they are "constant" animations like running or walking. These just constantly loop the same animation while the timer is maintained at 1 to keep it going.

As for the toggle bit, I'm not sure if we're talking about the same thing, but the animation system uses a toggle bit to allow the system to be able to restart an animation already playing.


---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder
razorace is offline   you may: quote & reply,
Old 05-13-2007, 11:53 PM   #11
Tinny
 
Tinny's Avatar
 
Join Date: Apr 2002
Posts: 1,188
The way I did it was the way the client did it when it froze an animation when someone was disrupted. This is a last resort idea, if you can't get them to work I can provide more info.


Redeemed!

An old school mod for jedi academy.
Tinny is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > JediKnight Series > Editing Central > JA Coding > Freezing an animation

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:58 PM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.