Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
The map in the screenshot is Tanoa
Thank you 😄
_location = _x modelToWorld [_dir,0,0];
?
i wanted to give you and anyone else that might want to use it, a line of code that moved the trash on the road just a BIT to the side, to allow AI and other players to see it but not hit each one.
the results move each trash item a bit to the left or right of the middle of the road
changed this>
_location = _x getRelPos [floor random 3,floor random _dir];
to this>
_location = _x modelToWorld [25,0,0];
im busy but i wanted to randomize it too with 25 or -25 so it will move it either left or right of the middle of the road.
ill upload what i come up with when i do
Appreciate it.
In the script change the "private _roads = [worldSize/2,worldSize/2] nearRoads worldSize;" line. that will change what roads are effected by the function.
Is it possible to make the wreckage and garbage spawn only within trigger area?
You can increase the chance of a vehicle being spawned. That would increase the amount of wrecked vehicles.
No, when you call the function just append your array of positions and ranges to the forth item in the function parameters.
That sounds good. Have a play around and you can see what the script does in more detail.
params [["_per1", 85], ["_per2", 45], ["_per3", 30], ["_blacklistArea",[]]];
private _roads = [];
{
_pos = _x select 0;
_range = _x select 1;
_roads append (_pos nearRoads _range);
} forEach
[
[[16823.0,12714.0],300.0],
[[3573.71,13094.53],350.0],
[[3826.85,13732.11],300.0],
[[8626.27,18282.36],200.0],
[[25669.43,21358.68],250.0]
];
pretty good results using coordinates only for default major spawn cities in exile mod!
I also edited "floor random 3" to "floor random 6 + 3" to provide more variation and less stuff dead center of the road! :)
The position is an array.
You've got yours as just numbers.
They should look like this
[[16823.0, 12714.0, 0], 150.0]
private _roads = [];
{
_roads append ((_x0) nearRoads (_x1));
} foreach
[
[16823.0 12714.0,150.0],
[1234.0 4321.0, 100.0]
];
Like this,
private _roads = [];
{
_roads append ((_x#0) nearRoads (_x#1));
} foreach
[
[Pos #1, Distance #1],
[Pos #2, Distance #2]
];
Where Pos#X is the position array and Distance #X is the distance from that position in a circle.
or: private _roads = [16823.0,12714.0] nearRoads 100.0, [1234.0,4321.0] nearRoads 50.0;?
_roads is an array so you can append/pushback to it on the next lines with your other positions you want to add.
Yes
What you can do is alter the script and change the
`private _roads = [worldSize/2,worldSize/2] nearRoads worldSize;`
line to the position and distance you want it to find roads
Reading below, a white-listing option seems it could accomplish this?
In the Github the script is not called using the params, they are inc with the script at the top: params [["_per1", 13], ["_per2", 5], ["_per3", 2], ["_blacklistArea",[]]];
Your comment below: "So in the example above change ( [10,10,0],15 ) to your center postion and radius around your position." does not work and includes missing ] and spelling mistakes (postion). I'm very confused?!?
It's a great script which I'd dearly love to get working as intended, but at present I have items spawning where I don't want them (within a Trader for eg).
Can you please explain how to get this working, properly?
Your mission file should look include these files
https://imgur.com/a/zhETBGG
Following the example above the 3rd item in the array is another array with the center postion and radius of blacklisted areas.
So in the example above change ( [10,10,0],15 ) to your center postion and radius around your position.
Use the (count allMissionObjects "") command to count the number of objects with this turned off then turn it on and try again. If its detecting the roads then the postion might be spawning them below the ground.
Arma 3 SwitchMove DLC
Go check it out!
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1551815726
The idea for this script was from the picture.
I don't think its possible to replicate it with the script.
If you would like to try I would say [85,40,10]
The best way is just experimenting with the numbers.
The script was originally made for mass placing, therefore, it only has a blacklist implemented rather than a whitelist.
As I'm working on another project I don't plan on adding a whitelist any time soon.
So because they are simple objects, this many spawns shouldn't have too much impact on Server FPS? Have you given any consideration towards creating markers where you want trash to exist rather than whole map?
The number of objects depends on the size of the map and the percentages you have set.
asaayu's abandoned roads created 27714 simple objects in 18 seconds
Seems like a lot?
The script was originally created for a specific use in one of my missions therefore it only has a maximum distance of 3 meters from the center of the road. This was to stop spawned objects from colliding with objects that were placed beside the road.
If you want to change the distance edit the following lines in the init.sqf, 18, 26, 34.
Just change "floor random 3" to what you want.
getRelPos information [community.bistudio.com]
This is a demo mission, check your scenarios tab in the main menu.
I've been away the last couple of days, therefore, Github may not be as active as I have hoped.
If you are looking for a quick reply I usually have either steam open or get notifications on my phone.
Leaving it at either place will eventually get a reply.
The idea for the script originally came from this thumbnail that I made for another mission.
So all the objects in the thumbnail were individually placed.