View previous topic :: View next topic |
Author |
Message |
skite2001

Joined: 17 Nov 2008 Posts: 17
|
Posted: Sat Nov 22, 2008 8:30 am Post subject: How to stop secret walls and switches from bleeding??? |
|
|
Hello,
how can i stop the secret walls/switches from bleeding after i shot them? This really looks a bit unfitting.
Some example:
It seems this is fixed in dpmod, so it can be done via quake c scripting.
regrats and thx
~skitey |
|
Back to top |
|
 |
Error Inside3D Staff

Joined: 05 Nov 2004 Posts: 558 Location: VA, USA
|
Posted: Sat Nov 22, 2008 10:58 am Post subject: |
|
|
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. _________________ Inside3D : Knowledge Is Power
Darkplaces Documentation Wiki |
|
Back to top |
|
 |
skite2001

Joined: 17 Nov 2008 Posts: 17
|
Posted: Sat Nov 22, 2008 12:56 pm Post subject: |
|
|
Error wrote: |
1. just because it's done in dpmod, doesn't mean it's pure qc. every engine out there has new qc builtins.
|
hmm, sure, but if it DON'T work with the ENGINE and work with a mod, i think its mod releated, or? ^_- |
|
Back to top |
|
 |
leileilol

Joined: 15 Oct 2004 Posts: 1321
|
Posted: Sat Nov 22, 2008 5:45 pm Post subject: |
|
|
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! |
|
Back to top |
|
 |
skite2001

Joined: 17 Nov 2008 Posts: 17
|
Posted: Sat Nov 22, 2008 6:30 pm Post subject: |
|
|
@ leileilol
really nice, even if you say its a "quick stupid fix" ^_-
i think this is better than nothing! |
|
Back to top |
|
 |
Wazat
Joined: 15 Oct 2004 Posts: 732 Location: Middle 'o the desert, USA
|
Posted: Sat Nov 22, 2008 8:05 pm Post subject: |
|
|
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! _________________ 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. |
|
Back to top |
|
 |
skite2001

Joined: 17 Nov 2008 Posts: 17
|
Posted: Sun Nov 23, 2008 9:51 am Post subject: |
|
|
much thx for your reply wazat!
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^^
Quote: | 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 |
|
Back to top |
|
 |
|