Hi guys,
My problem is how the title says that my playable character starts walking when I hold the left mouse button to open the VerbCoin-GUI(MI 3-Style).
And when the Verbcoin is visible the character stops walking.
It´s only the time when I hold the left mouse button a couple of moments to open the Vercoin.
Can somebody tell me please how I can make the character doesn´t walk when I open the VerbCoin-GUI????
Did you start from the Verb Coin template or did you import the Verb Coin GUI into an existing game?
You've probably got two sets of code to handle the mouse click, one that opens the Verb Coin and one that moves the character. It's hard to help you without knowing what exactly you've done to get to this point.
Quote from: Pumaman on Fri 02/04/2010 16:21:26
Did you start from the Verb Coin template or did you import the Verb Coin GUI into an existing game?
You've probably got two sets of code to handle the mouse click, one that opens the Verb Coin and one that moves the character. It's hard to help you without knowing what exactly you've done to get to this point.
I´ve imported the Verbcoin Script(Module) from the VerbCoin-Template.
if (Mouse.Mode != eModeUseinv && process == false && player.Room != 8){
if (Mouse.IsButtonDown(eMouseLeft) == 1) timer++;
/*LONG CLICK*/
if (timer >= 7) {
if (GetLocationType(mouse.x, mouse.y) != eLocationNothing || item != null){
// if there's a hotspot, inventory item OR an object at the mouse position, THEN pop up the action gui
// this prevents the game from crashing when it doesn't find anything (when it returns a nullpointer)
if (item != null){
//this stuff makes sure you see the right names pop up in your text (@overhotspot@) gui
player.ActiveInventory = item;
location_name = player.ActiveInventory.Name;
player.ActiveInventory = null;
location_is_inv = true;
}
else{
location_is_inv = false;
}
// ok, now activate the gui
gui[verbc_id].SetPosition(guix, guiy); // put the verbcompass on the right spot
gui[verbc_id].BackgroundGraphic = verbgraphic_button0;
gui[verbc_id].Visible = true; // activate
}
clicked=0; //click done
timer=0; //timer reset
}
}
Here you can see that the VerbCoin can only be displayed, when the player holds the left mouse button a little moment long("LONG CLICK").
And my problem is, that when I start such a click my character walks to this position this 7timers long until the game freezes and the Verbcoin is shown.
So I must find a way to keep the character still in the "Short Click"-Section.
There´s a Short-Click section(without timer) in the VerbCoin-Module(from Template) too.
Hope you can imagine it better now. :-\
Like CJ says, you might have two sets of code. Search your Global Script for the 'ProcessClick' funtion and see if that brings anything up.