im mixing two objects with this code:
function iPilas_UseInv()
{
if (player.ActiveInventory == iPilas)
{
player.Say("Doesnt make sense to use this item on itself.");
}
if (player.ActiveInventory == iCtrlnopilas)
{
player.LoseInventory(iCtrlnopilas);
player.LoseInventory(iPilas);
player.AddInventory(iCtrluni);
player.Say("Ok the control should be functional now.");
if(mouse.Mode != eModeWalkto) //this attempt doesnt work
{
mouse.Mode = eModeLookat;
}
}
The problem is when i mixed them, after the player make that action, the two objects leave and the new one appears, but:
1:After that the mouse cursor change to Walkto, no matter what, even if i was on look at mode before
Could i disable the walk to while the player is on the menu?
What exactly are you trying to achieve after 'mixing the objects'? ..cursor wise
Well is not a big problem, just that after i mixed the two objects the mouse cursor changes for the walking cursor, and in the menue the walking cursor is not used, so im trying this not to happen.
Something like this may help. i believe going back to walkto is default.
This is one way.
After combining inv items return to Lookat:
function on_event(EventType event, int data) //Locate this function in global and add
{
if(event == eEventAddInventory && mouse.Mode == eModeWalkto)
{
mouse.Mode = eModeLookat;
mouse.UseModeGraphic(eModeLookat);
}
}
try it...
Sorry guys it was a stupid mistake from my part,
this code is working now:
if(mouse.Mode == eModeWalkto)
{
mouse.Mode = eModeLookat;
}
the problem was that i had this: != instead of this ==
really stupid mistake thanks for all the help. and sorry for the stupid question.