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 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? -brian __ -- "Take my advice and go back to the time | Brian Menges you came from. The future isn't what | NASA Ames Research Center it used to be."--G'kar, "The Long Dark" | Mail Stop: N262-2 0__0 | Phone: (415) 604-0069 =============ooO==(__)==Ooo=============| menges@eos.arc.nasa.gov
This archive was generated by hypermail 2b30 : 12/07/00 PST