Jump to content
Sign in to follow this  
maruk

New editing options in resistance

Recommended Posts

*bump* can't let this tread get left behind smile.gif

RED

Share this post


Link to post
Share on other sites

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

closeDialog 821151551 does not exit the dialog sad.gif

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

</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 sad.gif

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? confused.gif

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

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

Closedialog 0  tounge.gif  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. confused.gif

wow.gif PEACE

Share this post


Link to post
Share on other sites

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 smile.gif

Share this post


Link to post
Share on other sites

wow.gif7--></span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (GAMEER_77 @ Aug. 18 2002,23wow.gif7)</td></tr><tr><td id="QUOTE">Hey bigpoppa/vektorboson. Am i right?  wow.gif

tounge.gif 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

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. smile.gif

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. wow.gif

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. confused.gif Ah well you would know wink.gif

See yaz Bigpoppa!

tounge.gif PEACE

Share this post


Link to post
Share on other sites

</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

Damn you Uiox mad.gif You beat me to the post! I just done the same thing, with an albiet simpler script. sad.gif

Ooh well the important thing is Bigpoppa's got his scipt. wink.gif

tounge.gif PEACE

Share this post


Link to post
Share on other sites

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

wow.gif Doh! Oh well...15 minutes of my last day of summer hols and bigpoppa does it in one! sad.gif

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$$.

tounge.gif PEACE

Share this post


Link to post
Share on other sites

</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! smile.gif

Share this post


Link to post
Share on other sites

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? confused.gif

tounge.gif PEACE

Share this post


Link to post
Share on other sites

</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?  confused.gif

tounge.gif PEACE<span id='postcolor'>

BIS already stated that CT_SLIDER and companions are not implemented fully yet (next patch probably). wink.gif

Share this post


Link to post
Share on other sites

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

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! smile.gif

tounge.gif PEACE

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×