Re: weights of nested containers

new topic     » goto parent     » topic index » view thread      » older message » newer message

Michelle,

This could be dangerous, but if you keep on your toes then it could be fine.

Say for instance that I'm playing the MOO, and I create an object of my 
own. Then, I manually set the roomin value to the ID of some person's 
character. They see that they have this object they don't know about in 
their inventory, so they drop it. Now, suddenly, their weight goes down, 
perhaps into negative numbers (perhaps crashing the program in that 
case?). I guess the only way to prevent this is to prevent the roomin 
value from being manually modified, but that's sort of a silly 
restriction to put on programmers. It could prevent some very 
interesting and cool custom spells, etc.

Just food for thought.

I'm still interested in helping out with the coding of this, by the way.

~ Isaac

Michelle Rogers wrote:

>
>
>OH Wait!! I hadn't thought about it like that!
>
>I think what you are saying is this..
>
>If a player weighs 50 stones....
>  He picks up an apple that weighs 1 stone...
>   Now, his weight is reset to 51 stones
>
>Is that what you are saying???  *rolls her eyes*  I ask because it was so
>easy I'm slapping myself...*smirks*  I was trying to make it too hard.
>
>And then you don't have to check through the nesting..because everytime you
>pick something up your weight increases!
>
>So if you try to pick up a person who normally weighs 50 stones...but he is
>already carrying someone who weighs 50 stones...his weight already says 100
>stones....So, all you have to do is check his weight!  *slaps her forehead
>and goes "duh"*
>
>*grins*  thanks..that might fix the whole thing
>
>Michelle Rogers
>----- Original Message -----
>From: "Elliott Sales de Andrade" <quantum_analyst at hotmail.com>
>To: <EUforum at topica.com>
>Sent: Monday, February 16, 2004 6:08 PM
>Subject: RE: weights of nested containers
>
>
>>>From: Michelle Rogers <michellerogers at bellsouth.net>
>>>Reply-To: EUforum at topica.com
>>>To: EUforum at topica.com
>>>Subject: weights of nested containers
>>>Date: Mon, 16 Feb 2004 17:46:04 -0500
>>>
>>>I am writing a mud progam in Euphoria.  Currently I have each character
>>>with
>>>a certain amount of strength.  Depending on their strength, they can pick
>>>up
>>>a certain amount of weight.  They can even pick up other characters, if
>>>they
>>>are strong enough to pick up the weight of the other character.
>>>
>>>The way I currently do this is that the weight of the person being picked
>>>up
>>>is evaluated.  If they are too heavy, a message is given.  If they are
>>>      
>>>
>not
>  
>
>>>too heavy, the person picks them up.
>>>
>>>      
>><snip>
>>
>>   I think what you can do is, when a person picks up something, its
>>    
>>
>weight
>  
>
>>increases by the weight of the picked up thing. That way, you don't even
>>need check any other objects. When you stop carrying the object, you just
>>decrease the carrier's weight by the object's weight.
>>
>>    
>>>But, how do I tell the code to keep checking until I've gotten to the end
>>>of
>>>everyone who's being carried (i.e.  the "last generation" of people being
>>>carried)?
>>>
>>>      
>>  Well, you could possibly do some recursive thing, but some people find
>>    
>>
>it
>  
>
>>somewhat confusing.
>>
>>    
>>>hmm...as I actually typed out an explanation..I'm getting a sort of a
>>>      
>>>
>hazy
>  
>
>>>idea..so I may figure this out..but I'm still going to post the message,
>>>just in case.
>>>
<snip>

>
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu