View Single Post
Old 04-17-2008, 05:01 PM   #1 (permalink)
IceColdFish
Lurker
 
Join Date: Mar 2008
Posts: 5
Question ContextMenuEntry Problems, can anyone help?

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;
		}
Anyone understand what I'm on about - or better yet can help?
IceColdFish is offline   Reply With Quote