SHORT VERSION:
Is it possible to have a non-solid entity that can receive damage via a weapon using traceline()?
LONG VERSION:
Objective: A floating entity which goes through walls. It needs to:
1. Be non-solid (ie move through walls, doors, other entities)
2. Receive projectile damage
3. Receive direct fire damage
4. Not trigger doors!
The closest I can get is:
camera.movetype = #MOVETYPE_FLY;
camera.solid = #SOLID_CORPSE;
camera.takedamage = #DAMAGE_AIM;
camera.health = 10;
camera.think = Camera_Think;
camera.nextthink = time + 60;
This is a non solid camera, which if damaged, disappears (temporarily), via:
Code: Select all
void ()Camera_Think =
{
// self is the camera
if(self.health <= 0)
{
setmodel (self, ""); // the camera becomes invisible
self.solid = #SOLID_NOT; // I don't remember why this is necessary
self.health = 10;
}
else
setmodel (self, "progs/camera.mdl");
self.takedamage = #DAMAGE_AIM; // this needs to be reset after the entity dies
self.solid = #SOLID_CORPSE;
}
self.think = Camera_Think;
self.nextthink = time + 60;
};
can it be done?