Raised This Month: $ Target: $400
 0% 

Entity animatin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
SKAT
Junior Member
Join Date: Jan 2014
Old 10-19-2015 , 11:26   Entity animatin
Reply With Quote #1

Hi everyone. I have some troubles with this code.
I'm trying to create an animated sprite entity which can freely move around the map to enemy units.
There is a problem: the sprite's animation doesn't play.
I know, without SPAWN ENTITY it wont work. But how can i do that with SPAWN ENTITY?


PHP Code:
                        new Float:Origin[3]
            new 
Float:vAngle[3]
            new 
Float:flVelocity[3]

            
get_user_eye_position(idUserOrigin)

            
entity_get_vector(idUserEV_VEC_v_anglevAngle)

            new 
NewEnt create_entity("env_sprite")
            
entity_set_string(NewEntEV_SZ_classname"pyroblast")
            
entity_set_model(NewEntpyroblast_spr)
            
            
entity_set_int(NewEntEV_INT_sequence1)
            
entity_set_float(NewEntEV_FL_animtimeget_gametime())
            
entity_set_float(NewEntEV_FL_framerate,  1.0)
            
entity_set_float(NewEntEV_FL_frame0.0)
            
            
entity_set_size(NewEntFloat:{ 0.00.00.0 }, Float:{ 5.05.05.0 })
            
entity_set_origin(NewEntOrigin)

            
make_vector(vAngle)

            
entity_set_vector(NewEntEV_VEC_anglesvAngle)
            
entity_set_int(NewEntEV_INT_solidSOLID_TRIGGER)
            
entity_set_int(NewEntEV_INT_movetypeMOVETYPE_FLY)
    
            
entity_set_edict(NewEntEV_ENT_owneridUser)

            
entity_set_float(NewEntEV_FL_scale0.5)
            
set_rendering(NewEntkRenderFxNone000kRenderTransAdd255)

            
velocity_by_aim(idUser1500flVelocity)
            
entity_set_vector(NewEntEV_VEC_velocityflVelocity

Last edited by SKAT; 10-19-2015 at 13:28.
SKAT is offline
 


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 22:15.


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