Jump to content


  • Content Count

  • Joined

  • Last visited

  • Medals

Community Reputation

3 Neutral

About Funkdoc

  • Rank
  1. the buildingpos are worldposition dependend, they have the world format, not the model format... so i think they can be obtained from only the one building object itself. it returns the absolute map position in positionATL format of the buildingpos. it is converted... like modelToWorld do anyway i think it should not be run by the server everytime... on my rig it takes about 3 seconds to catch about 18,000 buildings (not filtered) on chernarus redux (old version). its better to make it once for every map by hand. try to count buildingpos at your array loop and select those u want to be written to the list.
  2. Funkdoc

    Loot spawn help

    hello again, after some lines of sqf code i 've successfully asigned loot positions to a building loot container. just one item can now randomly spawn on free buildingpositions. i do not use a permanent variable for the the "vehicle" and wont really use variables for loot. At the moment, the vehicle variable is overwritten by the next loot item spawned every execution. this sets the previous spawned item as a object with a dummyItem reference. i can access the dummyitem (with nearestObject..) with the saved position to delete it, for example. the only global variables that i have assigned is the loot container and the positions and ID's of the buildings...2 separeted arrays. these arrays will (or not) append whenever new loot spawns were triggered by a player. goals: performance, ..not too much loops and absolutly no time suspensions (sleep ; waituntil..) ...i 've also made a new timer function without the needs of use of these commands. script should work on any map with enterable buildings with defined "buildingPos" positions. adjustable spawnpoints (vector pos offset) per buildingpos for every building class adjustable limitation of loot count for every building class initial server state has no loot, everything is triggered by roaming players over time adjustable loot despawner, auto cleanup adjustable loot list loot classes like survival, weapons, ammunition, special,... questions: arrays are limited to 9,999 elements, how to expand containers for big or high density maps in a server performant manner? am i on the right way with not assigning variables to spawned loot? should there be generally persistent loot after server restarts? is it better to make my own spawn positions instead of using buildingpos? (in most buildings are enough pos for adjusting it) any thoughts, tips, opinions...welcome
  3. Funkdoc

    Loot spawn help

    also right, it only works correctly with the "view" param. thanks
  4. Funkdoc

    Loot spawn help

    Yes that was it. now the loot spawns on the floor on all levels of the house... thanks alot
  5. Funkdoc

    Loot spawn help

    its not the problem that the floor is above terrain level. the problem is that there is no surface visible between "buildingpos" and "_surfaceRefPoint" in some houses but it intersects a surface anywhere between... dont know why. it works in most houses very well. i just want to spawn a single item per buildingpos. a workaround would be to set a offset for each building... just asked if there is another solution. Tested as MP server script on Chernarus Redux with problems. this is only for testing loot deployment and is executed just once by console serverside. //Spawn one loot item in next building to player at random floor position _possiblePoints = count (nearestBuilding player buildingPos -1); //count interior buildinpositions _nextLootPoint = nearestBuilding player buildingPos -1 select floor random _possiblePoints; //get random buildingposition ATLtoASL _nextLootPoint; //Translation for lineintersectsurface function _surfaceRefPoint = [_nextLootPoint select 0, _nextLootPoint select 1, (_nextLootPoint select 2) - 8]; //set a surface intersection reference point //get next surface intersection z axis downwards _surfaceList = lineIntersectsSurfaces [_nextLootPoint, _surfaceRefPoint, objNull, objNull, true, 1,"VIEW","FIRE"]; _surfaceDistance = if (count _surfaceList > 0) then [{(_surfaceList select 0 select 0) distance _nextLootPoint},{0}]; //get distance to first surface intersection _nextLootPoint set [2, ((_nextLootPoint select 2) - _surfaceDistance)]; //set z value to floor height ASLtoATL _nextLootPoint; //Backtranslation for lootspawnpoint Loot = createVehicle ["Item_optic_AMS", _nextLootPoint,[],0,"can_collide"]; //spawn loot item Loot setDir floor random 360; //set random loot direction run this in a loop for several times serverside and u will see how the ground fills up at the randomized buildingposiotons On Tanoa it works great in any house on any floor (example in multifloor house "house_big_04_f").. no problems.. tested whats the problem here
  6. Funkdoc

    Loot spawn help

    Hello i just find out that Loot spawned by "createVehicle" is also accessible without the "groundWeaponHolder" method. Has this any disadvantages? I have still problems with the "buildingpos" of a building. i tried to set the Lootposition on floor/ground level with the "lineIntersectsSurfaces" command. in most cases it works just fine, but some buildings seems to have surfaces above the ground (invisible) where it gets the wrong z zeroing when it intersects with the first surface. the items in this case are set to about 0.2-0.4m over ground. Any workaround? Thanks
  7. hello team, first of all i have to say its a outstanding work. i m relatively new to terrain building &CO, so one question: how did u manage the lighting "downgrade" of the 1.60 update? i didnt read in this thread how u guys fixed the problem, or if not what are your opinions how to fix it. thank u for that lovely map