Raised This Month: $ Target: $400
 0% 

Creating animated sprites with vexd/engine.. ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ryan
Senior Member
Join Date: May 2004
Location: NH, USA
Old 06-21-2004 , 01:30   Creating animated sprites with vexd/engine.. ?
Reply With Quote #1

I imagine it's possible, but i've been trying a while to create a sprite with vexd's hl engine natives. The sprites i'm trying to create are supposed to be animated, but they dont animate when created.

I'm sure i just need to set the entity vars for the sprite, because i've successfully created models in the past and animated them using _sequence and _framerate, but i'm unsure of the entity vars needed for animated sprites.

anyone help me out here? thanks.

Edit: Topic change ( more specific )
__________________
Warcraft 3: Expansion
Homepage | Downloads | Forums
Ryan is offline
Send a message via AIM to Ryan
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
BAILOPAN
Join Date: Jan 2004
Old 06-22-2004 , 11:02  
Reply With Quote #3

Thanks for this, good information to have archived
__________________
egg
BAILOPAN is offline
AssKicR
Veteran Member
Join Date: Mar 2004
Location: Norway-Europe(GTM+1)
Old 06-22-2004 , 11:52  
Reply With Quote #4

Quote:
Originally Posted by BAILOPAN
Thanks for this, good information to have archived
yup
__________________
My Plugins

Got ??
AssKicR is offline
Reply


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 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