Raised This Month: $ Target: $400
 0% 

Animated Sprite Entity


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
MeRcyLeZZ
Veteran Member
Join Date: Dec 2007
Old 03-17-2009 , 12:27   Animated Sprite Entity
Reply With Quote #1

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:
#include <amxmodx> #include <fakemeta> new const g_firesprite[] = "sprites/flame.spr" public plugin_precache() {     precache_model( g_firesprite ) } public plugin_init() {     register_plugin( "Animated Sprite Entity", "0.0", "Test" )     register_clcmd( "say test", "clcmd_say_test" ) } public clcmd_say_test( id ) {     // Retrieve player's origin     new origin[3]     pev( id, pev_origin, origin )         // Create entity at player's position     new ent = engfunc( EngFunc_CreateNamedEntity, engfunc( EngFunc_AllocString, "info_target" ) )     set_pev( ent, pev_origin, origin)         // Set sprite on entity     engfunc( EngFunc_SetModel, ent, g_firesprite )     // Set proper rendering     set_pev( ent, pev_rendermode, kRenderTransAdd)     set_pev( ent, pev_renderamt, 200.0)         // Set the animation's framerate     set_pev( ent, pev_framerate, 1.0) // doesn't work! }
__________________
MeRcyLeZZ is offline
 



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 On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:59.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode