is there mouse hold left click function?

Started by left, Sun 19/12/2004 14:50:23

Previous topic - Next topic

left

hello, i hope this in the right place.

i want to create an interface similar to that of Lucas arts game "Full throttle". In which if you left click on anything you walk to that spot but if you hold lift click down over an object it comes up with
a GUI with the options for that object e.g. use, look etc. I have figured out how to hae the GUI come up at the mouse co-ordinates but i can't figure out the rest.

thanks in advance  :)

Ishmael

For first aid:

if (IsButtonDown(LEFT) == 1) {
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

Radiant

In execute_always, put something like this:

Code: ags

/// put 'int holddown = 0;' at the top of your global script file
if (IsButtonDown (LEFT) && IsGUIOn (THINGY) == 0) {
   holddown ++;
   if (holddown >= 40) {
        holddown = 0;
       GUIOn (THINGY);
        // set GUI position to mouse pos
    }
}


SMF spam blocked by CleanTalk