Jump to content

Larrow

Member
  • Content Count

    3605
  • Joined

  • Last visited

  • Medals

Everything posted by Larrow

  1. getPosASLW and getPos will both return negative z values.
  2. Just replace that line with _randomPos = [[[getMarkerPos currentAO, PARAMS_AOSize],_dt],["water"]] call BIS_fnc_randomPos; All it should need is the "out" removed as this is the bit that is calling WorldArea. Shouldnt make much difference to your mission as your calling for a random pos in [getMarkerPos currentAO, PARAMS_AOSize] or _dt so "out" wont even matter as long as markerpos + params_aosize doesn't overlap the edge of the populated map (if it does your just be spawning out in the wilderness a little way :P). The only other place its called is to default parm0 if not specified but as in the last sentance your already suppling this parm. Ok theres alot of wilderness in cherno :) If it does bother you that much just copy BIS_fnc_randomPos and rename it and replace all [] call BIS_fnc_worldArea with [] call _fnc_WA_replace and add this function to the script _fnc_WA_replace = { _trig = createtrigger ["emptydetector",[9122.17,5178.92]]; _trig settriggerarea [8500,8500,0,true]; _trig }; Havent fully tested but sizes are right from cherno config. Think that should about do it. Luckily i was only looking at this set of script earlier this morning trying to figure out some other problems.
  3. Something like pos = ["water",["ground"]] call BIS_fnc_randomPos; in water but not on the ground, works. Dont think its actually fully working properly as per the specs in the sqf, seem to get all strange results back. Been playing with it through the debug console using 0 = [] spawn {while {true} do {pos = ["water,["ground"]] call BIS_fnc_randomPos; player setposATL pos;sleep 1;}} just on a basic preview with just the player added. If you pass it an array for parm 0 as per the BIS_fnc_params in the script it just behaves oddly, even the working water one above i dont think is paying any attention to "water" is just defaulting to the whole map just not on ground because if you change "water" to "out" as parm 0 it still just chooses any where in the water rather than edge of the map. Same as your example i believe this is only working because your parms are not arrays and is using default params that are _whiteList = [_this,0,[[] call BIS_fnc_worldArea],[[]]] call bis_fnc_param; _blackList = [_this,1,["water","out"],[[]]] call bis_fnc_param; _condition = [_this,2,{true},[{}]] call bis_fnc_param; wholemap, ["water", "out"], {}. wholemap but not in water or outside map area. Anyway do at users discretion as something is not right. hope the above helps.
  4. Make a trigger and group it with the OP. Make it 'static object' 'once' 'present'. condition 'this'. onAct = { hatch = format ["Hatch_%1_rot",_x]; [(thislist select 0), hatch] execVM "\A3\Structures_F\scripts\Hatch_close.sqf"; } forEach ["1","2","3","4"] Will on map start close all hatches on a V1 or V2 OP.
  5. Larrow

    check Player for a Item ?

    this && ("NVGoggles" in (items player) || "NVGoggles" in (assigneditems player)) Should be good for the trigger condition
  6. http://community.bistudio.com/wiki/getMarkerColor
  7. Use something like this _areas = ["mrk1","mrk2","mrk3"]; //list of markers using EOS if({ getMarkerColor _x == "ColorGreen"; } count _areas == count _areas) then { //all markers captured } else { //all markers not captured }; In a trigger (will need to make areas global if in a trigger) or somewhere in your mission script.
  8. Have you tried resetting their Identities in each EVH respawn script rather than just setFace? Like you have in each units init line. Just an idea from quickly browsing through your mission files.
  9. Not an ideal solution but you can get the object returned for the first backpack in a crate then add what ever you want to it. nil = [this] spawn {while {true} do { _crate = _this select 0; _crate addBackpackCargo ["B_Carryall_ocamo", 1]; //add backpack to crate _bpack = firstBackpack _crate; //get object for backpack _bpack addMagazineCargo ["RPG32_AA_F", 1]; //place magazine in backpack waitUntil {isNull (firstBackpack _crate)}; //wait until backpack is taken and insert another };}; Place the above in a crate, weaponHolders init line. It will keep replacing the backpack with a newly filled one every time one is taken. Just a shame backpackCargo does not return an array of backpack objects rather than names. Or even if we could fill backpacks like this in an wepaonHolder of map and have the ability to remove and insert by object name into another crate. Maybe the ability does exists but this is the only way ive found so far.
  10. gb init line in editor this addAction ["refill box","loadbox.sqf"]; OR init.sqf gb addAction ["refill box","loadbox.sqf"]; loadbox.sqf _crate = _this select 0; _crate addWeaponCargo ["arifle_khaybar_ARCO_point_F",1]; This will work for SP, MP will need addWepaonCargoGlobal and youll need to make sure the addaction is working globally too.
  11. Larrow

    Advice on Spawn Function

    Works fine here, only thing ive changes in your script is _spos= [getmarkerpos _marker,random 360,[0,360],false,[2,100]] call SHK_pos; Option 3 you had set as 250,600. This is degrees of rotation from marker position, 250 -> 600 leaves you a 10 degree arc at roughly WSW not to spawn in? is this actually what you were going for? Option 5 according to the readme is meant to hold an array of [option, distance] 0 = no road positions 1 = road position, random position if no roads found 2 = road position, empty array if no roads found Using '2' in options is going to return an empty array if there are no roads found, which will cause you problems passing this to spawnGroup. TEST MISSION if you need it
  12. The BIS Wiki is most likely a good place to start. Try from THIS PAGE and follow all the subject links for further reading especially the ones at the bottom of that page.
  13. Larrow

    Advice on Spawn Function

    Its because your using call for each group, you need to either spawn or exeVM so each one is a new thread. It would be better if you called (all dependant on what else youve got happening/mission flow) the SpawnAI.sqf. SpawnAI.sqf then spawns seperate threads for each group and returns to Init todo what ever else. At the moment a seperate thread is being made for SpawnAI this then calls ["CAPBase1"] call god_Infspawn1; which waits at the end untill the groups dead it never advances past this point so you never get another group. init setupGroups = compile (preprocessFileLineNumbers "scripts\SpawnAI.sqf"); SpawnEnemies = true; [] call setupGroups; SpawnAI ///Spawn 4 groups //create 4 separate threads, one for each group ["CAPBase1"] execVM "scripts\spawninf1.sqf"; ["CAPBase1"] execVM "scripts\spawninf1.sqf"; ["CAPBase2"] execVM "scripts\spawninf1.sqf"; ["CAPBase2"] execVM "scripts\spawninf1.sqf"; spawninf1 (for testing, without ups or SHK_pos) _marker = _this select 0; while {SpawnEnemies} do { _randomsquad=["OIA_InfSquad_Weapons","OIA_InfSquad","OIA_InfSquad_Weapons","OIA_InfTeam","OIA_InfTeam_AT"] call BIS_fnc_selectRandom; //_spos= [getmarkerpos _marker,random 360,[250,600],false,2] call SHK_pos; _Grp1 = [getmarkerpos _marker, EAST, (configfile >> "CfgGroups" >> "East" >> "OPF_F" >> "Infantry" >> _randomsquad)] call BIS_fnc_spawnGroup; //[(units _Grp1) select 0, _marker,"track","nowait","showmarker","noslow","delete:",120] execVM "scripts\ups.sqf"; waitUntil {{alive _x} count (units _Grp1) == 0}; };
  14. Larrow

    lineintersects == broken?

    Just for information incase anyone else sees this thread because their having trouble with weird results from lineIntersects or lineIntersectsWith. Its because these commands expect a ASL position. e.g pos = player modeltoworld [0,1,1.8]; pos2 = player modeltoworld [0,3,1.8]; hint format ["%1", (lineintersects [ATLtoASL pos, ATLtoASL pos2])] or nil = [] spawn { while {true} do { sleep 0.03; start = player modelToWorld [0,1,1]; end = player modelToWorld [0,3,1]; helper1 setPos start; helper2 setPos end; hint str (lineIntersects [ATLtoASL start, ATLtoASL end,helper1,helper2]); }; }; or (eyepos actual returns a ASL position so you would just need to fix the 3DdrawLine) nil = [] spawn { while {true} do { sleep 0.03; start = eyepos player; pdir= vectorDir player; { pdir set [_foreachindex, ((_x*5)+(start select _forEachIndex))] } forEach pdir; end = pdir; drawLine3D [ ASLtoATL start, ASLtoATL end,[1,0,0,1]]; hint str (lineIntersectswith [start,end,helper1,helper2]); }; }; The discrepency between the 3D line and what Intersects say it was receiving was driving me crazy. Oh for a good nights sleep to make you see clearly. :) EDIT: yes sasij, beat me to it while i was writing this, had just woken up and immediately realised the mistake :)
  15. Larrow

    lineintersects == broken?

    Ok after making sure everything seemed to be lining up properly using drawLine3D i decided to take modelToWorld out of the equation and try eyepos with vectorDir player to get a position out in front of the player also lineIntersectWith to get a list of everything I was supposedly looking at. First thing I noticed is that eyepos is about 3 meters above the players head. On changing the position by taking roughly 3 meters off of the z value i was back to rubbish results from the trace even though the line appears to originate roughly around the position of the players eye. I changed eyepos back to what ever the engine was returning as the value and done a trace straight out in the direction the player was facing. Voila i get a list of everything thats in front of me down to the smallest sign post, wall, fences etc etc. mmmmm So whats up here?? are visual models and lods not aligned in the engine or is there something else going on here. Try it out for yourself, add this to the players init and have a walk around town. Youll notice the array in the hint shows what ever is in front of you at eye level but the 3Dline is about 3m above you. nil = [] spawn { while {true} do { sleep 0.03; start = eyepos player; pdir= vectorDir player; { pdir set [_foreachindex, ((_x*5)+(start select _forEachIndex))] } forEach pdir; end = pdir; drawLine3D [start,end,[1,0,0,1]]; hint str (lineIntersectswith [start,end,helper1,helper2]); }; };;
  16. Larrow

    lineintersects == broken?

    Yep thats FUBAR alright, as you say just putting something like nil = [] spawn { while {true} do { sleep 0.03; start = player modelToWorld [0,1,1]; end = player modelToWorld [0,3,1]; helper1 setPos start; helper2 setPos end; hint str (lineIntersects [start,end,helper1,helper2]); }; }; in the player init and running around Marina gives all sorts of weird results. Helper1 and 2 are just empty->object->10cm spheres As you say house walls are not detect until start point is touching the wall. Going inside a house returns true all the time even if there is nothing between start and end. Running over a bridge returns all sorts of values. Any thing over the gully walls all ways returns true. Most garden walls are not even detected. Placing the start position over the edge of a walkway like the shop fronts returns true. It almost like its not doing a trace from start to end but just at point start and also as if its detecting whether it within an objects bounds rather than a visual lod. Although that does not explain the gully walls unless there bounds are huge in the vertical?? Like the vid though that looks awesome for when you finally get it working :)
  17. Larrow

    Users are falling down badly?

    They are all in the editor :) i know i haven't played online for the last fortnight but been experimenting in the editor.
  18. Ive already erported this. See this Feedback http://feedback.arma3.com/view.php?id=7260
  19. Larrow

    Discussion about stances

    In all im loving the new stances but there are problems. With all the key binding options we have and the different ways we can set our keys up to do the same things like stand and crouch or up to toggle between the two, why suddenly are we locked in to a modifier key and forward and back to change our stance. Unlocking this so we can bind it how we like is the number one issue. Beyond that, the rest in no particular order. Fluid movement between the stances would be excellent. Thought :- Maybe a rubber band effect for TIR y-axis (can only shrug my head down into my shoulders so far). By rubberband i mean like erm mmm example, freelancer or some other space sims where your ship changes direction towards your mouse cursor, where the speed of change is dependant on the distance. Moving your head down half an inch is enough to get your character to slowly start down stancing, an inch would make the transition faster and the same for moving your head up, this would leave a nice deadzone in the center. I also agree that the sit down in the stances does not seem right and would much prefer this to be incorporated into the sitting with the different poses dependant on weapon and/or whether your looking down your sights. Prone low (where you roll onto your right side) or what ever you want to call it, should have a roll left aswell and be tied to leaning or stance left/right. Dont really see a need for a prone low. Absolutely love the OP's idea of having a head high in prone so you can have a quick look around (meerkat stance :) can picture the battlefield now in the long grass with all the heads bobbing up lol ). What about even adding it as prone high if the sitting stance was reassigned to sitting. Make prone high only available from prone - may look strange going from crouch low to prone with your head up.
  20. Larrow

    Auto Reporting

    what about enableRadio ?
  21. Your never falling out of the loop //TIME TO SEE WHATS GOING ON //Begins loop while {true} do { which checks to delete spawned OPFOR units if BLUFOR not present OR sets marker colour dependant on if OPFOR are present or not. Your never getting back to see if BLUFOR are present and respawn your units again. I forsee other problems
  22. Larrow

    Assertion

    I have used similar to this example a couple of times in ARMA2 and IF and never run into any problems. I have just been back and tested it straight in a units init, assigning itself the event in Arma2 with no problems. All dependent on how the RV engine actually handles events but in general as this is an event it should not matter where its initiated from, it has no relationship to where its set, only that this piece of code is set for when the event is fired. You could also move the addEventHandler out side of the script it does not need to be where it is to accomplish the task.
  23. Larrow

    Assertion

    thisscript = [] spawn { vipMan addEventHandler ["killed",{terminate thisscript;}]; while {sideMissionOn} do { //blah }; }; Should pretty much do what the assert is doing
  24. I've found that there needs to be a short delay between a task being created and the destination being set. If for example you try to do both from the same trigger the destination will not show. However if you place another trigger ontop of the one that creates your next task with the same settings but give it a countdown of a second the destination will show up. or run this from your current trigger that is creating your task nil = [] spawn { _taskcreated = false; while {!(_taskcreated)} do { _taskcreated = ["TASKNAME"] call BIS_fnc_taskExists; sleep 0.5; }; sleep 1; ["TASKNAME", MYTASKPOSITION] call BIS_fnc_taskSetDestination; }; //TASKNAME as in module Task ID //MYTASKPOSITION = OBJECT or ARRAY or STRING of your task destination and delete your setTaskDestination module
  25. Your missing an underscore on list _trigger select _k or you could go for if (isServer) then { _mortar = _this select 0; _trigger = _this select 1; { for [{_l = 0},{_l < 3},{_l = _l + 1}] do { _mortar commandArtilleryFire [ (getPosATL _x),"8Rnd_82mm_Mo_shells", 1]; sleep 3; }; } forEach list _trigger; };
×