AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Entity animatin (https://forums.alliedmods.net/showthread.php?t=273473)

SKAT 10-19-2015 11:26

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


SKAT 10-20-2015 12:37

Re: Entity animatin
 
someone can help me?


All times are GMT -4. The time now is 22:15.

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