Animated Sprite Entity
I'm trying to create an animated sprite entity which can freely move around the map.
I've come up with something, but there is a problem: the sprite's animation doesn't play. Setting pev_framerate seems to have no effect. Any ideas? Code:
|
Re: Animated Sprite Entity
I'm pretty sure this will do it: (it's the method I use in my In-Game Ads plugin)
Code:
|
Re: Animated Sprite Entity
This works fine for me:
Code:
set_pev( newEnt, pev_animtime, 1.0); |
Re: Animated Sprite Entity
I remember that DLLFunc_Spawn is needed otherwise animation will not start. You can see it if you take a look in the HLSDK.
|
Re: Animated Sprite Entity
I don't have DLLFunc_Spawn anywhere, but maybe its because I'm using an animated model instead of a sprite.
|
Re: Animated Sprite Entity
Animated model ? Ah yeah probably because of that. For sure, if not spawn sprite can't be animated.
|
Re: Animated Sprite Entity
Thanks for your replies, I'll be testing those when I get home...
|
Re: Animated Sprite Entity
Sorry for interrupting, I guess it's a typo or something, but to just clear things up - the origin[] var should be a float to retrieve pev_origin's value.
PHP Code:
|
Re: Animated Sprite Entity
Quote:
|
Re: Animated Sprite Entity
Yep, spawning it did the trick all right. +k
|
| All times are GMT -4. The time now is 08:59. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.