A damagable, non-solid entity?
Moderator: InsideQC Admins
2 posts
• Page 1 of 1
A damagable, non-solid entity?
Hi all,
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:
I'm using FTEQW, so it's possible to use dimension_solid but a non-solid entity doesn't respond to tracelines.. Otoh, I notice there's an ftetraceline with a reference to something called FL_FINDABLE_NONSOLID... so...
can it be done?
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;
};
I'm using FTEQW, so it's possible to use dimension_solid but a non-solid entity doesn't respond to tracelines.. Otoh, I notice there's an ftetraceline with a reference to something called FL_FINDABLE_NONSOLID... so...
can it be done?
- OneManClan
- Posts: 243
- Joined: Sat Feb 28, 2009 2:38 pm
Re: A damagable, non-solid entity?
UPDATE:
This is actually as simple as editing doors.qc, and adding the condition that they do not respond to these particular entities. Thanks to Xavior for pointing this out!
This only leaves the traceline issue...
OneManClan wrote:4. Not trigger doors!
This is actually as simple as editing doors.qc, and adding the condition that they do not respond to these particular entities. Thanks to Xavior for pointing this out!
This only leaves the traceline issue...
- OneManClan
- Posts: 243
- Joined: Sat Feb 28, 2009 2:38 pm
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest