dr_eyeball
Member-
Content Count
625 -
Joined
-
Last visited
-
Medals
-
Medals
Everything posted by dr_eyeball
-
Dialog Template, plus Standard Dialogs
dr_eyeball replied to dr_eyeball's topic in ARMA - MISSION EDITING & SCRIPTING
Note: this problem applies to ArmA in general, not just for these menus. (Eg: setVehicleInit and 'call compile format' require these techniques too) You forgot to mention what type your variable is and it's purpose. All global variables will work without problem. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> [ ["Item", "Option 1"], ["Action", "nul=[globalVar] execVM 'script.sqf';"] ], Objects, however, will require special handling. With player objects, the simplest solution is to set a variable name of each player. (Eg: soldierWest1, etc) <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> [ ["Item", "Option 1"], ["Action", "nul=[soldierWest1] execVM 'script.sqf';"] ], The same with group objects. The simplest solution is to name the group, which is essentially assigning it to a global variable. The other more complicated option is to actually pass any object as a quoted string parameter, then the script can compare the string parameter against a list or trigger list to determine the object. (Warning: However you need to be really careful here and know when certain objects are named differently on clients than on other clients. (Eg: JIP players sometimes have 'REMOTE' in their variable name.) ) <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> [ ["Item", "Option 1"], ["Action", format["nul=['%1'] execVM 'script.sqf';", soldierWest1]] ], Safe way: If you're dealing with a fixed list of objects (eg: player list or groups) then you could simply pass an index/ID number (which represents the object) as a parameter to the script, then let the script determine which object it is from it's index/ID. -
Got metaboli version. Got keys in email but never used them. The 2nd island is called United Sahrani. It's 99% identical to the normal one, but has the border line fences in Paraiso removed, different signage. The Porto island looks tiny at about 2-3 km sq with a big town in the middle. Porto region map - editor Porto topographical map - editor Porto skyline view - west end Porto skyline view - central north town Porto skyline view - central south town Porto skyline view - east end Minaret tower Town streets - with distant Minaret tower MP missions list Douglas DC3 aircraft - exterior Douglas DC3 aircraft - interior cargo Douglas DC3 aircraft - interior rear door Douglas DC3 aircraft - cockpit
-
Damage system when colliding a vehicle
dr_eyeball replied to ZNorQ's topic in ARMA - MISSION EDITING & SCRIPTING
If you test this dammaged event handler, you can see how ArmA treats damage. It's usually very large damage amounts to groups of areas and sometimes it doesn't report specific component damage at all, even though you can see the damaged area (eg: main gun) on your vehicle damage image (eg: top left corner tank image). DamagedVehiclePartName.sqf: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">// "Dammaged" Event Handler // Desc: Display English names of damaged sections of a vehicle. // Exec: client (or server) - local to driver of vehicle // Usage: nul=this addEventHandler ['dammaged', {_this execVM 'DamagedVehiclePartName.sqf'} ]; //----------------------------------------------------------------------------- // params _damagedObject = _this select 0; _damagedArea = _this select 1; _damageLevel = _this select 2; _driver = driver _damagedObject; //----------------------------------------------------------------------------- fn_MapDamagedAreaName = { _damagedArea = _this select 0; _Area = "?"; switch (_damagedArea) do { case "karoserie": { _Area = "body" }; case "palivo": { _Area = "fuel tank" }; case "motor": { _Area = "engine" }; case "zbran": { _Area = "main gun" }; case "telo": { _Area = "hull" }; case "vez": { _Area = "turret" }; case "l svetlo": { _Area = "left panel" }; case "p svetlo": { _Area = "right panel" }; case "light_1_1": { _Area = "left panel" }; case "light_1_2": { _Area = "right panel" }; case "sklo predni l": { _Area = "left glass" }; case "sklo predni p": { _Area = "right glass" }; case "pas_l": { _Area = "left track" }; case "pas_p": { _Area = "right track" }; case "levy predni tlumic": { _Area = "left front wheel" }; case "pravy predni tlumic": { _Area = "right front wheel" }; case "levy dalsi tlumic": { _Area = "left front middle wheel" }; // 4 wheels per side case "pravy dalsi tlumic": { _Area = "right front middle wheel" }; case "levy prostredni tlumic": { _Area = "left rear middle wheel" }; case "pravy prostredni tlumic": { _Area = "right rear middle wheel" }; case "levy zadni tlumic": { _Area = "left rear wheel" }; case "pravy zadni tlumic": { _Area = "right rear wheel" }; default { _Area = _damagedArea }; }; _Area; }; //----------------------------------------------------------------------------- _damagedAreaDesc = [_damagedArea] call fn_MapDamagedAreaName; _Msg = format["%1 damaged! (%2%3)", //typeOf _damagedObject, _damagedAreaDesc, round(_damageLevel*100), '%']; /* { [_x, _Msg] call fn_vehicleChat; } forEach (crew _damagedObject); */ player sideChat _Msg; // adjust this for your own setup -
If you do "fully" back it, then don't forget to add a vote for it on the bug tracker...
-
#include directive is very limited in what it can include. It can only include files which are in the same folder or a sub-folder from it's current folder. Unfortunately, it cannot include files:<ul>[*]relative to the root folder, unless the script is already in the root folder [*]which is in a different branch of the mission (like execVM can). A request to fix this limitation is on the bug tracker as 0002793: Allow #include to support mission root relative paths So <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#include "myfolder\myvars.hpp" would work from file description.ext, but not from subFolderB\fileB.hpp
-
That's awesome work simba and others. Hope to try out your buildings and structures sometime. Start a thread as soon as you've got more to show. I think this was djfrogstar's Iraq <span style='color:maroon'>TCW object's</span> project thread and the now the newest <span style='color:maroon'>Armaholic images</span>. It still has a heap of image links in the first few pages. (It looks like he has become unregistered here and moved to TCW) Some of my favourite previews of TCW's work: untextured objects textured objects balcony view mosque tcw camp Buildings and structures object models projects are sorely lacking at the moment, so hoping to see more soon.
-
I don't think he's talking about a script, he's talking about description.ext. Check out BIKI Description.ext. It shows multiple class definitions and single line options.
-
Controls - I just don't get it..
dr_eyeball replied to ZNorQ's topic in ARMA - MISSION EDITING & SCRIPTING
Question A: Like vova_fox said, createDialog needs to be called first. Question B: If it ever says 'expected control', it needs a control not an IDC number. So use: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_IDD_MyDialog = 999; // whatever IDD number you used in class _display = findDisplay _IDD_MyDialog; _IDC = 102; _ctrl = _display displayCtrl _IDC; _ctrl lbAdd "text"; -
Structured Text - colored images I doubt the 'color' property of the 'image' tag is supported. Only the text allows color changes. See parseText where Mondkalb & Spinor have listed their findings in the Notes section. I would imagine you are limited to just using: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">"<img image='galka.paa'/>"; createDisplay It depends on what 'RscObserver' is. Is it a dialog or a resource? If it's a dialog, you can use the command 'createDialog' instead. If it's a resource, you might be better off using a command like <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> cutRsc ["RscObserver","plain", 1]; or titleRsc ["RscObserver","plain", 1]; // depends on how the resource class title is declared
-
Dialog Template, plus Standard Dialogs
dr_eyeball replied to dr_eyeball's topic in ARMA - MISSION EDITING & SCRIPTING
1. The code to execute gets added to a "<span style='color:red'>Action</span>" type array. See red code in example below. 2. Displaying a <span style='color:blue'>variable</span> (presumably while the menu is open). A simple trick to display a variable called 'player1money', would be to format the variable into the menu's title. See blue code in example below. (To properly display a variable in a custom dialog would require a fair bit of effort and would probably require my updated popup menu dialog, which allows you to embed the PUM into other dialogs, plus other changes.) Feel free to PM me or send me a pbo file to check, if you have further problems. -
Advance & Secure gametype templates
dr_eyeball replied to Rambo-16AAB's topic in ARMA - USER MISSIONS
This is great work guys. Enlarge screenshot <span style='color:blue'>Attack & Defend markers</span> I tried your Purgatory mission (based in Paraiso - see map above) and found the arrows and markers very misleading as far as knowing which sectors to defend and which sectors to attack, given that it seems to use a 2:g4:2 type flag capture sequence, with the g4 representing a group of 4 flags (and the 2 representing 2 normal sequential flags). Have you considered using Project Reality mod's latests representation of what to attack/defend? It works really well over previous implementations. It uses Yellow D and Red A markers to represent the CP's you must DEFEND and ATTACK, which obviously dynamically change throughout the match. This is straight forward when flags are captured in order, having a single Defend marker and a single Attack marker. But when you start capturing grouped flags, then the real benefit of using the D and A markers become apparent. You could have:<ul>[*]1 defend, 4 attack markers [*]1 defend, 3 attack markers [*]2 defend, 2 attack markers [*]3 defend, 1 attack markers [*]4 defend, 1 attack markers, etc It also emphasizes the need to defend. Small note: I think the markers are way too big (marker text, flag regions), too thick/big (arrows) & too numerous (base perimeter). -
I would like to know how to do this too. I presume you need this for a MP mission. My similar situation is getting a Spawn Dialog to appear at the start of a MP mission, to allow the player to select where they should start. I didn't think there would be anything difficult about showing a dialog at the start, but was proven wrong. I'm guessing the problem is due to a clash between the briefing/map dialog appearing at the end of your init.sqf execution, resulting in any created dialogs being ignored. Somehow, I figure, you need to be able to detect when the briefing/map dialog has been closed (or some similar event).
-
first user Island for ArmA
dr_eyeball replied to RN Malboeuf's topic in ARMA - ADDONS & MODS: COMPLETE
Very nice. It's needs a little adjustment. My chopper slid into the lake and blew it up. Destroyed lake image -
The island editing forum is at ARMA : MAP EDITING (VISITOR 3). You'll get more support there.
-
The island editing forum is at ARMA : MAP EDITING (VISITOR 3). You'll get more support there.
-
Problem Repeated ArmA start-ups when working on a particular project/mission in the editor. Suggested solution Provide Startup Parameters to: - load the editor (eg: "-editor" param), or - load a particular mission into the editor (eg: "-mission=MyCTI.Sara" param) Benefit Bypassing unnecessary heavily repeated editor start-up steps.
-
Get Unit Icon From A Script?
dr_eyeball replied to ColonelSandersLite's topic in ARMA - MISSION EDITING & SCRIPTING
No, they're just standard commands which you need to become familiar with. They're basically used for accessing all the lovely internal data info. Eg: map town names, weapon names, weapon icons, weapon ammo types, images, etc. If you're worried about reliability and safe use, then add some checks. Eg: In the example below, it checks isClass and isText to validate it before accessing it. fn_GetDisplayName.sqf <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">// Desc: Get config display name of object type. Result: string private["_ObjType", "_dispName", "_classPath", "_class"]; _ObjType = _this select 0; // eg: typeOf obj _dispName = _ObjType; _classPath = configFile >> "cfgVehicles" >> _ObjType; if (isClass _classPath) then { _class = _classPath >> "displayName"; if (isText _class) then { _dispName = getText _class }; }; _dispName; -
That wiki topic is not about keyboard keys, it's about mission unlock keys. I raised a similar question here recently about catching/blocking escape key, but there didn't seem to be a clean solution.
-
<span style='color:blue'>Problem</span> See screenshot depicting a mission with many many large waypoints making it very messy. It makes it: - hard to select what you want and - hard to see which one you've selected and - hard to see which chain (group) of waypoints you've selected, since highlight color is a shade of black (Not sure if this is similar to ArmaVidz's suggestion?) Suggested solution - Highlight the selected chain (group) of waypoints in a bright color (eg: blue or red), not a shade of black like it does now - Provide the ability to totally hide all waypoints on the map while not in F4 Waypoints mode, exactly like it does with F6 Markers mode. - Provide ability to only display a portion of the waypoints (a selection via a drag box) or as a minimum, option to hide all waypoints except selected chain of waypoints. Benefit proper display of current waypoint (chain) selection ------------------------- <span style='color:blue'>Problems</span> Open up access to arma.rpt file and it's contents: - 1. Add a time stamp (and maybe date stamp) to arma.rpt. - 2. Add the relevant script file name (if applicable). - 3. Either make arma.rpt viewable (non-locked file) while mission is running or - 4. make arma.rpt file loadable via loadfile for display in (user developed) debug output dialog (inside mission) - 5. enable debugLog in retail version Suggested solution - 1. & 2. Eg: if current time is 4:15:07.12 pm, show: 161507 init.sqf: The error message... - 3. use read-only shared file locking, rather than both read/write deny file locking - 4. provide a function which returns a pathname to arma.rpt as configured by server/system - 5. just enable debugLog command Benefit easily accessible, time trackable and informative error messages ------------------------- <span style='color:blue'>Problem</span> For very large rectange/ellipse markers, currently it's almost impossible to find it's centre to modify it's properties. Suggested solution draw a centre dot or preferably a radius line on the marker to any edge, so that you can click on it to select it Benefit usable marker property editing ------------------------- <span style='color:blue'>Problem</span> Defining an invalid class/typo for dialogs causes ArmA to exit program. Suggested solution Display the error message and allow ArmA to continue running. If error is a threat to saving the mission, then disable the Save button until mission is reloaded. Benefit Saves having to load ArmA dozens of time to solve non-obvious typo's in description.ext and #include files. ------------------------- <span style='color:blue'>Problem</span> Accidently dragging the wrong object/waypoint/marker, which was meticulously aligned is a problem. (See first image for complicated example.) Suggested solution Provide an undo last move/drag option. Benefit Saves having to reload mission to undo last accidental drag
-
I think that example was OFP code. For SQS, try: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">onMapSingleClick ' "eart" setMarkerPos _pos; ewayposx = (_pos select 0); ewayposy=(_pos select 1) ' Note the single quotes allow embedding double quotes inside, or you could have used paired double quotes.
-
Spawning AI in SP missions on a trigger?
dr_eyeball replied to wokstation's topic in ARMA - MISSION EDITING & SCRIPTING
There's a little bit of info about Condition_of_Presence here. It's probably only checked upon creation, but you could easily test that yourself. Set it to false during the mission and see what happens. -
Dialog Template, plus Standard Dialogs
dr_eyeball replied to dr_eyeball's topic in ARMA - MISSION EDITING & SCRIPTING
The project is 100% MP compatible, because all dialogs are executed client side only. The server plays no role in it. There is no MP dependent code in this. The only side-effect you may be causing is if you create a dialog from a broadcast script execution and don't check the caller. Eg: If you create a dialog from a Alpha radio command (which is broadcast), it will create & display the dialog on all clients simultaneously. So you need to pass in something like a _caller param's to know who instigated the call and exit if the player is not the caller. In your case, you would further check whether the caller is a leader too. These are just normal MP techniques. Send me PM if you need specific advice. -
I.C.E. - Integrated Command Environment
dr_eyeball replied to dr_eyeball's topic in ARMA - MISSION EDITING & SCRIPTING
@LtCmdrBoon: I've sent you a PM with a rar file instead plus cpbo info. Update: While I'm here, I may as well provide a small update. Sorry for the lack of updates, since I've been busy bloody painting for 7 days. I would have progressed further otherwise. But I've still made some interesting & unexpected changes and progressed about another 5%. 0.115 changes: The changes have primarily focused on CIM (Command Interface module). <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">- started adding TJ72's Airlift scripts for testing - not integrated yet with waypoints and menus - it has a small side effect which removes the ICE action menu. - sped up the PUM display time - probably 2-3 times faster than before (but will improve a bit more later) - CIM - most of the main commands are now starting to become MP compatible on dedicated server - some people were asking about this, so at least now you can start to see how it will behave. - CIM - started adding targets info to "Group Details" box and to Targets menu - CIM - added "Waypoints, bookmarks, group locations" listBox for quick navigation (see image below). - added CIM waypoint menu which operates on the selected group - waypoint menu added/moved to CIM for _all_ groups (not just your group) - it draws (blue diamond) icons for the group's waypoints - it draws (blue) lines joining the waypoints on the map - it draws a (green) line to it's current expected destination - waypoints & bookmarks menus reworked - waypoint menu redone - no longer dependent on "current waypoint" which made it difficult to use for planning - both now show the town name & grid ref coord in the menu - much more meaningful and easier to identify Can't remember any more changes. Screenshot It doesn't look much but getting this part working is a prerequisite to getting some of the other stuff completed. And since BIS haven't provided suitable "Get" commands for all of their great "Set" commands, makes our job even harder requiring us to write MP/multi-group compliant work arounds. (eg: getCurrentWaypoint, getWaypointDescription & others). Download: <a href="http://www.uploadpower.com/en/download.php?id=8349D80F1" target="_blank"> Alpha preview version 0.115 (PBO file)</a> - 31 Aug 2007 This version may be a bit untidy with debugs galore, etc, and not properly tested yet, but I'll provide another quick update in a few days once this current stage is considered complete, stable and tidy. -
Are you talking about a 2-dimensional vector or 3-dimensional vector (like vector dirs)? For flat 2 dimensions, you can try something like this: fnCalcAzimuth.sqf: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">// Desc: Calculate Azimuth between 2 (objects) positions _posA = _this select 0; _posB = _this select 1; _Cx = _posA select 0; _Cy = _posA select 1; _Kx = _posB select 0; _Ky = _posB select 1; _dx = -(_Cx - _Kx); _dy = -(_Cy - _Ky); // Result is: -180 < Azimuth <= 180 _Azimuth = round(_dx atan2 _dy); // adjust to compass angle: 0 <= Azimuth < 360 if (_Azimuth < 0) then { _Azimuth = 360+_Azimuth; }; _Azimuth; // Result
-
Script Release Protocol
dr_eyeball replied to ColonelSandersLite's topic in ARMA - MISSION EDITING & SCRIPTING
If a Completed Scripts forum was set-up, what would you do with the "historic" completed scripts? It could be a problem because the concept is being introduced so late. Would you use the same rules as the Completed Mods forum? - which I think is, once a mod (or script) is completed, the author must request a moderator to move it to the completed forum. Some good scripts would be overlooked because the authors are not around or active anymore. If you were to consider the sticky thread concept, I definitely would not want it to be like a normal sticky thread, which you need to wade through. Instead people would post their link and a moderator would periodically add the link to the first post in a summary list. Not sure whether it could/should be sorted or categorised? Also, perhaps include keywords or a description? Eg: String Library - string handling functions (collaboration by Kronzky, ColonelSandersLite, Kegetys & T_D)