Newsgroups: rec.games.computer.quake.quake-c
Path: clanworld.com!news.webspan.net!opus.ies-energy.com!news.cs.utwente.nl!cosy.sbg.ac.at!newsfeed.Austria.EU.net!EU.net!howland.erols.net!newsfeed.internetmci.com!199.117.161.1!csn!nntp-xfer-1.csn.net!news.acsu.buffalo.edu!freenet.buffalo.edu!ci363
From: "David H. Bronke" <ci363@freenet.buffalo.edu>
Subject: Re: ThrowGib -- Bouncin'
In-Reply-To: <01bd2751$b940ae20$e1d0379d@duplo.dns.microsoft.com>
Content-Type: TEXT/PLAIN; charset=US-ASCII
Message-ID: <EnE6Au.81J@freenet.buffalo.edu>
To: Tony Hafner <hafhead@geocities.com>
Sender: nntp@acsu.buffalo.edu
NNTP-Posting-Host: freenet.buffalo.edu
Organization: Buffalo Free-Net
References: <En5qCt.763@freenet.buffalo.edu> <01bd2751$b940ae20$e1d0379d@duplo.dns.microsoft.com>
Mime-Version: 1.0
Date: Mon, 26 Jan 1998 12:49:48 GMT
Lines: 55
Xref: clanworld.com rec.games.computer.quake.quake-c:4877

On 22 Jan 1998, Tony Hafner wrote:

> > I want to make gibs bounce farther and a greater number of times. Also
> can
> > there be different velocities, and if so, can I make fast ones just make
> a
> > "splat" sound and stick to walls + stuff?
> 
> I haven't really looked much at the Q2 code, but I know that
> some of this would be fairly trivial in Q1.  I'm betting that
> Q2 isn't much different.
> 
> For sound and sticking to walls, you just need to add a touch
> function to the gib code.  Create a function that changes the
> movetype of the gib to MOVETYPE_NONE and makes a sound.  You'd
> also have to extend the time that it sticks around.  I am
> guessing that it has a think function that tells it to remove
> itself in 5 seconds or so.  Just up the time on this to make it
> stick around longer.  Don't let it stay too long- you'll run out
> of objects before too long and the server will crash.  Note that
> this only works to make it stick to walls- if you want it to
> stick to moving objects then you'll have to do a little more
> work to make it follow the object.  You can check what you hit
> in the touch function- it will be in the global entity variable
> "other".  If (other.classname == "worldspawn") then you are
> hitting a regular wall.  To set the touch function, put the line
>     self.th_touch = {your touch function};
> At least, I think that is what the function pointer is called-
> it's been a while since I looked at the source.
> 
> Making it bounce farther is a little trickier, but it can be
> done.  For starters, make sure that the movetype is
> MOVETYPE_BOUNCE.  Then you have to tweak it a little by adding
> some extra momentum to make up for friction when it hits the
> ground.  This could also be done in a touch function.
> 
> -- 
> Tony Hafner
> If replying to this post by mail, remove everything in my return
>     address between the *s.
> Check out my home page at: http://www.geocities.com/~hafhead
> 
> 
> 

When I precache my sound, no matter where I precache it (I even tried
worldspawn!) Quake just says something like, "MUST PRECACHE IN SPAWN FUNCTION."
Can U help any?


David H. Bronke
Quake+Doom level creator, programmer ;'), and Web Page maker.
E-Mail: ci363@freenet.buffalo.edu
Web Page: http://freenet.buffalo.edu/~ci363/index.html

