I am trying to adapt the WEAPONS.WDL and WAR.WDL for use without trace/shoot. All of my shooting will be done with models and impact detection.

So far, I haven't been able to harm them. What do I need to change to get damage to register on an impact event?

Becuase I want to differentiate between NPC fire and player fire, I use skill29 to hold a number representing object type.

Object_types:
11 = player rocket
12 = player laser
21 = enemy rocket
22 = enemy laser

So I have the following in the AI's action:
code:
// Test robot, 
//uses object_type
ACTION robot_test
{
test_actor = ME;
MY._FORCE = 2;
my._FIREMODE = DAMAGE_IMPACT+FIRE_ROCKET+HIT_FLASH+0.05;
my._HITMODE = HIT_GIB + HIT_EXPLO;
MY._WALKSOUND = _SOUND_ROBOT;
my._I_ACCURACY = 1;
my._I_COWARDICE = 30;
my._I_ALERTNESS = 1000;
my.fat = off;
my.narrow = on;
my.enable_scan = on;
my.enable_detect = on;
my.enable_impact = on;
my.enable_entity = on;
my.enable_push = on;
my.object_type = 20;
my.skill30 = 20 * time;
my._WALKSWIM_DIST = 1;
my._RUNCRAWL_DIST = 1;
my._STANDJUMP_TIME = 1;
my._ATTACKDUCK_TIME = 1;
my._RUNTHRESHOLD = 30;
my._HEALTH = 100;
my._ARMOR = 100;
my._ALERTNESS = 1000;
my._ACCURACY = 1;
my._COWARDICE = 30;
my._MUZZLEATTACH = 1;

if (event_type == event_impact) && (you.object_type == 11) || (you.object_type == 12)
{
my._HEALTH -= 20;
msg.string = "HIT!"; // for debug.
show_message();

}
if(my._HEALTH <= 0) // no health? Die
{
exclusive_entity;
wait(1);
state_die();
return;
}
// Note: changed, negative cowardice means never retreat
if(my._HEALTH <= my._I_COWARDICE && my._I_COWARDICE >= 0) // low health? Escape
{
exclusive_entity;
wait(1);
state_escape();
return;
}

actor_fight();
}

Mark


People who live in glass houses shouldn't vacuum naked.