|
||
|
|||||||
| Script Support Get support for modifying RunUO Scripts, or writing your own! |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Lurker
Join Date: Mar 2008
Posts: 5
|
Ok, Im trying to add quite a simple context menu entry.
I want to be able to change the 'Controlled' prop of a custom basecreature from within the OnClick ctor of my custom context menu entry. Problem is it complies saying Server.Mobiles does not contain a defination for... The hue entry here works, but "m_Follow.Controlled = true;" does not, because Controlled is a variable for BaseCreature not Mobile. Code:
public override void OnClick()
{
if ( m_Follow.Deleted || !m_From.CheckAlive() || !m_Follow.CheckAlive() )
return;
m_From.SendMessage("The subject follows you");
m_Follow.Controlled = true;
m_Follow.Hue = 12;
}
|
|
|
|
|
|
#3 (permalink) | |
|
Forum Expert
Join Date: Mar 2004
Location: NorthCentral IL, USA
Age: 34
Posts: 3,848
|
You'd also have to set ControlMaster and probably the Command to something like Command.Follow or something otherwise I think the mobile will still ignore the person.
__________________
Quote:
Just a Simple Staff Tool You can leave me messages. Ernest Gary Gygax - Quote "I would like the world to remember me as the guy who really enjoyed playing games and sharing his knowledge and his fun pastimes with everybody else." |
|
|
|
|
![]() |
| Bookmarks |
| Tags |
| contextmenu, onclick, problem |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|