AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Entity Move to Aim (https://forums.alliedmods.net/showthread.php?t=277159)

Perrytutoriales 01-03-2016 16:22

Entity Move to Aim
 
I wanna do this Entity Direction, i need register think by the classname of the entity too.

PHP Code:

public @ShootEnergyBalls(Client)
{
    new 
KiBlasts create_entity("env_sprite");
    
    new 
Float:StartOrigin[3], Float:Angle[3];
    
    new 
PlayerOrigin[3];
    
get_user_origin(ClientPlayerOrigin1);
    
    
StartOrigin[0] = float(PlayerOrigin[0]);
    
StartOrigin[1] = float(PlayerOrigin[1]);
    
StartOrigin[2] = float(PlayerOrigin[2]);
    
    
entity_get_vector(ClientEV_VEC_v_angleAngle);
    
Angle[0] = Angle[0] * -1.0;
    
    
entity_set_int(KiBlastsEV_INT_rendermodekRenderTransAdd);
    
entity_set_float(KiBlastsEV_FL_renderamt250.0);
    
entity_set_string(KiBlastsEV_SZ_classname"beamattack");
    
entity_set_model(KiBlastsWEAPON_SPRITE_HEAD);
    
entity_set_origin(KiBlastsStartOrigin);
    
entity_set_vector(KiBlastsEV_VEC_anglesAngle);
    
entity_set_float(KiBlastsEV_FL_scale0.99);
    
    new 
Float:MinBox[3] = {-1.0, -1.0, -1.0};
    new 
Float:MaxBox[3] = {1.01.01.0};
    
    
entity_set_vector(KiBlastsEV_VEC_minsMinBox);
    
entity_set_vector(KiBlastsEV_VEC_maxsMaxBox);
    
    
entity_set_int(KiBlastsEV_INT_solidSOLID_TRIGGER);
    
entity_set_int(KiBlastsEV_INT_movetypeMOVETYPE_FLY);
    
entity_set_edict(KiBlastsEV_ENT_ownerClient);
    
    new 
Float:Velocity[3];
    
VelocityByAim(Client2600Velocity);
    
entity_set_vector(KiBlastsEV_VEC_velocityVelocity);
    
    
message_begin(MSG_BROADCASTSVC_TEMPENTITY);
    {
        
write_byte(TE_BEAMFOLLOW);
        
write_short(KiBlasts);
        
write_short(WEAPON_SPRITE_TRAIL);
        
write_byte(9999);
        
write_byte(10);
        
write_byte(255);
        
write_byte(255);
        
write_byte(255);
        
write_byte(255);
    }
    
message_end();


This is my Entity

https://www.youtube.com/watch?v=8DbsexDiotg

The entity Blue is the direction to i wanna do, the entity yellow is my entity help me please. :oops:

Perrytutoriales 01-10-2016 21:06

Re: Entity Move to Aim
 
hi?


All times are GMT -4. The time now is 09:34.

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