Re: Falling from Air Rooms

From: Ryan A.J. Biggs (ae744@freenet.toronto.on.ca)
Date: 07/17/96


>   I set up air rooms in my MUD so that if a character or mob is not affected
> with an AFF_FLY flag and is in a SECT_FLYING room then he or she will plummet
> down.  The character will continue to fall until they can no longer go down or
> they hit a non SECT_FLYING ROOM.  I have it all working, damaging the character
> per # of squares fallen, etc.  The only problem is checking for when a
> character should fall.  I currently check whenever an AFF wears off but this
> won't cover all circumstances.  For example: If a god teleports a player into
> an air room

I wouldn't mind getting acopy of this code if possible.  I have a few 
uses for it, especially considering that I have several damage types, 
including falling damage and spells like feather fall, and skills like 
falling.

> or a player walks off the side of the cliff, etc.  I thought the best way to
> do this is to add something into heartbeat() to check all the mobs and
> characters every X number of seconds.  To be realistic it would have to check
> very frequently but I am afraid that this will slow down the MUD.  Any ideas on
> how I can do this more effectively?  Or am I just going to have to live with a
> possible X number of seconds delay from the time the player enters the room to
> the time he or she falls?

I might be able to think up something.  I would think that the best place 
to put it would be in the char_to_room function.  That way, you have the 
advantage of not needed to check every player at all times, only when 
they move from one room to another.

------------------------------------------------------------------
Ryan A.J. Biggs    email-ae744@freenet.toronto.on.ca
Doppleganger, Charon the Boatman and member of Dieties Anonymous
Owner of a 100% organic wibble and Plasma lamp, and rubber chicken
Keeper of the sacred butcher knife and the Cloak of Shadows
Compiler of the Net.Psionics.Handbook
------------------------------------------------------------------



This archive was generated by hypermail 2b30 : 12/07/00 PST