Tim

Member
Hello i was trying to make my mannquin to be able to use deed outside of the house. But every edit i have made to get the house check method deleted . It still wants to Just target the house . I have narrowed the code down to this


Code:
protected override void OnTarget(Mobile from, object targeted)
  {
  if (targeted is StaticTarget)<<<<<<<<
  {
  Point3D p = new Point3D((IPoint3D)targeted);
  
  {
  DonationMannequin m = (DonationMannequin)Activator.CreateInstance(typeof(DonationMannequin), new object[] { from });
  m.MoveToWorld(p, from.Map);
  m.Direction = Direction.South;
  mDeed.Delete();
  }
  }
  else if (targeted is Item)
  {


How could i change this to target to Ground other then the house ?

something like

if (targeted is NonStaticTarget)

dont work either :(. Any ideas?
 
Hi, you can make a try with LandTarget to select the ground

and something like that to avoid being inside a house :
Code:
 BaseHouse house = BaseHouse.FindHouseAt(from);
            if (house == null)
                return;

You can also param FindHouse something like that:
Code:
 BaseHouse house = BaseHouse.FindHouseAt(p,from.Map,p.Z);
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back