Hellooooooooo let me explain;

So i have an item lets call it ''p''. If theres a p on the way its passable, player can just pass throught it, but if theres a ''stack''' (2 p item) it blocks player path and it became impassable, hence blocks player movement.

tldr:

1 p = you can walk over it.
2 p = you will get blocked.


Can someone enlighnt me?
Does the Height flag in tiledata plays any role here? thanks

the next code doesnt work

Code:
 public override bool OnMoveOver( Mobile m )
            {
              if (m != null && m is PlayerMobile)
                {
            foreach (Item item in GetItemsInRange(0))
            {
                if (item is GiftBox && item.Items.Count >= 2)
                {
                 return false;
                }
            }

               
            }
           
            return true;
            }
 
Last edited:
I think this question havent been asked befored, so it might be interesting to know if its even possible! :p
 
What is your item height?
If you set the height to 0, does it no longer block characters?

The current item height is 4. As 4 it doesnt block the player.

What i want to do is block the player if there are 2 items stacked/ upon each other.

Sometimes i cant explain myself, thanks

I also tried to play around with onmoveover method, it doesnt work

Code:
           public override bool OnMoveOver( Mobile m )
            {
              if (m != null && m is PlayerMobile)
                {
            foreach (Item item in GetItemsInRange(0))
            {
                if (item is GiftBox && item.Items.Count >= 2)
                {
                m.SendAsciiMessage ("There are 2 items, we dont allow pass through"); //debug msg
                 return false;
                }
            }
   
            }
           
            return true;
            }
 
Code:
public override bool OnMoveOver( Mobile m )
{
    if ( m is PlayerMobile && this.Amount > 1 )
        return false;

    return true;
}
 
Code:
public override bool OnMoveOver( Mobile m )
{
    if ( m is PlayerMobile && this.Amount > 1 )
        return false;

    return true;
}

Let me change the height to 0 and try your code, thnks!
[doublepost=1544368501][/doublepost]Hmm nothing, they dont actually stack..

ive added
Code:
this.Stackable = true;

when i try to lift it just drags one, the amount change gump doesnt show up

but they actually dont stack. this is from fiddler:


Name: gift box
Graphic: 0x232A
Height/Capacity: 0
Weight: 1
Animation: 0
Quality/Layer/Light: 0
Quantity: 0
Hue: 0
StackingOffset/Unk4: 0
Flags: PartialHue, Container


2items.png

those are 2 items upon each other, it doesnt block player

EDIT: ahhh i think i should add the Generic flag on uofiddler
 
Last edited:
Ahhh now its working! blocks player movement.

If i drop 1 gift box into another they dont stack, why?

Added this so since its a container they dont go inside the other giftbox

Code:
 public override bool OnDragDrop( Mobile from, Item dropped )
        {
            if(dropped is GiftBox)
            {
                return false;  
            }
            else
            {
               return base.OnDragDrop(from,dropped);
            }
        }
 
Ah ok thank you!

it is possible to make the item block those green lines path?

blocking.png

like make the item width bigger?
 
Back