How to stop secret walls and switches from bleeding???
Moderator: InsideQC Admins
7 posts
• Page 1 of 1
-

skite2001 - Posts: 17
- Joined: Mon Nov 17, 2008 5:40 pm
sorry, it's been a lil while since I've coded or even posted on here, but let me lend my few cents.
1. just because it's done in dpmod, doesn't mean it's pure qc. every engine out there has new qc builtins.
2. easy. in the trace attack thing where it spawns the blood... you need to check if other (maybe trace_ent)'s classname is the trigger or func name thing.
come to think of it, that probably didn't help.
1. just because it's done in dpmod, doesn't mean it's pure qc. every engine out there has new qc builtins.
2. easy. in the trace attack thing where it spawns the blood... you need to check if other (maybe trace_ent)'s classname is the trigger or func name thing.
come to think of it, that probably didn't help.
-

Error - InsideQC Staff
- Posts: 865
- Joined: Fri Nov 05, 2004 5:15 am
- Location: VA, USA
Quick stupid fix, for now (but works with players and enemies, PFT as if anyone needs new engine builtins or classname checking):
Add the following before spawnblood in TraceAttack
if (trace_ent.flags)
You can shove that in W_FireAxe too
As for the spikes bleeding, just find spike_touch, shove
if (other.flags)
right above spawn_touchblood( 9); as well as the superspike_touch function below right above spawn_touchblood.
(Most) shootable switches and doors shouldn't bleed now!
Add the following before spawnblood in TraceAttack
if (trace_ent.flags)
You can shove that in W_FireAxe too
As for the spikes bleeding, just find spike_touch, shove
if (other.flags)
right above spawn_touchblood( 9); as well as the superspike_touch function below right above spawn_touchblood.
(Most) shootable switches and doors shouldn't bleed now!
- leileilol
- Posts: 2783
- Joined: Fri Oct 15, 2004 3:23 am
Typically, SOLID_BSP entities should not bleed. These are walls, platforms, switches, etc, and monsters are not solid_bsp unless your mod is doing some really wacky stuff. So instead of testing that .flags is not 0, you could test if they're not SOLID_BSP. It's less of a hack that way, though my suspicion is that lei's solution will work fine in stock quake (I can't think of any flags that a bsp ent would have, off the top of my head; but I don't like hacks because they can bite you later
).
if(trace_ent.solid != SOLID_BSP) // should it bleed?
One final intuitive solution is .takedamage. Entities with DAMAGE_AIM are typically bleeding things like monsters and players. If something is DAMAGE_YES, it still takes damage, but when a grenade hits it that grenade just bounces off instead of exploding immediately. I think the only entities in the game that are DAMAGE_YES are the ones that should not bleed, i.e. walls and buttons.
if(trace_ent.takedamage == DAAMGE_AIM) // should it bleed?
I hope that helps!
if(trace_ent.solid != SOLID_BSP) // should it bleed?
One final intuitive solution is .takedamage. Entities with DAMAGE_AIM are typically bleeding things like monsters and players. If something is DAMAGE_YES, it still takes damage, but when a grenade hits it that grenade just bounces off instead of exploding immediately. I think the only entities in the game that are DAMAGE_YES are the ones that should not bleed, i.e. walls and buttons.
if(trace_ent.takedamage == DAAMGE_AIM) // should it bleed?
I hope that helps!
When my computer inevitably explodes and kills me, my cat inherits everything I own. He may be the only one capable of continuing my work.
- Wazat
- Posts: 771
- Joined: Fri Oct 15, 2004 9:50 pm
- Location: Middle 'o the desert, USA
much thx for your reply wazat!
well, whats "typically" in quake? ^_-
using this way, it works "a bit"...always testing at the 1st three triggers at e1m1...
-secret door on the right after start = working
-hidden lift trigger (planet-monitor) to get to the quaddamage = bleeding
-hidden switch above the extendable bridge = working
overall: shooting at secret walls will work, shooting at secret switches will bleed => thats a bit stupid^^
hmm...nice...all 3 "test" switches working. no bleeding at all.
I hope this "fix" got no unwanted side effects.
UPDATE
hmm, ok, 1 minor side effect i found^^ used the tutorial for shooting wall zombies at start.bsp...they don't bleed if i shoot them. seems there are 2 different "flags"...1 for walls and 1 for switches/wallzombies...crap
Wazat wrote:Typically, SOLID_BSP entities should not bleed.
if(trace_ent.solid != SOLID_BSP) // should it bleed?
well, whats "typically" in quake? ^_-
using this way, it works "a bit"...always testing at the 1st three triggers at e1m1...
-secret door on the right after start = working
-hidden lift trigger (planet-monitor) to get to the quaddamage = bleeding
-hidden switch above the extendable bridge = working
overall: shooting at secret walls will work, shooting at secret switches will bleed => thats a bit stupid^^
One final intuitive solution is .takedamage. Entities with DAMAGE_AIM are typically bleeding things like monsters and players. [...] I think the only entities in the game that are DAMAGE_YES are the ones that should not bleed, i.e. walls and buttons.
if(trace_ent.takedamage == DAAMGE_AIM) // should it bleed?
hmm...nice...all 3 "test" switches working. no bleeding at all.
I hope this "fix" got no unwanted side effects.
UPDATE
hmm, ok, 1 minor side effect i found^^ used the tutorial for shooting wall zombies at start.bsp...they don't bleed if i shoot them. seems there are 2 different "flags"...1 for walls and 1 for switches/wallzombies...crap
-

skite2001 - Posts: 17
- Joined: Mon Nov 17, 2008 5:40 pm
7 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest
