Raised This Month: $ Target: $400
 0% 

Creating animated sprites with vexd/engine.. ?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Ryan
Senior Member
Join Date: May 2004
Location: NH, USA
Old 06-22-2004 , 03:51  
Reply With Quote #2

after some testing i've figured it out.

In order to create an animated sprite with the vexd (amx) or engine (amxx) module, you must do the following:

a) create the entity (must be env_sprite)
b) set the model name
c) set the framerate
d) dispatch

There are many ways to create entities with vexd, whether you use DispatchKeyValue, or simply the entity variable setting functions (EV_INT_etc), and any ways can be used as long as they follow this model for animating sprites.

Examples:

Code:
new iEnt = CreateEntity( "env_sprite" ); ENT_SetModel( iEnt, "sprites/fire.spr" ); Entvars_Set_Float( iEnt, EV_FL_framerate, 10.0 ); DispatchSpawn( iEnt );

Code:
new iEnt = CreateEntity( "env_sprite" ); DispatchKeyValue( iEnt, "framerate", "10.0" ); DispatchKeyValue( iEnt, "model", "sprites/fire.spr" ); DispatchSpawn( iEnt );

From here you can now set any other entvars for the entity, including scale, classname (for easy remove_entity_name() reference), etc etc etc.

Hope this information is useful to someone out there.
__________________
Warcraft 3: Expansion
Homepage | Downloads | Forums
Ryan is offline
Send a message via AIM to Ryan
 



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 14:37.


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