I need a script for show the inventory when...

Started by Tutano, Tue 16/03/2004 04:03:48

Previous topic - Next topic

Tutano

How I can make the inventory gui appear when I clik the right-buttom of the mouse???

Scummbuddy

#1
IsButtonDown
IsButtonDown ( BUTTON )

Tests whether the user has the specified mouse button down. BUTTON is either LEFT or RIGHT. Return 1 if the button is currently pressed, 0 if not. This could be used to test the length of a mouse click and similar effects.
Example:

int timer=0;
if (IsButtonDown(RIGHT)==1)
  { if (timer==40)
       {Display ("You pressed the right button for 1 sec");
        timer=0; }      
    else  timer++; }      

will display the message if the player presses the right button for 1 sec.
See Also: IsKeyPressed

-------------
taken from the manual.

take out the part about the timer and use...
------------------------
GUIOn
GUIOn (int gui_number)

Turns GUI number GUI_NUMBER on and displays it on the screen. This can be used to display a previously turned off GUI, or to bring up a special interface like an inventory window.
If the specified GUI is a script-only GUI (set to "On script command" in the editor), then the game will be paused while the interface is displayed, and you should use GUIOff as a reaction to a button click on the GUI to remove it.

Example:

GUIOn(2);

will turn GUI 2 on.
NOTE: This function used to be called InterfaceOn but has now been renamed to avoid confusion.

See Also: GUIOff
- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

Tutano

Thankyou... I will try this tomorrow cuz here is 3:00 am and I'm very tired... then tomorrow I back to say if it work. ;D

Tutano

Oh.. I try this but it doesn't work.... But... in the global script I added the script GUION where is talking about the mouse click and it work very welll.....
But... Thakyou, one more time...

SMF spam blocked by CleanTalk