Home   Help Search Login Register  

Author Topic: Run script from dialog  (Read 721 times)

0 Members and 1 Guest are viewing this topic.

j-man

  • Guest
Run script from dialog
« on: 23 May 2005, 08:17:19 »
I've just started using dialogs in my missions. I have a dialog with a list box of missions you can choose to do. I cant figure out how to script things so that when you select a mission from the list and then hit the "select mission" button, a script will run  :P


EDIT: forgot to mention, more options appear in the list at random times
« Last Edit: 23 May 2005, 08:34:43 by j-man »

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:Run script from dialog
« Reply #1 on: 23 May 2005, 09:43:32 »
believe it or not, the answer is in the tutorial you have very likely read by vektorboson. the answer lies in the 'action' part of your class definition.

for example, i have a dialogue which has three choices in a drop down menu. the select button at the bottom has the following action:

Code: [Select]
action = "closeDialog 0;[] exec {satcomm_image.sqs} ";

which closes the dialogue and runs the script. the script contains all the stuff which senses what has been selected in the dialogue. you'll get the hang of it - the tutorial is very well written ;)
« Last Edit: 23 May 2005, 09:44:19 by bedges »