Inside3D!
     

How to stop secret walls and switches from bleeding???

 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming
View previous topic :: View next topic  
Author Message
skite2001



Joined: 17 Nov 2008
Posts: 17

PostPosted: Sat Nov 22, 2008 8:30 am    Post subject: How to stop secret walls and switches from bleeding??? Reply with quote

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
View user's profile Send private message
Error
Inside3D Staff


Joined: 05 Nov 2004
Posts: 558
Location: VA, USA

PostPosted: Sat Nov 22, 2008 10:58 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
skite2001



Joined: 17 Nov 2008
Posts: 17

PostPosted: Sat Nov 22, 2008 12:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
leileilol



Joined: 15 Oct 2004
Posts: 1321

PostPosted: Sat Nov 22, 2008 5:45 pm    Post subject: Reply with quote

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
View user's profile Send private message
skite2001



Joined: 17 Nov 2008
Posts: 17

PostPosted: Sat Nov 22, 2008 6:30 pm    Post subject: Reply with quote

@ leileilol
really nice, even if you say its a "quick stupid fix" ^_-
i think this is better than nothing!
Back to top
View user's profile Send private message
Wazat



Joined: 15 Oct 2004
Posts: 732
Location: Middle 'o the desert, USA

PostPosted: Sat Nov 22, 2008 8:05 pm    Post subject: Reply with quote

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 Wink ).

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
View user's profile Send private message MSN Messenger
skite2001



Joined: 17 Nov 2008
Posts: 17

PostPosted: Sun Nov 23, 2008 9:51 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2004 phpBB Group