Welcome to the Builder Academy

Question Moving corpse on death

More
12 Jun 2012 01:01 #37 by Halenbane
Has anyone ever experimented with moving a player's corpse after they die? Basically what I'm thinking is when someone dies, if they have a certain item on them, it teleports their corpse to a pre-determined room so they don't have to go back to where they died to retrieve it.

Example:

In your inventory you have item: A retrieval stone

You die out in the woods somewhere from a vicious bunny attack.

Your corpse is then teleported to Midgaard Temple.

Please Log in or Create an account to join the conversation.

More
12 Jun 2012 01:50 #40 by Vatiken
Replied by Vatiken on topic Re: Moving corpse on death
The make_corpse() function creates the corpse object and places all the equipment and gold in the corpse. It wouldn't be too difficult place a flag within the function which goes TRUE if a certain item happens to be in the corpse. Then instead of doing an obj_to_room(corpse, IN_ROOM(ch)), you'd put the object in the room of your choosing.

tbaMUD developer/programmer

Please Log in or Create an account to join the conversation.

More
12 Jun 2012 02:14 #41 by Halenbane
what would be the best way to write the obj_to_room to point it to a room

Please Log in or Create an account to join the conversation.

More
12 Jun 2012 02:32 #44 by Vatiken
Replied by Vatiken on topic Re: Moving corpse on death
Trace the mortal_start_room code in interpreter.c to see how we place a character in a room with a specific VNUM.

tbaMUD developer/programmer

Please Log in or Create an account to join the conversation.

More
12 Jun 2012 02:47 #45 by Halenbane
Many thanks Vat

Please Log in or Create an account to join the conversation.

More
12 Jun 2012 03:27 #47 by Halenbane
I see and understand how that is determining a players starting location, but still unclear on how to do this with a corpse. The players start room will stay the same.

Or even on another note, I think it would be a nice feature to maybe make it so players still lose exp etc when they die, but they remain geared. Then again this may get funny with how objects are saved to the char, not sure..

Please Log in or Create an account to join the conversation.

Time to create page: 0.204 seconds