AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   2 questions about "box" phys system (https://forums.alliedmods.net/showthread.php?t=74513)

hzqst 07-20-2008 09:58

2 questions about "box" phys system
 
--------------first----------------
Quote:

new gphys[501][3]

public plugin_init() {
set_task(1.0,"phys")
}

public phys()
while((ent = find_ent_by_class(ent, "zombiemod_phys")) != 0){//create this entity in Hammer ,its a new entity class(can't find in fgd)
get_brush_entity_origin(ent,gphys[ent])//get origin
//entity_set_int(ent,EV_INT_solid, 2)//maybe it's not necessary because its a bursh entity
entity_set_int(ent, EV_INT_movetype, 6)//fall
entity_set_float(ent,EV_FL_takedamage,1.0)//detect shoot
entity_set_float(ent,EV_FL_health,9999.0)//prevent break
entity_set_int(ent, EV_INT_team, zmphys)
//its a physic entity
}
any idea?

---------------second-----------------
takedamage ( victim, inflictor, attacker, Float:damage, type )

what's the different between inflictor and attacker?

Arkshine 07-20-2008 10:32

Re: 2 questions about "box" phys system
 
- I don't understand what you want there..

- Inflictor is the entity which inflicts damage on victim.
Attacker is generaly the entity's owner.


All times are GMT -4. The time now is 05:37.

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