View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000540 | The Dark Mod | Coding | public | 22.01.2008 08:57 | 31.12.2020 03:39 |
Reporter | crispy | Assigned To | |||
Priority | low | Severity | minor | Reproducibility | N/A |
Status | new | Resolution | open | ||
Product Version | SVN | ||||
Summary | 0000540: Add entity scriptfunctions for getting/setting animation rates | ||||
Description | Individual animations played by an entity can be sped up or slowed down by an arbitrary factor by setting the anim_rate_[animname] spawnarg. See http://wiki.thedarkmod.com/index.php?title=Animation_playback_speed for details. The values of these spawnargs are cached at runtime for performance reasons, so changing the spawnargs directly at runtime won't do anything. It would be nice to be able to access and change these cached values. The most obvious way of enabling this is to create scriptfunctions for getting and setting the animation rates for each animation. | ||||
Additional Information | If the getter is called with an animation name for which an animation rate is not cached, then return the default of 1.0 (meaning no change; play the animation as it appears in the file). There are a number of use cases for this; for example, it could be used to make fine adjustments to the AI's walking/running speed rather than abruptly transitioning from "slow" to "fast" over the course of a few frames. If we decide we want that. | ||||
Tags | No tags attached. | ||||
related to | 0003913 | feedback | SetRate frame command |
getTurnRate() exists so perhaps this is mostly implemented. As of 2.03 is has been reported that "anim_rate_x" args aren't functioning as expected. |
|
Probably AI.h: ID_INLINE float GetAnimRate() { return m_animRates; } ID_INLINE void SetAnimRate(float newAnimRate) { m_animRates = newAnimRate; } |
|
and AI_events.cpp const idEventDef AI_SetAnimRate( "setAnimRate", EventArgs(), 'f', "Gets the animation rate of the AI."); const idEventDef AI_SetAnimRate( "setAnimRate", EventArgs('f', "rate", ""), EV_RETURNS_VOID, "Set the animation rate of the AI"); |
|
Yep, m_animRates is an Entity property in Entity.h should work as expected. | |
Hmm... Seems to be a bit bigger task than just copying GetTurnRate. Probably need to add an animRate property to AI. |
|
Date Modified | Username | Field | Change |
---|---|---|---|
22.01.2008 08:57 | crispy | New Issue | |
01.09.2016 19:16 | nbohr1more | Note Added: 0008293 | |
01.09.2016 19:16 | nbohr1more | Description Updated | View Revisions |
01.09.2016 21:10 | nbohr1more | Note Added: 0008295 | |
01.09.2016 21:10 | nbohr1more | Note Edited: 0008295 | View Revisions |
01.09.2016 21:15 | nbohr1more | Note Added: 0008296 | |
17.10.2017 13:46 | nbohr1more | Relationship added | related to 0003913 |
30.12.2020 21:25 | nbohr1more | Note Added: 0013321 | |
31.12.2020 03:39 | nbohr1more | Note Added: 0013324 |