RED 0 Posted August 13, 2002 *bump* can't let this tread get left behind RED Share this post Link to post Share on other sites
GAMEER_77 0 Posted August 17, 2002 Hey, Im using the EDIT (text box) to let the player decide how far away the artillery should be. But i need the returned value in number format and EDIT returns it in string format. Is there anyway to change this or convert the string into number format. Thanks, 8) PEACE Share this post Link to post Share on other sites
PRiME 1 Posted August 18, 2002 closeDialog 821151551 does not exit the dialog I need a command that will EXIT the dialog and return it to the player. Share this post Link to post Share on other sites
kegetys 2 Posted August 18, 2002 </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (PRiME @ Aug. 18 2002,17:25)</td></tr><tr><td id="QUOTE">closeDialog 821151551 does not exit the dialog I need a command that will EXIT the dialog and return it to the player.<span id='postcolor'> Um... return the dialog to the player? You might want to continue discussion about the spectating script here: http://www.flashpoint1985.com/cgi-bin....9;st=10 Share this post Link to post Share on other sites
PRiME 1 Posted August 18, 2002 I ment return control back to the player as in continue playing were as if I put in that closedialog thing it just closes the options etc and continues running the spectate script following whatever was last selected. Perhaps there can be a option in the script to stop it when a trigger or condition is met? ne1 ideas on how I could do this ? I think that might be the answer im looking for just unsure how to impliment it. Share this post Link to post Share on other sites
GAMEER_77 0 Posted August 18, 2002 Closedialog 0 Â Â maybe the closedialog thing only closes the current Dialog box. Like in the main menu when you click options and another dialog comes up. If you put closedialog 0 you might need another closedialog 0 to close the main menu screen. Maybe this is true and you allready know that though. PEACE Share this post Link to post Share on other sites
vektorboson 8 Posted August 18, 2002 If you want that the camera is destroyed, when the dialog is closed then make something like this: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE"> @(not ctrlVisible _your_idc) camDestroy _your_camera <span id='postcolor'> Here is: _your_idc is a number of one of the visible controls of your dialog _your_camera is the name of your camera Share this post Link to post Share on other sites
GAMEER_77 0 Posted August 18, 2002 Hey bigpoppa/vektorboson. Am i right? PEACE Share this post Link to post Share on other sites
vektorboson 8 Posted August 18, 2002 7--></span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (GAMEER_77 @ Aug. 18 2002,237)</td></tr><tr><td id="QUOTE">Hey bigpoppa/vektorboson. Am i right? Â PEACE<span id='postcolor'> yes, that's right! :-) How did you know? To your CT_EDIT related problem; BIS would have to implement a stringToFloat-function, so it worked. I think you have to wait for the next patch, where BIS hopefully implemented CT_SLIDER and its functions, so you get the value! @Suma or BIS Could you implement some "Events" for dialogs? Something like an "OnChange"-Action for controls. I would like to do some automatic changes, when the player changes the combobox selection. bigpoppa aka vektorboson Share this post Link to post Share on other sites
GAMEER_77 0 Posted August 19, 2002 Ah, you see its because you where the one who made the console script and Bigpoppa was the Thread starter so i figured it must be you. Thanks for your reply on the EDIT Q. I think im going to have to do a + and - kinda thing. It wont be as good as typing it in but itll do.(when i say + and - i mean everytime you click + the distance goes out ,say, 5 metres)Or if BIS get out the patch soon enough ill use the slider. For your onchange thing, could you not use a loop and check if the user has selected a different thing. From Vektorboson's Dialog Tutorial: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _index = lbCurSel idc Returns the current selected item <span id='postcolor'> Now i know this is for getting the item in a combobox/listbox, but surely there must be a way to use this another way. Ah well you would know See yaz Bigpoppa! PEACE Share this post Link to post Share on other sites
uiox 0 Posted August 19, 2002 </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">Could you implement some "Events" for dialogs? Something like an "OnChange"-Action for controls. I would like to do some automatic changes, when the player changes the combobox selection. <span id='postcolor'> You can do this yourself in a loop after install dialog like this: _ok = createDialog "DlgFormation" cancel = false validation = false _DirtyBit = false _CurrentFormation = 1 _i =0 #Installformation _index = lbAdd [104, Arrayformation select _i] lbSetData [104, _index, "104"] ? _i< count Arrayformation : _i = _i +1; goto "Installformation" lbSetCurSel [104, _CurrentFormation] #Loop _CurrentFormation != Â lbCurSel 104 : goto lbData [104, lbCurSel 104] #104 _DirtyBit = true _CurrentFormation = Â lbCurSel 104 Your work goto "loop" ? Â !(cancel) and !(validation) : goto "loop" ; cancel and Ok buttons are simple button with cancel =true in the action field. closedialog 0 ? validation and _dirtybit : goto "store" ? cancel or !(_dirtyBit) : goto "Nostore" #Store Goto "End" #Nostore Goto "End" #End cancel = false validation = false exit Share this post Link to post Share on other sites
GAMEER_77 0 Posted August 19, 2002 Damn you Uiox You beat me to the post! I just done the same thing, with an albiet simpler script. Ooh well the important thing is Bigpoppa's got his scipt. PEACE Share this post Link to post Share on other sites
vektorboson 8 Posted August 19, 2002 I think too, that there is a simplier way. Like this: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _oldsel = lbCurSel _idc @(lbCurSel _idc != _oldsel) <span id='postcolor'> But thanks for that idea, I didn't thought of yet... Share this post Link to post Share on other sites
GAMEER_77 0 Posted August 19, 2002 Doh! Oh well...15 minutes of my last day of summer hols and bigpoppa does it in one! Ah well...Ill try and send you that missions soon vektor, im done with it but the sound and fire is giving me a pain in the a$$. PEACE Share this post Link to post Share on other sites
vektorboson 8 Posted August 20, 2002 Hi all, for all those, who want to make their own dialogs, here you are: Vektorboson's Dialog Tutorial It handles 2D-Controls only, but 3D-Controls are in work! Share this post Link to post Share on other sites
GAMEER_77 0 Posted August 20, 2002 Whats this? Hmm...might take a lookey PEACE Share this post Link to post Share on other sites
Homer Johnston 0 Posted August 30, 2002 </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (bigpoppa @ Aug. 20 2002,13:04)</td></tr><tr><td id="QUOTE">Hi all, for all those, who want to make their own dialogs, here you are: Vektorboson's Dialog Tutorial It handles 2D-Controls only, but 3D-Controls are in work!<span id='postcolor'> thaaaaaaaaaaaaaank yooooooooooou!!! I just began to ignore this topic, then I saw this...! sorry, noone's thanked you yet! Share this post Link to post Share on other sites
GAMEER_77 0 Posted August 31, 2002 The man's a saint! PEACE Share this post Link to post Share on other sites
GAMEER_77 0 Posted September 1, 2002 Did y'all know that all the Dialog menu's in OFP are in the resource file in the BIN directory? Maybe some genious can have a look with a HEX editor or something and see how the slider etc. are done? PEACE Share this post Link to post Share on other sites
vektorboson 8 Posted September 1, 2002 </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (GAMEER_77 @ Sep. 01 2002,21:50)</td></tr><tr><td id="QUOTE">Did y'all know that all the Dialog menu's in OFP are in the resource file in the BIN directory? Maybe some genious can have a look with a HEX editor or something and see how the slider etc. are done? Â PEACE<span id='postcolor'> BIS already stated that CT_SLIDER and companions are not implemented fully yet (next patch probably). Share this post Link to post Share on other sites
GAMEER_77 0 Posted September 1, 2002 Hey man, Awww, ah well. Roll on the patch... PEACE Share this post Link to post Share on other sites
Dschulle 0 Posted September 4, 2002 Just thought about a Str2Float function, not too nice and I don't know how fast, but should solve the problem: Requires the number in the variable Str (e.g. "100") </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _max = 200 _i = 0 #scan  ? Str == format["%1",_i] : goto found  _i = _i +1 ? _i <= _max : goto "scan" hint format["Invalid Number or above %1",_max] exit #found ; Number is _i<span id='postcolor'> Share this post Link to post Share on other sites
GAMEER_77 0 Posted September 5, 2002 What is this "Str2Float function"? PEACE Share this post Link to post Share on other sites
flashtheking 0 Posted September 5, 2002 a function, wich converts a string into a number. Useful for edit- fields Share this post Link to post Share on other sites
GAMEER_77 0 Posted September 5, 2002 Oooh...My question? Sorry, didn't realise...Well One of Bigpoppa's friends at The chain of command helped me out there. Thanks anyways Dschulle! PEACE Share this post Link to post Share on other sites