Jump to content

dr_eyeball

Member
  • Content Count

    625
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by dr_eyeball

  1. dr_eyeball

    Mobile respawn vehicle

    I've got 2 mobile respawn vehicles in my I.C.E. project which you can refer to or use. It uses 2 APC's as the respawn vehicles and uses this Respawn Dialog for alternate respawn locations. The vehicle also respawns with the vehicle respawn script (vrs.sqf). Focus on the files: - respawn_player.sqf, & UpdateMobileSpawnMarkers.sqf for the mobile respawn vehicles, plus - Respawn_Dialog.sqf & Respawn_Dialog.hpp for the dialog.
  2. dr_eyeball

    Script Release Protocol

    To elaborate on that, the reason is that there are 2 Addons & Mods forums: one being for completed work, the other being for discussion. The Mission Editing & Scripting forum, unfortunately does not have any "completed work" forum and does not even have a sticky thread to list all of the larger and more complex completed scripts available. Currently I'm using about 30+ different bookmarks of some of the more interesting scripts in this forum just to keep track of them. It's rather disappointing that there is no local listing. And you can't use the logic that scripting is simpler than modding, since some of the mods out there are only 30 lines long (UI mod) compared to some scripting projects which are thousands of lines long. Here are also some of the external sites which are maintaining not only add-ons, but also some of the larger scripts: <ul>[*]Armaholic Scripts - well sorted with versioning [*]Stavanger's ArmA Addons & Scripts - site down atm? [*]OFPEC - unfortunately, it doesn't have many approved ArmA scripts yet, but has many OFP scripts. Edit:It's Beta scipts forums has more. Not aware of any others. Another example is when I spent ages trying to locate the UPS thread (heard of it? ) in the early days. It's title is "The 5-Minute Mission Maker" and it's in the "User Missions" forum. For the really big scripts, I think it would be justified to put it in the completed work forum and have the forum renamed to include scripts or else set-up a sticky here locally.
  3. dr_eyeball

    Prevent Esc key closing dialog

    Read the entire first post, before replying. Nobody is trying to disable Esc key solely for the purpose of preventing closing dialogs. When 2 dialogs are nested into 1, you sometimes want to detect that Esc has been pressed in order to close your sub-dialog and leave the pseudo parent dialog open. Is that so unreasonable? You then press Esc again to close the pseudo parent dialog.
  4. Thanks for the support guys. Next update should have a portion of it functioning in MP properly on dedicated server (at least CIM so far and maybe TR&AM). @CrashDome: Spot on. I totally agree with you. If it can't be modular and you can't replace the UI, then it is destined to fail. Hopefully, I believe, it will meet those requirements since that's part of the design. Anything that was activated via a PUM item (which is the majority of it), should be able to be directly transfered into an Action menu item as is. (It might not auto work with Radio menus, since that auto broadcasts and might cause duplication.) The whole idea behind the PUM system was that I was running out of room to add actions in a reasonable usable manner to the existing Radio menus and Action menus. Given that incorporating I.C.E. into any mission would generally require you to delete half of the non-relevant functionality (eg: MP only, AI only, realism only, etc), it should then be likely that the remaining required functionality could be inserted into a smaller custom dialog, Radio menus or Action menus a lot easier than with the full demo system, since there will be less options. You'll also notice there are sometimes 2 UI versions of each system. Eg: 1. TR&AM (Transport Request) 2. CIM (Commanding Interface) Each of these systems can be used either via PUM's only simulating radio comm's, or via their specialised dialog simulating electronic devices, like MFD's & GPS positioning. Since the PUM concept can be transferred to any other UI concept, it should show that it's not tied to any UI system. So it's good to hear these concerns to ensure critical aspects like these are not overlooked. @TJ72: So far, I've been using the Dynamic Transportation Project as a place-holder to demonstrate the transport requirements but which are limited to SP only. (I asked sickboy to release his MP converted version, but he hasn't replied yet.) As far as I understand, Airlift scripts should be: - MP capable, - allow multiple transport vehicles to respond to separate requests, - allow departing/incoming vectors. This would be ideal. The issues I'm having are: (note: some of these may well be caused by my own misusage.) - two gunner positions requirement - the map clicking seems to be timer based, which is a problem - once it's selected, it should stay - it doesn't work for deployment/insertion - it seems to sometimes delete the wrong actions - SQS syntax, making further enhancements difficult - I might need to convert it over to SQF - setup requirements, especially once combined with a larger project like this - simply need to minimise it - whether it will work with respawned vehicles - knowing all it's usage permutations Extra features I'd require are: - progress status reports - reaction to hostile fire or AA zones (since it will be assumed that the transport pilots are non-combatants and will not risk hostile extractions - to keep it simple and sensible.) But to be honest, I've spent minimal time on AI Transport so far, so there's a long way to go with that aspect. Still trying to integrate it now. I'll PM you about this when I get more into it and find out how it works. I wish there were a lot more of these stand alone scripts with full MP capability. It would reduce this project's time considerably.
  5. dr_eyeball

    Change Unit and Vehicle Names

    You can name groups. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">group LeaderWest22 setGroupId ["Delta", "GroupColor4"]; group ArtyWest1 setGroupId ["Artillery", "GroupColor5"]; As far as having names appear on the map, you'd need a script to control a set of markers with names assigned to them, or some other method.
  6. dr_eyeball

    What is correct use?

    Thorough reply, good summary. I wasn't certain that execVM runs in a separate thread. Does that mean it runs in parallel like spawn does? That might explain the random initialization differences I sometimes get. Anyone know what preprocessFileLineNumbers does? What "lines numbers" are they talking about, or is it simply the same as preprocessFile?
  7. Download available: I have just uploaded alpha preview version 0.102 (temp 30 day link). I've probably broken some things trying to rush this out today, but it should give you an idea of the final goal. Remember it mixes up conflicting features of: SP/MP/AI all together. Expect some updates 1 to 2 times a week or so. (Don't forget to use radio command "Fix map click" to temporarily fix PUM's not appearing on map clicks occasionally.) @Opteryx: I would imagine the CIM is obviously similar to CEX in concept. (Reminds me, I'll add a 'related projects' section.). I have only seen screenshots of CEX. I don't know what it's status is or whether it will be released for ArmA and whether it will support MP this time. CEX includes a RTS-style 'eye in the sky' mode, which CIM will not include. CIM is a quite a small module, making up maybe 25% of this project. Any public release info on CEX would be appreciated. @Myke: Thanks for that scenario. It got me thinking that it's missing some of that structure. Currently, there is no strict CoC structure enforced, but it's limitations actually produce a psuedo CoC: HQ can communicate with group leaders only. Leaders can comm with other group leaders and HQ. Subordinates currently have the same comm powers as group leaders, but the reverse is not always true. Adding a "Group command log" listing all orders issued to your group leader might helps this particular problem. If you preview the project, perhaps you can further suggest a solution for that situation. @ricki: Yes definitely, you will be able to turn off any feature. Especially potentially 'unfair' features like arty, airstrikes, UAV, etc. In the beginning, you can simply turn off a menu item by commenting it out or setting it's enabled status to false. Later I'll add a central location to enable these features. Once the project is fully modularised, you should also be able to delete the folder branch of that module too, to ensure it's not hacked for use and to save space.
  8. Pretty sure WIKI is right. In SQF, you'd often have code with a condition for exiting, like: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">if (!leader player) exitWith { hint "You must be leader to perform this command."; // this will now terminate this script here. }; // otherwise resume with normal execution of script
  9. (continued... boring stuff separated) Potential Problems or Limitations: UI Problems: - Major inconvenience - Currently, the PUM that appears for the command interface often appears for the full PUM and vice-versa, after closing down a particular dialog in certain ways. - PUM sometimes doesn't appear at all because main map or command map OnSingleMapClick gets lost. Use radio "Fix map click" to temporarily fix. - No way to prevent closing a dialog when using Escape key to close a sub-dialog. - Opening any dialog, especially CIM over the main map, causes the cursor to flicker due to the main map crosshair update. So just ensure the main map is closed first. Limitations: - ArmA has no getCurrentWaypoint command to correspond with setCurrentWaypoint. - Might be able to work around this by manually tracking the current waypoint on each leader's client and reporting that to commander or all clients. - Alternatively, might be able to find matching waypoint corresponding to "expectedDestination" result info. - No guaranteed way to track whether AI have gotten stuck after having been given a command. Bugs: - Player Usage - What basic things do I need to know to use this? - activation keys/action menu items - activate I.C.E. PUM/CIM/Debugs via 'T' (or TeamSwitch key) or (temporarily) via Radio - closing dialogs - some windows have a "[X]" close icon - differentiating between AI only features and MP only features - some attempt has been made to differentiate which options only operate for AI or players labelled as (AI) or (MP) respectively - See "Potential Problems" below - Use radio "Fix map click" to temporarily fix PUM's not appearing on map clicks Future Plans: (Removed for now) Project scope, flexibility & performance details. - Currently modules function for either AI only, MP player only or both. Eventually all modules should operate in all environments. - Completing the MP client synchronisation should now be an achievable task. The majority of this is being achieved using processInitCommands, isServer & custom isClient. - Attempting a fairly modular design, enabling options to be either turned off entirely or replaced with someone elses module to perform the equivalent function. - No optimization has yet been done on speeding up the display of PUM's and possibly other areas. - It's also a fully scripted solution, so no mods/add-ons are required. Help Required: - Project is currently limited to myself, so if anyone who wants to get involved, let me know by PM. - developing, finding or incorporating community scripts for the various modules - info on any scripts or projects which overlap with this one - better to use what's available than developing duplicate scripts - advice on making it more modular - tips usually discovered when attempting to incorporate it into another mission - feedback on user functionality or changes required - feedback on bugs and problems - further MP feature testing - player and time restrictions. Defining rules and restrictions on usage, without making subordinates feeling left out by leaving all options only available to group leaders and commanders: eg: - who should be able to use commander option: arty, airdrops, etc? - who should be able to call for reenforcements? - how often should UAV scans be allowed? - how often should vehicles respawn? Similar Projects: - CEX - Command Engine X - DAC - Dynamic AI Creator - SPON scripts (esp. Debug Log) Credits/Script utilised: (some of these scripts may or may not be in final version) - UAV code modified from: KP-CTI by granQ and kungtotte - Dynamic Transportation Project - DTP (SP) code by Jander - TJ72's Airlift scripts (if used?) - Cheetah's GridRefCoords.sqf - Dr Eyeball's Team Status Dialog - Mr-Murray's arillery & other scripts (embedded in other scripts) - Jander's arillery & other scripts (embedded in other scripts) - MapFact Not directly part of I.C.E. but might be required, currently just in test mission: - KaRRiLLioN & norrin - Vehicle respawn script. - Kronzky - Urban patrol script - BAS f - noTeamKill.sqf Full list still being determined. Will complete soon in upcoming version. PM me if it's clear I've missed one. Definitions: Logistics - (military definition) "The science of planning and carrying out the movement and maintenance of forces..." WIP = work in progress. PUM = Pop-up menu. Mission Developer Usage - Incorporating I.C.E. into your missions. Details still to be determined before final version. - copy across I.C.E. folders and files - modify description.ext - modify init.sqf - add any required markers, game logics - set-up groups - add radio/action menu items to activate I.C.E. script Eg: _Action = _soldier addAction ["I.C.E.", "Scripts\ICE\ActivatePopupMenuViaAction.sqf", [ /* params */ ], 0, false, false, "teamSwitch" /* if MP */]; - finish mission as per normal
  10. I don't recommend it, since if you start using #include, it will prematurely terminate the script.
  11. Here, you can use this function to compare any 2 arrays. (eg: [1.5, 2.6, 3.7]) It doesn't handle nested arrays though (eg: [1, 2, [3,4]] ). I had it checking it recursively, but didn't have time to test it, so didn't include that part. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">fn_ArraysAreEqual = { private ["_Array1", "_Array2", "_Result"]; _Array1 = _this select 0; _Array2 = _this select 1; _Result = true; if (count _Array1 != count _Array2) then { _Result = false } else { private ["_i"]; for "_i" from 0 to (count _Array1 - 1) do { if (typeName (_Array1 select _i) == "ARRAY" || typeName (_Array2 select _i) == "ARRAY") then { _Result = false // it doesn't compare nested arrays yet } else { if (_Array1 select _i != _Array2 select _i) then { _Result = false }; }; }; }; _Result; }; Then just call: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_a = [1.5, 2.6, 3.7]; _b = [6.6, 2.6, 3.7]; if ([_a, _b] call fn_ArraysAreEqual) then { bla... };
  12. You cannot compare arrays using "==" or "!=". You need to compare each pair of elements individually. Eg: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_a = (getmarkerpos "wfirepoint"); ? ((_a select 0 == 0) && (_a select 1 == 0)) : goto "exit" or <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_a = (getmarkerpos "wfirepoint"); _b = [0,0]; ? ((_a select 0 == _b select 0) && (_a select 1 == _b select 1)) : goto "exit" Personally, I use a function to compare arrays.
  13. Here's a temp 30 day link: radio_voice_creation_rvc.rar
  14. dr_eyeball

    Speech Synthesis

    Not sure about "good" sites or programs, but some relevant past topics on voice and speech: Best practice sharing - Radio voice creation - covers speech synthesis website and conversion Voice Actor for Hire
  15. dr_eyeball

    Screen shot

    Try FRAPS or XFire or some other 3rd party screen capture utility program. Edit: <s>Correct, there is no built-in screen shot capture functionality.</s> Edit 2: Oops, didn't know you could PrintScreen and paste.
  16. Just add [if (_x isKindOf "Tank")] inside the forEach loop. Then you can probably delete the [_a isKindOf "Tank"] later. I think that's all you wanted. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">if (GL2Plus_SoundFX) then { { if (_x isKindOf "Tank") then { _x AddEventHandler ["Fired", { _a = _this select 0; // Check if FX should be used if (GL2Plus_ShellEffect && _a isKindOf "Tank") then { // Check if group player is big enough, if yes Shell Effects are activated if ("Tank" countType _this > 0) then {call (GL2PlusInternal select 4) exec "GL2Plus\GL2Plus_Effects\Ammo_Range\Shell_Fired.sqs"} }; // Check if FX should be used if (GL2Plus_ShellEffect && _a isKindOf "Tank") then { // Check if group player is big enough, if yes Shell Effects are activated if ("Tank" countType _this > 0) then {_this exec "GL2Plus\GL2Plus_Effects\Tank_Shock\Shock.sqs"} } }] } } forEach vehicles; };
  17. <span style='color:blue'>Solved:</span> Thanks for the info T_D and guys. That reverse matching works great. Is there a function which converts a key code (number) to a config file UI Key "Purpose" Name? Eg: I want to return the (default) key assignment "menuBack" from the key press "BACK SPACE" (or key code 14) via the OnKeyDown UI Event Handler. It's not keyName or keyImage, which both return a quoted string """BACK SPACE""" for key code 14. The addAction command shows the a list of Keys Mappings available for use, so I'm wondering if they can be referenced for use in dialogs? It would make the UI control keys consistent.
  18. It depends on what your initialization field does/calls, but you could try this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_code = "[this] execVM 'initMyVehicle.sqf'; "; _vehicle setVehicleInit _code; processInitCommands; clearVehicleInit _vehicle; Assuming the init code is the same for all. I don't know how to check what the initialization field value was before it's cleared.
  19. dr_eyeball

    Help

    I'm not sure if that's valid inside an init field. It may need to be processed during the init.sqf instead. I have a captive script which has code similar to this (cut down version) which is executed on the server (AI is local to server): InitCaptive.sqf: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_captive = _this select 0; _captive setCaptive true; commandStop _captive; _captive disableAI "MOVE"; // hands behind head pose _captive disableAI "AUTOTARGET"; // forum says: apparently this may help to keep the switchMove pose (?) _captive switchMove "AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon"; // hands behind head I can't be certain all of that code is actually required. P.S. Make your subject topic more descriptive too. "Help" is useless.
  20. I had the same issue recently using vrs.sqf (vehicle respawn script). I fixed it by doing the following. I replaced the old code (which removes the old vehicle & recreates it): <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> deleteVehicle _vcl; _vcl = _type createVehicle _pos; with code to store it's name, delete, recreate, then put back the name: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _name = vehicleVarName _vcl; deleteVehicle _vcl; _vcl = _type createVehicle _pos; if (_name != "") then { _vcl setVehicleVarName _name; call compile format["%1 = _vcl", _name]; // debug if (vehicleVarName _vcl != _name) then { player sideChat "vehicleVarName does not match "+_name } else { player sideChat "vehicleVarName changed "+_name }; }; The tricky part was to include the part: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">call compile format["%1 = _vcl", _name]; I don't see why it should be necessary, since I thought setVehicleVarName would do just that.
  21. dr_eyeball

    unit Spawn ON Water Tower

    Recent thread. If you're stuck, do a search for the keyword "buildingPos" and you'll find a ton of threads, since this topic was heavily discussed early on in the year. This allows you to use the special predefined locations on a object (building) to place a unit (person).
  22. dr_eyeball

    ARMA GDCE 1.00 by shinden

    Looks interesting. I presume it's all single player only. Still checking it out. It looks like it still depends on mods for: MAP_Misc_Logic, MAP_AirWeapons_Logic, MAP_Misc_LogicHit.
  23. dr_eyeball

    Evolution type Recruit AI script

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _Action = _soldier addAction ["I.C.E.", "Scripts\ICE\ActivatePopupMenuViaAction.sqf", [ /* params */ ], 0, false, false, "teamSwitch" ]; In that example the 'T' key works because addAction uses the extended syntax which allows for a 'shortcut' parameter, using 'teamSwitch' in this case. I tried to use a shortcut which would not clash in MP: teamSwitch, teamNext, teamPrev are unused in MP. However, you may have noticed when testing in a SP environment, that sometimes pressing 'T' will activate the original SP teamSwitch operation, so it's only realiable in MP (for that particular shortcut). Need to make a list of what could be suitable shortcut's.
  24. It's not that simple. It needs to be broadcast to all clients. There are various ways of doing it. I think 6thSense uses Network Services Lite library for it, not certain. You may be able to do it with triggers. I've opted to just use a scripted solution for broadcasting chat messages and in fact, any broadcast script. See blue text below. It has solved all of my MP broadcasting requirements. It looks complicated, but who cares, once it's implemented, it becomes as easy as a call like: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[soldierW1, 'Hello'] call fn_GroupChat; mission.sqm <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">...add a gameLogic called GLexec <span style='color:blue'>Scripts\Broadcast\ExecVM.sqf</span> - I highly recommend having a script like this one. <span style='color:red'>This is the key to it all.</span> <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">// Desc: Broadcast a script execution on all clients and server // Exec: anywhere //----------------------------------------------------------------------------- // params _code = _this select 0; // Notes: GLexec is a Game Logic used by this script (rather than using a vehicle) GLexec setVehicleInit _code; processInitCommands; clearVehicleInit GLexec; Scripts\Broadcast\Chat\GroupChat.sqf <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">// Desc: call groupChat on each (group member's) client // Note: _msg cannot contain single double-quote chars. //----------------------------------------------------------------------------- _callerID = _this select 0; // determines relevant group _msg = _this select 1; _code=format["['%1', '%2'] execVM 'Scripts\Broadcast\Chat\GroupChatNotify.sqf'", _callerID, _msg]; nul=[format["%1", _code]] execVM "Scripts\Broadcast\ExecVM.sqf"; Scripts\Broadcast\Chat\GroupChatNotify.sqf <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">// Desc: call groupChat on each (group member's) client // Exec: all clients - broadcast //----------------------------------------------------------------------------- // locality if (!isClient) exitWith {}; // params _callerID = _this select 0; // used to determine group _chatMsg = _this select 1; // convert ID strings to valid objects _playerList = units player; _caller = [_callerID, _playerList] call fn_FindObjectString; if (isNull _caller) exitWith {}; //----------------------------------------------------------------------------- // if (group player == group _caller) then if (player in (units _caller)) then { _caller groupChat _chatMsg; }; Scripts\CommonFunctions.sqf <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">fn_groupChat = compile preprocessFile "Scripts\Broadcast\Chat\GroupChat.sqf"; Scripts\CommonFunctions.sqf <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">fn_FindObjectString = { private ["_result", "_objectString", "_objectsList", "_obj"]; _objectString = _this select 0; // object string = format["%1", object]. Object is often a player or AI _objectsList = _this select 1; // array of objects _result = objNull; { _obj = _x; if (_objectString == format["%1", _obj]) then { _result = _obj; }; } forEach _objectsList; _result; }; There's also code available for: - GlobalChat.sqf - GroupChat.sqf - HQGroupChat.sqf - ProximityChat.sqf - SideChat.sqf - VehicleChat.sqf Handling [WEST, "HQ"] for sideChat becomes a little trickier too.
  25. dr_eyeball

    Evolution type Recruit AI script

    You can't. You would instead need a dialog to do that. The lack of nested radio option menus is the reason I created the popup menus. For simplicities sake, you could have up to 10 Radio options or a long list of Action Menu items. For anything more than that, you need a dialog. If you want to use the actual Recruit AI dialog I created for Evolution (see image), you can grab the original source from here: Download dialog source files ver 1b and modify to suit. But it's too detailed to explain how to incorporate that. Good luck.
×