Jump to content
  • 0

Removing the cancel button...


Peopleperson49

Question


  • Group:  Members
  • Topic Count:  218
  • Topics Per Day:  0.05
  • Content Count:  1180
  • Reputation:   141
  • Joined:  01/27/12
  • Last Seen:  

When you use a script that uses the menu or switch function, is there a way to get rid of the cancel button from appearing in the dialog box options? I see a lot of scripts that have options that are scripted to say something like: Yes, No, and Nevermind. Sometimes Nevermind could actually be used to give an item back if you choose not to carry out the rest of the script. For example, a useable item that buffs you. Once you click it it disappears and starts a script that gives you have the option to use it or not. If you choose not to then you get the item back and the script ends. However, if the player clicks the cancel button in the corner instead of going to Nevermind the scripts just ends and they don't get the item back at all. There might even be a command that doesn't put the cancel button.

Peopleperson49

  • Upvote 2
Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

use prompt instead of select

*prompt("<option>"{,"<option>",...})

example :

switch( prompt("Menu 1:Menu 2") ){
Case 1:
 mes "You selected Menu 1";
 break;
Case 2:
 mes "You selected Menu 2";
 break;
Case 255:
 mes "You clicked the CANCEL button.";
 break;
}
close;

  • Upvote 2
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  218
  • Topics Per Day:  0.05
  • Content Count:  1180
  • Reputation:   141
  • Joined:  01/27/12
  • Last Seen:  

Thanks that helps alot. The cancel button was causing problems with some of my players that are "slower" to catch on!

Peopleperson49

  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...