vektorboson
Member-
Content Count
1009 -
Joined
-
Last visited
-
Medals
Everything posted by vektorboson
-
It's hard to guess what you want, but could you explain what var1, var2, var3 are? Are they controls i.e. Static Text? Perhaps you should post your dialog class (not the whole description.ext! or a picture of your dialog, so I know better what your problem is.
-
String length / parsing strings
vektorboson replied to ConnorKilhairn's topic in OFP : MISSION EDITING & SCRIPTING
Hi Connor, it is not possible (not yet?) to parse OFP strings. But with some workarounds (and I mean real workarounds) it is possible to parse a string from an edit box. This is from a "string library" that I am working on: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE"> #monitor _text = ctrlText STDIN @_text != ctrlText STDIN || !dialog ?!dialog: exit _char = ctrlText STDIN ctrlSetText [STDIN, ""] glBUFFER = glBUFFER + [_char] goto "monitor" <span id='postcolor'> It works like following: It monitors the edit box (STDIN is the idc) and waits for a change. If a change was made, it reads the char (_char) that was typed into the box and pushes it to an array (here glBUFFER). After the char is read, the editbox is immediately cleared (ctrlSetText [sTDIN, ""]) so you can't type in more than one char (actually you can "cheat" by pressing two keys together) So, you get an array of char i.e. ["H", "E", "L", "L", "O"] that you can parse yourself. Length of the string is obviously </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE"> length = count StringArray <span id='postcolor'> You may either implement string manipulation functions yourself, or wait until I release my "library". -
Yes, that must be the fountain that you find on the main place in Lipany on Nogova! That's a really mean trick!
-
I think BIS would have to make a whole new addon package like Resistance that uses new functions (patch) or units/islands, so you may play the missions only with this new addon. A standalone mission pack could be copied without problems.
-
Hi all, thought that this is of interest for some people console screenshot Download it here console.zip It includes one simple console, and a console with history function. Usage is explained in readme
-
Hi all, I've got following problem: I want to create my own p3d-model for some 3D-Dialogs. Well I modelled a simple device with the selection "display" where my dialog shall be drawed on. I created my pbo with config, textures and p3d and put it in addons. I called the addon "vb_device" where "device.p3d" is the device model. I created my dialog ressource with object="\vb_device\device.p3d" and a CT_OBJECT_CONTAINER. Now when I try to create that dialog OFP crashes to the desktop without any detailed message what actually happened. Anyone who tried something similar?
-
Hi all, I've got following problem: I want to create my own p3d-model for some 3D-Dialogs. Well I modelled a simple device with the selection "display" where my dialog shall be drawed on. I created my pbo with config, textures and p3d and put it in addons. I called the addon "vb_device" where "device.p3d" is the device model. I created my dialog ressource with object="\vb_device\device.p3d" and a CT_OBJECT_CONTAINER. Now when I try to create that dialog OFP crashes to the desktop without any detailed message what actually happened. Anyone who tried something similar?
-
Download console for ofp:r
vektorboson replied to vektorboson's topic in OFP : MISSION EDITING & SCRIPTING
This time I have to agree with Gameer_77 There a lot of limitations to styles and controls and I can't tell you all! I'll sometimes have to find out myself. -
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (mfcti @ Oct. 21 2002,13:41)</td></tr><tr><td id="QUOTE">As far as point and click waypoints on the map are concerned, I would love to do it. I originally had a system for that in single player but the naming convention for multiplayer markers is different. I haven't been able to find any documentation on it. If anyone knows it I would like to hear from them.<span id='postcolor'> In this case just use the new onMapSingleClick-command, then you don't have to deal with markers! Btw. very nice done (and good that there is any AI ) greetings, Vektorboson
-
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (mfcti @ Oct. 21 2002,13:41)</td></tr><tr><td id="QUOTE">As far as point and click waypoints on the map are concerned, I would love to do it. I originally had a system for that in single player but the naming convention for multiplayer markers is different. I haven't been able to find any documentation on it. If anyone knows it I would like to hear from them.<span id='postcolor'> In this case just use the new onMapSingleClick-command, then you don't have to deal with markers! Btw. very nice done (and good that there is any AI ) greetings, Vektorboson
-
Download console for ofp:r
vektorboson replied to vektorboson's topic in OFP : MISSION EDITING & SCRIPTING
He wants to create the buttons dynamically and not predefine them in the description.ext. I think the easiest way is to create a listbox where every entry is another action (assign a script with lbSetData). -
Download console for ofp:r
vektorboson replied to vektorboson's topic in OFP : MISSION EDITING & SCRIPTING
I can't tell you about the multiplayer thing, but concerning clickable pictures: You have to add the button after the picture controls in your controls-array: i.e. </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE"> controls[] = { MY_PICTURE, MY_BUTTON} <span id='postcolor'> everything is drawn from left to right, so OFP draws first the picture and then the button. If it would be the other way, you could not click the button. And the text of the button appears if you have defined any (because the picture is drawn first). But there is no way to assign a ST_PICTURE-style to CT_ACTIVETEXT or CT_BUTTON. EDIT: I see you were faster -
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Dschulle @ Oct. 20 2002,16:39)</td></tr><tr><td id="QUOTE">Or do you have to replace the complete config of OFP?<span id='postcolor'> Na, the dialogs are defined in the resource.bin, so you have either to replace the resource.bin or create a mod-directory with your custom resource.bin
-
Creating p3d-models for dialogs
vektorboson replied to vektorboson's topic in OFP : OXYGEN BEGINNERS
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Dschulle @ Oct. 20 2002,16:39)</td></tr><tr><td id="QUOTE">Or do you have to replace the complete config of OFP?<span id='postcolor'> Na, the dialogs are defined in the resource.bin, so you have either to replace the resource.bin or create a mod-directory with your custom resource.bin -
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Kegetys @ Oct. 20 2002,16:18)</td></tr><tr><td id="QUOTE">Heh, I made a palm too yesterday: http://koti.mbnet.fi/kegetys/flashpoint/screenshots/palm2.jpg http://koti.mbnet.fi/kegetys/flashpoint/screenshots/palm6.jpg<span id='postcolor'> two people, same idea
-
Creating p3d-models for dialogs
vektorboson replied to vektorboson's topic in OFP : OXYGEN BEGINNERS
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Kegetys @ Oct. 20 2002,16:18)</td></tr><tr><td id="QUOTE">Heh, I made a palm too yesterday: http://koti.mbnet.fi/kegetys/flashpoint/screenshots/palm2.jpg http://koti.mbnet.fi/kegetys/flashpoint/screenshots/palm6.jpg<span id='postcolor'> two people, same idea -
Thanks, but I don't think that that was good work, but perhaps this could be good work: Soon to be released
-
Creating p3d-models for dialogs
vektorboson replied to vektorboson's topic in OFP : OXYGEN BEGINNERS
Thanks, but I don't think that that was good work, but perhaps this could be good work: Soon to be released -
Creating p3d-models for dialogs
vektorboson replied to vektorboson's topic in OFP : OXYGEN BEGINNERS
OK, now I got it, look just the image above! I did as Dschulle told me, and had to make a quad of all 4 points, then it worked. Thanks to all and especially Dschulle! -
OK, now I got it, look just the image above! I did as Dschulle told me, and had to make a quad of all 4 points, then it worked. Thanks to all and especially Dschulle!
-
@uiox because one time it's an array of array [_pos] and the other it's just an array (_pos) [_pos] = [ [_x, _y, _z] ] (_pos) = [_x, _y, _z]
-
Move to next wp at a certain hour
vektorboson replied to iNeo's topic in OFP : MISSION EDITING & SCRIPTING
Condition </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE"> daytime > 20 <span id='postcolor'> for 20:00 daytime returns hours of day. So 17:30 would be 17.5 a.s.o. -
Yeah, and for even more hardcore-scripters there is preprocessFile instead of loadFile! You may define your own C-like macros in your SQF-files. I've got a sample function pos2grid which converts ofp-position vector [x,y,z] to grid position "Ea64". create a test.sqs with following content: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _gridpos = (getpos player) call preprocessFile "pos2grid.sqf" hint format ["%1", _gridpos] <span id='postcolor'> And create pos2grid.sqf: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE"> #define DIV(_X, _Y) ((_X / _Y) - (_X / _Y) % 1) #define MOD(_X, _Y) ((_X % _Y) - (_X % _Y) % 1) private ["_a", "_b", "_result", "_big", "_small", "_num", "_g1", "_g2", "_g3", "_g4"]; _a = _this select 0; _b = _this select 1; _big  = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J"]; _small = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j"]; _num  = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]; _g1 = DIV(_a, 1280); _g2 = DIV( MOD(_a, 1280), 128); _g3 = DIV(_b, 1280); _g4 = DIV( MOD(_b, 1280), 128); _result = format ["%1%2%3%4", _big select _g1, _small select _g2, _num select _g3, _num select _g4]; _result <span id='postcolor'> You see that even nested macros are allowed! Now place some trigger and execute test.sqs! Now the gridpos of your player should be displayed!
-
Converting string value to object name!
vektorboson replied to The_Captain's topic in OFP : MISSION EDITING & SCRIPTING
Thanks for the hints Suma! The Call.command was something I was waiting for! -
Converting string value to object name!
vektorboson replied to The_Captain's topic in OFP : MISSION EDITING & SCRIPTING
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _sel = lbCurSel _idc _obj = lbData [_idc, _sel] _com = format ["tmp = %1", _obj] _com foreach [0] _yourObject = tmp <span id='postcolor'> As soon as patch 1.85 is out you may change tmp to _tmp so there is no global variable problem.