Jump to content

borg117

Member
  • Content Count

    35
  • Joined

  • Last visited

  • Medals

Everything posted by borg117

  1. Have searched the comref and can only find cursorTarget and laserTarget which are useful, but cursorTarget only returns and unit and not any position. i basically want the 'reticle version' of laserTarget, so for example if i click a menu item (triggering an expression/command) or a action, i have some way of getting the exact position the player is pointing towards, but of course without a laser, just the normal gun aim. I KNOW it is possible because i remember SOM when used in op harvest red (and probably standalone SOM too) comes up with a circle with a cross in the middle and you can select transport and the pos will be transmitted. I have acutally examined those BI missions including the functions that drive SOM and I can't seem to see any reference to how position is captured so i'm taking a guess that maybe it is to do with the menu, with a menu i have i know a little hand appears where you are looking at. If anyone knows how i might capture the position that would be great. (btw i know about screenToWorld, vice versa, and onmapsingleclick, all great, but not what i need for a return of that sacred position.)
  2. borg117

    Grouping and Waypoints

    for sake of dynamics you may want: waitUntil {{!alive _x} count units _grp}; is better than manually entering each vehicle.
  3. borg117

    Grouping and Waypoints

    well selectBestPlace might help for the spawning, give it a search, otherwise a manual way to do it would be stuff like x - 20, so something like this in the spawn array where _convoystart is: [((getPos _convoystart) select 0) - 20, _convoystart, 1] as for the actual problem unless there is small error somewhere in the name, or the error report log is showing anything, i can't think what it could be. try diagnostic with a hint and waypoints command to make sure the waypoint is ok, if incidentaly it is MP then you may want to assign a global variable to _veh2. also you have stated vip2 moveInCargo _veh2; twice over and i'm still not sure whether _grp exists? if not then replace with _veh1 or whatever vehicle you want the leader to be.
  4. can't remember immediately, but isn't createmarkerlocal require a [x,y] position rather than the [x,y,z] that getpos returns. if so maybe try screenToWorld that can convert 3d to 2d.
  5. I can't make much of what the problem is, but essentially you could try this: _veh = vehicle player; if (vehicle player != player) then {player action ["eject", _veh]; player attachTo [prison,[-0.0,-1.5,-0.6]]; removeAllWeapons player;} else {player attachTo [prison,[-0.0,-1.5,-0.6]]; removeAllWeapons player;}; if your playerunit is grouped to the vehicle then by all means use the unAssignVehicle command as well. but this should work, else look at the arma 2 error log and see where the snag is. I'm not sure sleeps can be used within if statements, also be aware of using the 'private' command for any further scripting with if statements. ---------- Post added at 01:37 PM ---------- Previous post was at 01:36 PM ---------- btw be aware that player is recognised by the engine as an entity, better than using the whole list thing to create an assignment.
  6. borg117

    Grouping and Waypoints

    What is _convoystart. if it is a 3-argument, integer-based array with your position then ok, but if it is a logic or marker then you need to use getPos. also i presume that _grp is already established, if not then you would need to do _something = group veh1; and then the joinSilent would be joinSilent _something; otherwise i can't see what is wrong, and if all what i mentioned is ok then there must surely be other code so i'd say post it.
  7. sideChat directSay vehicleChat hroupChat Hate to say it, but you could do with looking at the comref,. has some interesting commands and you know the whole searching rules. meh, like i say, i don't like to hassle. ---------- Post added at 10:27 AM ---------- Previous post was at 10:26 AM ---------- groupChat
  8. addWeaponsPool & addweaponsCargoPool if i remember correctly. I do believe, although BAF campaign seems to be un-pbo-able that saveStatus and loadStatus can be used for third pointer. for fourth pointer i have pondered a similar idea, you could try a few skill detection expressions and save them into a variable and use saveVar and loadVar, seems to work in BIS' campaigns for intel and civillian response. the only other suggestion i can think of the keys and iskeyActive, the only issue is that is permanent, keys can't be deleted. Your last question i think has been explained with the above commands, might do a bit of testing myself over the weekend as i am creating a small addon package where by support options can levelled up to feature more and give some RPG style aspects. unfortunately there doesn't seem to be (and i wish there was) any way of save or storing variables in global campaign sqfs or something along those lines. hope it helps anyway. ---------- Post added at 01:33 PM ---------- Previous post was at 01:21 PM ---------- http://community.bistudio.com/wiki/saveVar http://forums.bistudio.com/showthread.php?128298-Arma-2-OA-1-60-Release-Candidate http://www.ofpec.com/forum/index.php?topic=35580.5;wap2 http://www.ofpec.com/forum/index.php?topic=32243.0;wap2 ---------- Post added at 01:36 PM ---------- Previous post was at 01:33 PM ---------- http://www.armaholic.com/forums.php?m=posts&q=12346
  9. I don't mean to sound odd, but maybe don't create a waypoint, if a waypoint is visible then your as a player, and if so then just don't create it or if you want a net of waypoints or further directions try either: wp1 = groupname addWaypoint [position heli, 0]; wp1 setWaypointType "MOVE"; wp1 setWaypointStatements ["true", "vehTransport land ""Get In"";"]; or have a search for creation of tasks. two links here: http://community.bistudio.com/wiki/Tasks http://community.bistudio.com/wiki/setSimpleTaskDestination if your part of an AI team i doubt there is anyway to remove the waypoint marker outside of manually setting the difficulty setting. Ther is something i have come accross somewhere in a BI mission about setting AI task groups or something along those lines, but not really sure. http://www.arma2.com/comref/comref.html
  10. borg117

    Briefing editing

    /********Diary Records***********/ _log_support = player createDiaryRecord ["Diary", ["Support", localize "STR_support_c01"]]; _log_briefng = player createDiaryRecord ["Diary", ["Briefing", localize "STR_briefing_c01"]]; _log_mission = player createDiaryRecord ["Diary", ["Mission", localize "STR_mission_c01"]]; If you are not using stingtables, then replace 'localize "STR"' with the text you want. To be fair this subject has been discussed and info avaliable very easily, you should search!
  11. http://community.bistudio.com/wiki/BIS_fnc_3Dcredits The actual PROPER example below: infoBoard = ["<img size='2' image='img\myImage.paa'/><br />Some text on the second line", getPos someObject] spawn bis_fnc_3Dcredits; this will create 3d style text around an object, maxium 2 lines i believe, give the function a search if your further interested for colours, sizes etc. hope it helps. makes a nice waypoint idicator anyhow.
  12. The only idea i have is a trial and error approach, see how many players you get, scale mission accordingly and stuff. HOWEVER, my best suggestion is a performance handler, it won't test the mission, which i'm guessing is designed for a large amount of players, but it can adapt the mission performance level, obviously garbage collectors and self-dynamic cleaning scripts can help to tidy things, but maybe this: _v = viewDistance; performanceHandler = [_v] spawn { _v = _this select 0; if (_v < 2800) then {setViewDistance 2800;} else {terminate performanceHandler;}; waitUntil {MAIN_littlebird distance lhd1 > 1400}; setViewDistance _v; exit; }; was ripped out of my mission so pretty crude, but my idea was that there is a function for testing FPS, i know it is used for benchmarks and it returns an FPS, so say we have _fps = call thefpsfunction;, and then say if _fps is lower than a certain number, then reduce view distance by such and such an amount. you get the general idea, it is really only a performance measure, not really a way of testing the capacity. meh, it was worth a try. T_T.
  13. Well mid game module executions is a bit challenging when they are modules that require synchronization. Firstly if you want to enable a UAV without a control terminal then use the UAV backpack, use: unit addBackapack "theclassname"; //you can find the classname through a search, maybe on BI wiki. so that deals with that. On how to implement that mid mission, well i'm not sure if anyone has ideas about syncing backpacks to the module. best thing i can think of is to create another unit exactly the same as the playerunit, position it way out on the map and sync it to the module. then when task 1 completes you could use a mix of setPosATL, getpostATL, deleteVehicle, and switchPlayer to basically delete your playerunit, move the player to the 'other' unit, and position that 'other' unit exactly where the original unit was. It really does depend on the mission, of course there are weapons & team mates to take into account, addWeaponsPool maybe, but overall for a smooth execution an intricate, dynamic script would have to be used to handle the switch. i know it sounds complicated but i can't think of any other ways, execpt maybe if you search through backpacks in static section, see if you can get the UAV backpack, sync it, position it in the editor next to where task 1 completes, and then ask the player to pick that backpack up, with luck, you should be able to access the UAV, not guaranteeing anything. Maybe if anyone can post ideas of Mid-game modules init.
  14. You can make it lower case BUT it requires a description.ext and in that place: class CfgRadio { sounds[] = {}; class gradMission_1 { name = ""; sound[] = {}; title = "What the hell, command didn't mention anything about artillery in the area?"; }; class gradMission_2 { name = ""; sound[] = {}; title = "second lot of text"; }; }; then you would use unit sideRadio "gradMission_1"; and hey presto, you have lower case text as appropiate. if you don't know about description.ext then look at it on the bi wiki and search of course. incidentatly if you are using sound files, you may want to consider the KB method as shown in the sticky, new conversations thread, hell of a lot more complex though.
  15. //This menu is explained later, if you want haven't room in your menu, create a second set ROOT_unitCreateMenu_02 = [ ["Training Interface", false], ["Train: something",[2],"",-5,[["expression","""USMC_soldier"" createUnit [position player, group player];"]],"1","1"], ["Train: another medic",[3],"",-5,[["expression","""USMC_soldier"" createUnit [position player, group player];"]],"1","1"] ]; ROOT_unitCreateMenu_01 = [ ["Training Interface", false], ["Train: Soldier",[2],"",-5,[["expression","""USMC_soldier"" createUnit [position player, group player];"]],"1","1"], ["Train: Medic",[3],"",-5,[["expression","""USMC_soldier"" createUnit [position player, group player];"]],"1","1"], ["Train: Something else",[4],"",-5,[["expression","""classname"" createUnit [position player, group player];"]],"1","1"], ["example of a waypoint",[5],"",-5,[["expression","[grp, 2] setWaypointStatements [""true"", ""hint """"ok""""""]"]],"1","1"], ["More",[6],"#USER:ROOT_unitCreateMenu_02",-5,[["expression",""]],"1","1"] ]; // this is again the code to call for a reminder: showCommandingMenu "#USER:ROOT_unitCreateMenu_01"; Ok, as you can see from the above, this is the author's request built and tested. For strict syntax take note of the numbers as they are listed, 2,3,4,5 etc. Take note that every line should end with a comma except the last line, and take note to how many quotas"" are used. Sometimes (in fact in the sqm also) expressions or commands as they can be known are encapsulated in "" when used in custom built arrays, FSMs and editor-interfaced expressions. however if a command such as createunit contains "" in itself the engine can't distiguish when this and that ends, so the "" must be doubled, that is, to the power of two. notice on the example of the waypoint, it can get crazy, because the hint command/expression is within another command, that is also within an array that allows an expression/command, the Hint needs 4 quotas" each side so the engine can keep track. Also notice on the last menu item i have entered 'More', this is in case anyone wants to break the barrier of 10 items, basically #USER:ROOT_unitCreateMenu_02 has been entered meaning that when you select more, it will auto initiate a second menu, though that second menu must be established first as seen above, the second menu goes before the first menu that activates it. By the way have only just remembered that in the case of a simple createunit command, that just requires """". i think you can do this '' . I have pm'd the author about the thread, one last thing is that expression is the official terminology for command, that is anything that processes or initializes (doesn't return) such as removeAllWeapons or hint or unit create. think of it as the init box of the menu that triggers when you click on it. For the benefit of anyone else who may be thinking of using this to create rpg-style conversations without voice files, and therefore can not use the new KB conversation system, then you could use these menus like this with a few useful commands, clearRadio, commandRadio, sideRadio and directSay. all commands are description.ext based though. hope that has ironed out the creases and brought a MUCH NEEDED explanation on menus. Happy editing.
  16. Ok well if you are indeed talking of dialogs as in controls > dialogs, custom RSC, then that can be quite complicated. as far as i know there is an easy way in which you can create a menu, and each element in that menu to activate a script. So you may want to put this a init.sqf first: infantryMenu_1 = [ ["Squad Interface", false], ["Train Soldier",[2],"",-5,[["expression","create unit command"]],"1","1"], ["Train Medic",[3],"",-5,[["expression","create unit command"]],"1","1"] ]; take note that every line you add, adds a menu item, and that you must change the second element the number. also when you use the create unit command that where "USMC_Soldier_Medic" createUnit [position player, group player]; is you must do ""USMC_Soldier_Medic"" so the engine can process and define. once this is established in the init.sqf, you can use (trigger or whatever) showCommandingMenu. unforutnately i haven't time to explain, so will post again with more info but bassically all this leads up to creating a menu that you can use to select what units you wish. hope it helps. ---------- Post added at 01:43 PM ---------- Previous post was at 12:45 PM ---------- Right, so as i have shown in my last post that is how you create the menu, i must add that notice on the first item, train soldier, at the very end of that line is a comma, yet on the next line there is no comma. For every item you add there should be a comma after it except the last line. In addition remember when using the expression create unit, double the "" syntax. The menu array is incredibly strict on syntax and won't work if all is proper and correct. Now with the init.sqf, if you don't know how to create one then i suggest you search both forums and google, otherwise i can only suggest that you put the entire of the menu array in a unit's init box and that may work. So that's how to create the menu, now how to show it. in a trigger or init box you could put: showCommandingMenu "#USER:infantryMenu_1"; this will show the menu only once though. if you want a persistent menu then type this instead: GUIMenu = [] spawn {while {true} do {sleep 10; showCommandingMenu "#USER:infantryMenu_1";}}; this means that the menu will always show even if exited or you select Train medic item or whatever. So you know now how to create a menu, how to show it, now how to end it if you go for persistent one. basically it's this: terminate GUIMenu; This could be typed in a trigger or in the expression section on the menu where you use create unit, you could add it in there after the create unit command, that way when you train a unit, the menu closes. there should be enough to play around with anyway. A few additional ideas are: BIS_MENU_GroupCommunication = [ [localize "STR_SOM_COMMUNICATIONS", false], ["Train Soldier",[2],"",-5,[["expression","create unit command"]],"1","1"], ["Train Medic",[3],"",-5,[["expression","create unit command"]],"1","1"] ]; this will mean that everything you create is accesible through comms menu (0 > 8). though to use this the SOM module must NOT be placed in the editor. hope it all helps anyway, more organsied than addAction and less complicated than custom dialogs.
  17. btw forgot to mention that bigshotking's way of doing could i believe alllow you to actually place the entire command in a 'while {}' and then execute removecrew.sqf from the init.sqf. that way you scrap the trigger, you just have a baseball and the radius which is all you need and the while can constantly check for you.
  18. well i can't see anything wrong with it and if there are no errors in the error log then i would take a guess that it is to do with 'foreach nearestObjects' be careful that nearest objects is used in two different methods http://community.bistudio.com/wiki/nearestObject and http://community.bistudio.com/wiki/nearestObjects Also take note to the fact that the command can only be used to return a list, so you have two options to try, do: objectList = nearestObjects [_position, ["Man"], _radius]; along with your position and radius assignments and then change the forEach to 'forEach objectList'. OR you could use the idea of keeping with the trigger. i can understand that you may only want infantry units to be deleted, however you could use my idea as a one time check at the end of the wave or adapt a simple forEach command that includes typeOf which i'm not sure would work or not. in my experience you can adapt several commands for the forEach.
  19. you could try this: deleteVehicle (driver enemyunit); i think you can replace 'driver' with other commands such as gunner etc. ---------- Post added at 10:46 AM ---------- Previous post was at 10:43 AM ---------- sorry, also forgot to mention you execute the command for everyone within trigger radius using this: {deleteVehicle (driver _x)} forEach list triggername; make sure your trigger is set to opfor and present and it will delete everyunit (or every driver) in the trigger radius who is opfor and present (alive).
  20. Thanks for that. Should be able to do alot more now. I was a bit over the place with the whole action thing, I think I should maybe search first or post a new thread if necessary. It was in part related to the satchel charge because I wondered just as (assumedly) BI intergrate actions such as the 'plant satchel charge' whether they, as well as normal actions (), could be detected.
  21. Hi Guys, I would like to know if anyone has any ideas about how to condition check the placing of a satchel charge by a player? Is there some command for detecting when a player activates the plant satchel command from his action menu, or if a charge exists in a certain place? the former is would be more useful to me but if there is something for the latter i am happy enough.
  22. Thank you so much, will test it when i get home but I never once thought of that Engima and thanks Kylania for pointing that out. will start to look at the wiki more because I always look at the comref and never thought of comments :)
  23. Ok i've been doing a trial and error with this for some time and with most things i figure it out but not with this. I am creating a heli taxi script via fsm which enables a player to call for heli via onMapSingleClick command, that command creates a set of waypoints which configured, allow the heli to land, pick up, drop off and return to base. It all works brilliantly except that when i call the transport again, (and i have narrowed this problem down i assure you) it doesn't seem to follow the waypoints through. waypoint1 = _grp addwaypoint [_pos, 0]; waypoint1 setwaypointtype "MOVE"; waypoint1 setWaypointStatements ["","doStop _veh; _veh land ""GET IN"""]; this is what the general format of my waypoints are, there are 4 in total, 2 for the pick 2 for the drop off. as i have said they work just fine the first time, but not the second time. the entire FSM is interlaced in various radio chatter and other commands which work fine, i've used hints to test FSM flow, its all fine its just to do with those waypoints. i've localizing 'waypoint1' or replacing it with 'nul', just in case there is a problem with re-iteration. in addition i would note that i do use deletewaypoint as thus: deleteWaypoint [_grp, 0]; deleteWaypoint [_grp, 1]; deleteWaypoint [_grp, 2]; deleteWaypoint [_grp, 3]; Help would very much be appreciated, in my many searches i found this: http://www.kylania.com/ex/?p=47 Which relates slightly to my issue as my procedures are incredibly similar, the difference is, my script relies on 'an already spawned, and undeleted' heli, as opposed to Kylania which is spawned, hence he wouldn't have a problem with reiteration of waypoints.
  24. Sorry about the lack of information, the event handler was part of what i was looking (thanks for that) for as i should be able to combine it with a trigger for a location check. However i was needing information on how to check if there are stachel objects nearby as Kylania stated, as well as if there is anyway to 'check/verify' whether an action has been used. Any additional input would be great.
  25. So i'm building a mission for my campaign, have set it all up and decided to prooftest it, however i came up with some sort of glitch when i reach my first task. bassically i have my ACR squad with me, I move down the hills around the mine of feruz abad and then this 'glitch' happens and AI don't seem to be responding to my orders, the mission name is gone and tasks don't seem to register status. i've built dozens of missions before and not sure what this is, I have recently started using functions in my mission so i am wondering whether it is in conflict with another module. the list of modules i have in my mission is: - Functions - Garbage Collector - Weather - Environment (effects) - Simple First Aid - First Aid: Action - First Aid Battlefield Clearence I'm using the BIS_fnc_3dcredits function which i know works correctly because it was given in a sample mission and tested. When i test the functions they seem ok (using an opfor unit around the mine) at first, but when i return to my player team and i approach the mine the mission just 'glitches' again. Also i presume i am doing the right thing in syncing all 3 first aid modules together and then syncing them all to the player. Arma 2 + all expansions, no mods, no external configs, sqm and pbo version was tested, nothing distinct happens when i approach the mine, i have no triggers or waypoints of any sort which could be affected by the player presence and cause a glitch. some help is appreciated.
×