Raised This Month: $ Target: $400
 0% 

Help about solid


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
dias
BANNED
Join Date: Jul 2009
Location: South Vietnam
Old 05-08-2012 , 11:41   Help about solid
Reply With Quote #1

I create a npc then i set solid slidebox and test. But when i shoot the npc it didn't takedamage

See Video: http://www.youtube.com/watch?v=AaS-NMVQ2f8
in 0:23

as you can see, sometime i can't shoot the npc, how to solve that problem ?. just like player, shoot anywhere in player's body still can take damage. but can't in NPC

Here is code
PHP Code:
public create_revenant()
{
    new 
ent create_entity("info_target")
    
g_ent ent
    
    
static Float:Origin[3]
    
Origin[0] = g_official_origin[0]
    
Origin[1] = g_official_origin[1]
    
Origin[2] = g_official_origin[2]
    
    
entity_set_origin(entOrigin)
    
    
//entity_set_vector(ent, EV_VEC_angles, MyAngles)
    
    //MyAngles[0] -= MyAngles[0] * 2
    
    //entity_set_vector(ent, EV_VEC_v_angle, MyAngles)
    
    
entity_set_float(entEV_FL_takedamage1.0)
    
entity_set_float(entEV_FL_healthREVENANT_HEALTH 1000.0)
    
    
entity_set_string(entEV_SZ_classname"npc_revenant")
    
entity_set_model(entrevenant_model)
    
entity_set_int(entEV_INT_solidSOLID_BBOX)
    
entity_set_int(entEV_INT_movetypeMOVETYPE_PUSHSTEP)
    
    
entity_set_int(entEV_INT_gamestate1)
    
    new 
Float:maxs[3] = {25.050.0200.0}
    new 
Float:mins[3] = {-25.0, -50.0, -35.0}
    
entity_set_size(entminsmaxs)
    
entity_set_int(entEV_INT_modelindexrevenant_model_id)
    
    
set_entity_anim(ent1)
    
set_task(14.0"set_start_revenant"ent+TASK_STARTING)
    
    if(!
g_reg)
    {
        
g_reg 1
        RegisterHamFromEntity
(Ham_TakeDamageent"fw_revenant_takedamage"1)
    }
    
    
g_mahadashing 0
    g_time_doing 
0
    
    emit_sound
(entCHAN_BODYrevenant_sound[7], 1.0ATTN_NORM0PITCH_NORM)
    
    
// Make Healthbar
    
healthbar create_entity("env_sprite")
    
    
set_pev(healthbarpev_scale1.0)
    
set_pev(healthbarpev_ownerent)
    
engfunc(EngFunc_SetModelhealthbarhealthbar_spr)    
    
    
set_task(0.1"recheck_boss"ent+TASK_RECHECK__"b")
    
set_task(random_float(7.015.0), "do_skill_now"TASK_SKILL)
    
    
drop_to_floor(ent)


Last edited by dias; 05-08-2012 at 19:24.
dias is offline
Send a message via Yahoo to dias Send a message via Skype™ to dias
 



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 00:19.


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