i want to make it were when u connect yourself to the cannons there is a range were u have to be short distance from the cannon. the bug im finding it is were my players are connecting them threw walls and such. anybody got any ideas
public override void OnClick()
{
if (from.InRange(GetWorldLocation(), 1))
{
this.m_weapon.PlaceWeapon(this.m_from, this.m_from.Location, this.m_from.Map);
}
public override void OnClick()
{
if (this.m_from.InRange(GetWorldLocation(), 1))
{
this.m_weapon.PlaceWeapon(this.m_from, this.m_from.Location, this.m_from.Map);
}
Errors:
+ Services/XmlSpawner 2/XmlEngines/XmlSiege/SiegeComponent.cs:
CS0038: Line 316: Cannot access a non-static member of outer type 'Server.It
em' via nested type 'Server.Items.SiegeComponent.SetupEntry'
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
if (weapon.IsDraggable)
{
// does it support dragging?
XmlDrag a = (XmlDrag)XmlAttach.FindAttachment(weapon, typeof(XmlDrag));
if (a != null)
{
// is it currently being dragged?
if (a.DraggedBy != null && !a.DraggedBy.Deleted)
{
list.Add(new ReleaseEntry(from, a));
}
if (!from.InRange(GetWorldLocation(), 1))
{
from.SendMessage( "That is too far away to connect to." );
}
else
{
list.Add(new ConnectEntry(from, a));
}
}
}
We use essential cookies to make this site work, and optional cookies to enhance your experience.