OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: j-man 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
-
believe it or not, the answer is in the tutorial (http://www.ofpec.com/editors/resource_view.php?id=66) 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:
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 ;)