# Fiddi

Member

241

1. ## Find near positions.

I've tried them, but in the dense jungle of Tanoa those commands can't find any good locations, always end up in a field. And I want it to be able to spawn in the jungle and cities. Also in logical areas, not in the middle of the road.
2. ## Find near positions.

Yes, I solved it by first selectRandom on all of the locations and then another, like Serena's code, choosing within the radius. Not sure why I did that but it works.
3. ## Find near positions.

Great, then I don't have to hold back on the locations. 1 000 000 locations within 100Km2, here I come! :D I'm so sick of the wood piles in the editor.
4. ## Find near positions.

Another question, or I'm atleast wondering. How big can an array get without causing problems? Is there a ceiling for how many elements it can have? I'm asking because when I'm done there'll be 800-900 locations I have placed and all of them have to insert their position and direction into the array. Also with such a big array, how performance "un-friendly" will a selectRandom be?
5. ## Find near positions.

Yes, I'm trying that now, or a variation of it. I keep the findSafePos. And that will be my orig pos. However, I'm stuck yet again. The "SideOpPosArray" is structured like this: [ [pos,dir], [[0,0,0],0] ] And I'm not sure how to modify the function to account for that. Edit: I might have got it right, I don't know, hard to test until I have modifed the rest of the script. This is what I came up with: Fn_SelectPositionNear = { params ["_posArray", "_origPos", "_radius"]; selectRandom (_posArray select {_x select 0 distance _origPos <= _radius}) };
6. ## [SOLVED] Sound Drop off in 3D Space

Something like this perhaps: playSound3D ["\transpoder.ogg", _obj, false, getPos _obj, 1, 1, 0]; The last three numbers are volume, pitch and distance. Volume is self-explanatory. Pitch is also self-explanatory. Distance is how far away you can hear the sound regardless of volume. 0 is no max distance, and is dependent on volume instead.
7. ## Find near positions.

Thanks for the help. I don't really know where to start though, I'm having a bit of a brainfart. Thing is, I've placed hundreds of woodpiles all over Tanoa. Those define my positions and direction, I then in init.sqf I have this: SideOpPosArray = []; { SideOpPosArray pushBack [getPos _x, getDir _x]; deleteVehicle _x; } forEach (allmissionObjects "Land_WoodenPile_F"); And I have my super large array of positions and directions. Then this function is run whenever I want to start a side mission: That's the previous version which just finds random positions, but it doesn't find positions inside the jungle on Tanoa which is what I want, would be cool. I want to adapt it to the predefined position while at the same time not spawn two missions within 3000m of each other. Would be so great if it worked, and I'm not being crazy to think it would. The jungle warfare could begin for real if it did. :)
8. ## Find near positions.

I think you misunderstood me (or I you), I have a already defined random position, from which I want to choose one, within radius, between a pre-defined array of positions. Similar to nearobjects. What I want is what nearObjects does but with positions [0,0,0] instead. So switch the classnames/type with an array of positions instead that I already have
9. ## Mi-290 Taru - Interchangeable Pods

Wrote my own script for doing this, but an engine solution would hopefully solve many desync and weird issues. This is absolutely something that's needed, if only for the sake of having the Taru be somewhat useful.
10. ## Apex Vehicles Feedback

Are the VTOL's not supposed to have any "lock-on"/missile warning at all? When being fired at by AA missiles there's no warning at all. Also the helicopter UAV doesn't work at all. Engine starts and throttles up then it bugs out, engine turns off, and you're stuck inside it with no way to control it.
11. ## Putting an "or" condition in a trigger?

This might work: {_x in thislist} count Playableunits > 0 && h1 in thislist You can probably also switch out playableUnits against [p1,p2,p3,p4,p5,p6] Edit: Like the others said. :D

There are commands such as setUnitLoadout and getUnitLoadout. And there's this: https://community.bistudio.com/wiki/Event_Scripts Check out the InitPlayerLocal.sqf and onPlayerRespawn.sqf From there you might figure out how to do what you want.
13. ## Zero divisor error in addAction

This, and all of them: [(_this select 1)] execVM "Mission\Fuel_Can_Light_A.sqf" remoteExec ["bis_fnc_call", 2]; Should perhaps be this: [(_this select 1), "Mission\Fuel_Can_Light_A.sqf"] remoteExec ["execVM", 2]; And, of course, respective filenames etc.

15. ## apply or forEach (or maybe count)?

As far as I can tell there seem to be an extremely minimal difference, with apply being 0.001 ms faster, with this code: {_x setVelocity [0,0,5]} count [HURON, Kart1, kart2, Quad1, Quad2]; [HURON, Kart1, kart2, Quad1, Quad2] apply {_x setVelocity [0,0,5]};
16. ## Supply drop

You mean a crate you've edited the inventory in the editor? If so, I'm not sure you can. What I've done when using the supply drop is using these: https://community.bistudio.com/wiki/addItemCargoGlobal https://community.bistudio.com/wiki/addWeaponCargoGlobal https://community.bistudio.com/wiki/addMagazineCargoGlobal https://community.bistudio.com/wiki/addBackpackCargoGlobal It's tedious but works. Though, I think there should be a interface like the ones on placed containers in the module to edit the contents of the crate.
17. ## Respawn on position for particular units only

Take a look at this: https://community.bistudio.com/wiki/BIS_fnc_addRespawnPosition
18. ## Supply drop

If you look in the attributes of the support module there is a "crate init" you can edit.
19. ## [SOLVED] Respawn delay as parameter

This might be in the ballpark. https://community.bistudio.com/wiki/setPlayerRespawnTime Never used it myself.

I've noticed that you only need to disable "CHECKVISIBLE" and "AUTOCOMBAT", to get AI to do what you want, regardless of how much they're being shot at. So, this should suffice: { _x disableAI "AUTOCOMBAT"; _x disableAI "CHECKVISIBLE"; } forEach units group _group;
21. ## Advice on using addAction, ExecVM and remoteExec in script (i.e. locality and that Jazz)

It's weird though, it should work. I have never experienced that it did not remove the action, I have never tried it on dedicated server though. Are you sure you wrote it correctly? [(_this select 0), (_this select 2)] remoteExec ["removeAction", 0];
22. ## How to make "Device" a bomb and able to disarm

Try this: _nuke1Pos = position nuke1; _nuke1Dir = getDir nuke1; deleteVehicle nuke1; _disarmedNuke = "Land_Device_disassembled_F" createVehicle _nuke1Pos; _disarmedNuke setPos _nuke1Pos; _disarmedNuke setDir _nuke1Dir; EDIT: Oh, the one above fixed it, apparently.
23. ## General Discussion (dev branch)

Is it possible to revert to the previous size of the eden interface, before they tied it to the interface scale? I think it's way too big.
24. ## Increase the range of supply/support vehicles?

What kind of action do they use then? I don't simply want a setVehicleAmmo, I need it to actually work as they should.
25. ## Increase the range of supply/support vehicles?

Hey, is it possible to increase the range (on rearm, refuel and repair) for the different support vehicles, specifically the Taru pods? I'm forced to drive or land incredibly close for it to work, and would like a way to increase the range. Preferrably in script form, but I don't mind addon config solutions. Thanks.
×

• Clubs