Page 1 of 1
Killing off your own men
Posted: Sun May 08, 2005 1:02 pm
by LtNeil
I have placed a small number of men in my map and i would like to kill them all off in my explosion whats the easiest way to do this? they are all allied soldier not axis (its a single player map)
Posted: Sun May 08, 2005 2:31 pm
by jv_map
Use the damage command and watch them fly away
$some_entity
damage( Entity attacker, Integer damage, Entity inflictor, Vector position, Vector direction, Vector normal, Integer knockback, Integer damageflags, Integer meansofdeath, Integer location )
Meansofdeath values (use the number):
Code: Select all
// 0 MOD_NONE,
// 1 MOD_SUICIDE,
// 2 MOD_CRUSH,
// 3 MOD_CRUSH_EVERY_FRAME,
// 4 MOD_TELEFRAG,
// 5 MOD_LAVA,
// 6 MOD_SLIME,
// 7 MOD_FALLING,
// 8 MOD_LAST_SELF_INFLICTED,
// 9 MOD_EXPLOSION,
// 10 MOD_EXPLODEWALL,
// 11 MOD_ELECTRIC,
// 12 MOD_ELECTRICWATER,
// 13 MOD_THROWNOBJECT,
// 14 MOD_BEAM,
// 15 MOD_ROCKET,
// 16 MOD_IMPACT,
// 17 MOD_BULLET,
// 18 MOD_FAST_BULLET,
// 19 MOD_VEHICLE,
// 20 MOD_FIRE,
// 21 MOD_FLASHBANG,
// 22 MOD_ON_FIRE,
// 23 MOD_GIB,
// 24 MOD_IMPALE,
// 25 MOD_BASH,
// 26 MOD_TOTAL_NUMBER
Location values:
Code: Select all
// Hit locations
// 0 head
// 1 helmet
// 2 neck
// 3 upper torso
// 4 middle torso
// 5 lower torso
// 6 pelvis
// 7 right upper arm
// 8 left upper arm
// 9 right upper leg
// 10 left upper leg
// 11 right lower arm
// 12 left lower arm
// 13 right lower leg
// 14 left lower leg
// 15 right hand
// 16 left hand
// 17 right foot
// 18 left foot
Damageflags:
Code: Select all
// Damage flags (just add together the values for the flags you want).
// (These are haxedecimal values, hence 0x0001 = 1, 0x0002 = 2, 0x0010 = 16, 0x040 = 16*4 = 64
// #define DAMAGE_RADIUS 0x00000001 // damage was indirect
// #define DAMAGE_NO_ARMOR 0x00000002 // armour does not protect from this damage
// #define DAMAGE_ENERGY 0x00000004 // damage is from an energy based weapon
// #define DAMAGE_NO_KNOCKBACK 0x00000008 // do not affect velocity, just view angles
// #define DAMAGE_BULLET 0x00000010 // damage is from a bullet (used for ricochets)
// #define DAMAGE_NO_PROTECTION 0x00000020 // armor, shields, invulnerability, and godmode have no effect
// #define DAMAGE_NO_SKILL 0x00000040 // damage is not affected by skill level
Posted: Sun May 08, 2005 4:21 pm
by Rookie One.pl
jv_map wrote:Damageflags:
Code: Select all
// Damage flags (just add together the values for the flags you want).
// (These are haxedecimal values, hence 0x0001 = 1, 0x0002 = 2, 0x0010 = 16, 0x040 = 16*4 = 64
// #define DAMAGE_RADIUS 0x00000001 // damage was indirect
// #define DAMAGE_NO_ARMOR 0x00000002 // armour does not protect from this damage
// #define DAMAGE_ENERGY 0x00000004 // damage is from an energy based weapon
// #define DAMAGE_NO_KNOCKBACK 0x00000008 // do not affect velocity, just view angles
// #define DAMAGE_BULLET 0x00000010 // damage is from a bullet (used for ricochets)
// #define DAMAGE_NO_PROTECTION 0x00000020 // armor, shields, invulnerability, and godmode have no effect
// #define DAMAGE_NO_SKILL 0x00000040 // damage is not affected by skill level
Now where did you dig this out from? FAKK source?
Posted: Sun May 08, 2005 5:11 pm
by jv_map
global/bullethit.scr

Posted: Sun May 08, 2005 5:52 pm
by LtNeil
Well i did say easiest way perhaps i should have said simplest way!
Do i have to put a trigger in? do i put the $some_entity then damage 20 in the script or do i give it to the soldier like
$targetname soldier
damage 20
sorry but im not good at scripting and i need it a bit better explained
