Raised This Month: $51 Target: $400
 12% 

Entity Go Through Player


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
m4m3ts
Senior Member
Join Date: Jun 2012
Old 01-16-2014 , 22:27   Entity Go Through Player
Reply With Quote #1

i want to hit through multiple player with entity, it have beamfollow.
when i set the velocity 1000.0 its work great, the entity go through and correctly hit player.

but when i set velocity 9999.0
the entity can go through player but its not hit the player.
please help...

(i've set sv_maxvelocity 9999)

here is my code

i use

register_think("entity_class", "fw_Think")
register_touch("entity_class", "*", "fw_touch")

PHP Code:
public Throw_entity(id)
{
    static 
Float:StartOrigin[3], Float:TargetOrigin[3], Float:angles[3], Float:StartOriginX[3]
    
get_position(id2.00.00.0StartOrigin)

    
pev(id,pev_angles,angles)
    static 
EntEnt engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"info_target"))
    if(!
pev_valid(Ent)) return

    
set_pev(Entpev_movetypeMOVETYPE_FLY)
    
set_pev(Entpev_ownerid)
    
set_pev(Entpev_fuser1get_gametime() + 4.0)
    
set_pev(Entpev_nextthinkhalflife_time() + 0.1)

    
entity_set_string(EntEV_SZ_classname"entity_class")
    
engfunc(EngFunc_SetModelEntENTITY_MODEL)
    
set_pev(Entpev_minsFloat:{-1.0, -1.0, -1.0})
    
set_pev(Entpev_maxsFloat:{1.01.01.0})
    
set_pev(Entpev_originStartOrigin)
    
set_pev(Entpev_anglesangles)
    
set_pev(Entpev_gravity0.01)
    
set_pev(Entpev_solidSOLID_TRIGGER)
    
set_pev(Entpev_frame0.0)

    static 
Float:Velocity[3]
    
fm_get_aim_origin(idTargetOrigin)
    
get_speed_vector(StartOriginTargetOrigin9999.0Velocity)
    
set_pev(Entpev_velocityVelocity)

    
charge_start false

    message_begin
(MSG_BROADCASTSVC_TEMPENTITY)
    
write_byte(TE_BEAMFOLLOW// Temporary entity ID
    
write_short(Ent// Entity
    
write_short(sTrail// Sprite index
    
write_byte(7// Life
    
write_byte(1// Line width
    
write_byte(255// Red
    
write_byte(80// Green
    
write_byte(80// Blue
    
write_byte(100// Alpha
    
message_end() 
}

public 
fw_Think(ent)
{
    if(!
pev_valid(ent)) 
    return

    static 
Float:fFramepev(entpev_framefFrame)

    
fFrame += 1.5
    fFrame 
floatmin(21.0fFrame)

    
set_pev(entpev_framefFrame)
    
set_pev(entpev_nextthinkget_gametime() + 0.05)

    
// time remove
    
static Float:fTimeRemoveFloat:Amount
    pev
(entpev_fuser1fTimeRemove)
    
pev(entpev_renderamtAmount)

    if(
get_gametime() >= fTimeRemove
    {
        
remove_entity(ent)
    }
}

public 
fw_touch(EntId)
{
    
// If ent is valid
    
if(!pev_valid(Ent))
    return
    static 
OwnerOwner pev(Entpev_owner)
    if(
pev(Entpev_movetype) == MOVETYPE_NONE)
    return

    static 
classnameptd[32]
    
pev(Idpev_classnameclassnameptd31)
    if (
equali(classnameptd"func_breakable")) ExecuteHamBHam_TakeDamageId00200.0DMG_GENERIC )

    new 
Float:originF[3]
    
pev(Entpev_originoriginF)

    if(
is_user_alive(Id))
    {
        
remove_entity(Ent)
        
make_blood(originF)
        
ExecuteHamB(Ham_TakeDamageIdEntAttacker65.0DMG_BULLET)
        
emit_sound(IdCHAN_VOICEhit_sound1.0ATTN_NORM0PITCH_NORM)
    }
    else
    {
        
make_bullet(OwneroriginF)
        
engfunc(EngFunc_EmitSoundEntCHAN_WEAPONhit_wall1.0ATTN_STATIC0PITCH_NORM)
        
fake_smokes(OwneroriginF)
        
set_pev(Entpev_movetypeMOVETYPE_NONE)
        
set_pev(Entpev_solidSOLID_NOT)
    }


Last edited by m4m3ts; 02-26-2015 at 18:48.
m4m3ts is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 01-18-2014 , 15:10   Re: Entity Go Through Player
Reply With Quote #2

If you want to do a bullet, use TraceLines, there exists many threads with this kind of things. Please search
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
m4m3ts
Senior Member
Join Date: Jun 2012
Old 01-18-2014 , 18:05   Re: Entity Go Through Player
Reply With Quote #3

Quote:
Originally Posted by meTaLiCroSS View Post
If you want to do a bullet, use TraceLines, there exists many threads with this kind of things. Please search
ok, thanks.
m4m3ts is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 01-18-2014 , 18:10   Re: Entity Go Through Player
Reply With Quote #4

Don't blank out your post.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
m4m3ts
Senior Member
Join Date: Jun 2012
Old 06-10-2014 , 12:06   Re: Entity Go Through Player
Reply With Quote #5

Quote:
Originally Posted by meTaLiCroSS View Post
If you want to do a bullet, use TraceLines, there exists many threads with this kind of things. Please search
i dont want to do it with bullet.
in this case i use entity model, such us fire sprite or like an arrow model.
so i have set it in high velocity, but its not hit on player.
please help..
m4m3ts is offline
Reply



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 08:34.


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