Raised This Month: $ Target: $400
 0% 

Entity only takedamage from knife


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 07-18-2018 , 16:54   Re: Entity only takedamage from knife
Reply With Quote #5

Quote:
Originally Posted by Ghosted View Post
[DEBUGGING OPTION] Try separatelly remove stuff from entity and test each one
PHP Code:
public create_revenant()
{
    static 
EntEnt engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"info_target"))
    if(!
pev_valid(Ent)) return
    
set_pev(Entpev_originpOrigin//Appear in right Origin
    
    
set_pev(Entpev_anglespv_Origin//Appear in right Angel
    
    
set_pev(Entpev_health30000.0//Correct Health

    
set_pev(Entpev_classnameGIANT_CLASSNAME//Think works so Classname is correct
    
engfunc(EngFunc_SetModelEntGIANT_MODEL//Appear in right model
    
set_pev(Entpev_solidSOLID_BBOX//Touchable

    
set_pev(Entpev_movetypeMOVETYPE_PUSHSTEP//(how to check this?)
    
set_pev(Entpev_gamestate1//Turn on or off doesn't effect
    
set_pev(Entpev_stateSTATE_COMBAT//pev_state = pev_iuser1

    
set_pev(Entpev_takedamage1.0
    static 
Float:Takedamagepev(Entpev_takedamageTakedamage)
    
client_print(0print_chat"TAKEDAMAGE: %f"Takedamage//printed 1.0

    
static Float:Maxs[3], Float:Mins[3]
    
Maxs[0] = 75.0;
    
Maxs[1] = 75.0;
    
Maxs[2] = 120.0
    Mins
[0] = -75.0;
    
Mins[1] = -75.0;
    
Mins[2] = -150.0;
    
entity_set_size(EntMinsMaxs//Can jump above so the hitbox is correct
    
Play_Animation(EntANIME_APPEAR//Did run the animation
    
    
emit_sound(EntCHAN_BODYGiantSounds[3], VOL_NORMATTN_NORM0PITCH_NORM)

    
//static Float:Origin[3]; pev(Ent, pev_origin, Origin)
    //Origin[2] += 36.0
    //Create_Rock(Origin)
    
    
drop_to_floor(Ent)
    
entity_set_float(EntEV_FL_nextthinkget_gametime() + 5.5)
    
    if(!
g_HamReg)
    {
        
g_HamReg 1
        client_print
(0print_console"Ham Registered"//Did print
        
RegisterHamFromEntity(Ham_TakeDamageEnt"fw_BossTakeDamage"//Does show damage on knifing
        //RegisterHamFromEntity(Ham_TraceAttack, Ent, "fw_BossTraceAttack")
    
}

    
g_Test Ent

__________________
My plugin:
Celena Luna is offline
 



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 12:51.


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