shuko

Member

2231

1. SHK_intercept

I wanted to spawn enemies in front of the player group. How to get the right direction and thus position? Using the built-in "getDir" command would be simple, but what if you happen to use it when the group leader has turned around to check up on his group? Then you would be spawning enemies in completely wrong direction. This script will tracking a group and record it's positions in given interval. You can call the function any time to get the average direction, aka a guesstimate/overall direction where the group to heading to. Starting Tracking Required Parameters: 0 Group/Object Group to track. Optional Parameters: 1 Number Recording interval, delay in seconds between position checks. 2 Number History size, number of newest positions to remember. Starting Examples: nul = dude1 execvm "SHK_intercept.sqf"; nul = grpWest1 execvm "SHK_intercept.sqf"; nul = [dude2,5,20] execvm "SHK_intercept.sqf"; Getting the Direction Function's name is SHK_intercept_getDir. It takes an object or a group as a parameter and returns a direction between 0 and 360. Required Parameters: 0 Group/Object Group to track. Optional Parameters: 1 Number Position info age when calculating direction. Given number is the Nth newest position to compare the current position. Example: positions are [a,b,c,d,e,f,g], you give 3 as info age. The position to be used for direction calculation is e. Float Range 0-1, which is applied to the size of the history. Example: size is 10 and age is 0.5, the dir will be calculated from the 5th position in the history. Or 0.2, the position would be 9th (2nd newest). 2 Number Sample size. Number of positions between newest and the one determined by info age, which is included in the average calculation as well. Examples: dir = grpWest1 call SHK_intercept_getDir; dir = [grpWest1,0.3] call SHK_intercept_getDir; dir = [grpWest1,10,5] call SHK_intercept_getDir; 2021 reupload https://drive.google.com/drive/folders/1XXrSZbu7nCaW2UkOVsaVbKmX0ZmfFUtg?usp=sharing Feel free to use anyway you like, or dont. 🙂

Blast from the past. Reuploaded https://drive.google.com/drive/folders/1XXrSZbu7nCaW2UkOVsaVbKmX0ZmfFUtg?usp=sharing Feel free to use anyway you like, or dont. 🙂
4. SHK_Patrol

I know there are dozen of different kinds of patrol related scripts available. I will still chip in with this simple one. It is based on BIN_taskPatrol for A2 by Binesi, which is based on BIS_fnc_taskPatrol. I have simplified it even further. The way I like to use it is to create a patrol group and then paste the execvm line into it's leader's init. Then copy-paste the whole group couple of times around the mission area. Simple and fast. The script will create waypoints in a circlish manner around the starting position of the group. Waypoints placement and count is based on the distance parameter; longer it is, the more WPs there will be. Normally the group will go clock-wise around them, but each WP has a chance to make the next WP random. Thus, creating some unpredictability. SHK_patrol.sqf /* Required Parameters: 0 Object or Group The patrolling unit Optional Parameters: 1 Number Distance from the unit's starting position to create waypoints. Default is 250. Usage: Start from group leader's init field or from init.sqf: nul = [params] execVM "shk_patrol.sqf"; Examples: nul = this execVM "shk_patrol.sqf"; nul = [this,350] execVM "shk_patrol.sqf"; nul = [grpA,300] execVM "shk_patrol.sqf"; */ 2021 reupload https://drive.google.com/drive/folders/1XXrSZbu7nCaW2UkOVsaVbKmX0ZmfFUtg?usp=sharing Feel free to use anyway you like, or dont. 🙂
5. SHK_Patrol

Blast from the past. Reuploaded https://drive.google.com/drive/folders/1XXrSZbu7nCaW2UkOVsaVbKmX0ZmfFUtg?usp=sharing Feel free to use anyway you like, or dont. 🙂
6. SHK_intercept

Blast from the past. Reuploaded https://drive.google.com/drive/folders/1XXrSZbu7nCaW2UkOVsaVbKmX0ZmfFUtg?usp=sharing Feel free to use anyway you like, or dont. 🙂
7. SHK_pos

This is a random position generator/selector. It can choose a position from a marker area or by based on direction and distance from a position/object. 2021 update, reuploaded after billion years: https://drive.google.com/drive/folders/1XXrSZbu7nCaW2UkOVsaVbKmX0ZmfFUtg?usp=sharing Arma 2 thread Marker Based Selection Required Parameters: 0 String Area marker's name. Optional Parameters: 1 Number Water position. Default is only land positions allowed. 0 Find closest land. Search outwards 360 degrees (20 degree steps) and 20m steps. 1 Allow water positions. 2 Find only water positions. 2 Array or String One or multiple blacklist area markers which are excluded from the main marker area. 3 Array, Number, Object or Vehicle Type Force finding large enough empty position. 0 Max range from the selection position to look for empty space. Default is 200. 1 Vehicle or vehicle type to fit into an empty space. Examples: [...,[300,heli]] Array with distance and vehicle object. [...,350] Only distance given [...,(typeof heli)] Only vehicle type given [...,heli] Only vehicle object given Position Based Selection Required Parameters: 0 Object or Position Anchor point from where the relative position is calculated from. 1 Array or Number Distance from anchor. Optional Parameters: 2 Array of Number Direction from anchor. Default is random between 0 and 360. 3 Number Water position. Default is only land positions allowed. 0 Find closest land. Search outwards 360 degrees (20 degree steps) and 20m steps. 1 Allow water positions. 2 Find only water positions. 4 Array Road positions. 0 Number Road position forcing. Default is 0. 0 Do not search for road positions. 1 Find closest road position. Return the generated random position if none found. 2 Find closest road position. Return empty array if none found. 1 Number Road search range. Default is 200m. 5 Array, Number, Object or Vehicle Type Force finding large enough empty position. 0 Max range from the selection position to look for empty space. Default is 200. 1 Vehicle or vehicle type to fit into an empty space. Examples: [...,[300,heli]] Array with distance and vehicle object. [...,350] Only distance given [...,(typeof heli)] Only vehicle type given [...,heli] Only vehicle object given Usage Preprocess the file in init.sqf: call compile preprocessfile "SHK_pos\shk_pos_init.sqf"; Actually getting the position: pos = [parameters] call SHK_pos;
8. SHK_pos

Blast from the past. Reuploaded https://drive.google.com/drive/folders/1XXrSZbu7nCaW2UkOVsaVbKmX0ZmfFUtg?usp=sharing Feel free to use anyway you like, or dont. 🙂
9. SHK_Fastrope

I was looking for a fast-rope script to use in a mission. I found this thread. I used the script made by zealot111 as the base for my script. All credits should go to him for the basic idea. I just rewrote it to include a queue, and other small changes. The main goal, for me, was human player usage only, but the script will also rope down AI members of a group whose leader is human player. SHK_Fastrope.sqf Example mission Usage 1. Copy the script file into your mission folder 2. Open (or create) initPlayerLocal.sqf in your mission folder 3. Add this line into the file (no semi-colon at the end of the line): #include "SHK_Fastrope.sqf" Example using Ghost Hawk (chopper leaving after all units are on the ground is done by trigger, not by the script)
10. foreach allPlayers - dedicated server

Don't use the command player in dedi.
11. SHK_pos

Interesting, I'm glad you figured it out and got it working.
12. SHK_pos

I actually reinstalled Arma just to check this out. ;) Here's the test mission with those markers: https://www.dropbox.com/s/spdysewl5t0lydn/SHK_pos.Stratis.zip?dl=0
13. SHK_pos

It seems you guys are trying to use the marker based search with the position/anchor based parameters. The 2nd parameter in anchor based search is the wanted distance from the origin/anchor, while on the marker based search the 2nd parameter is the water position. In other words, marker search wants a number 0, 1 or 2 and you are giving it an array (with the min/max distance).
14. SHK_Fastrope

You can do whatever you want with the script. I doubt I will do anything more with it.
15. Find a random position on radial

This is a script I made a long ago to randomly pick positions: https://forums.bistudio.com/topic/153382-shk-pos/ You can specify the direction/angle and distance etc.
16. SHK_pos

The script does not have an offset option in those cases. Basically, all the positions that are on the water's edge are usually positions which were originally in water and just moved to nearest land. One workaround is to be more careful/specific with the input parameters/input marker to manually avoid water.

You're the first person in over five years to ask for task delete. ;) I never even bothered with it, since all the missions I do/did were simple missions without respawn etc., so marking a task as cancelled was good enough. :)

They are not compatible with each other. It seems like BIS uses "BIS_fnc_taskVar_" tag in front of it's task names/variables. In a shot in the dark, you could give it a go by creating Taskmaster tasks with the name "BIS_fnc_taskVar_Task1" and then try BIS_delete task "Task1". I haven't tried it, and I'll give it 0.1% probability to work. ;)
19. SHK_Fastrope

You can do whatever you want with it.
20. bis_fnc_mp & remoteExec

The new commands are preferred. However, BIS_fnc_MP should work just fine, and it's changed/will be changed to use the new commands.
21. What text editor are you using?

I used Notepad++ for a long time. Now, I've tried out Visual Studio Code (yes, there's a plugin for SQF)
22. SHK_Fastrope

Thanks! I included them to the next version, which I'll release if/when I get time and brains to fix the MP issue(s). Adding them to the current version should be easy enough for everyone.
23. SHK_pos

Unfortunately the command findEmptyPosition does not accept size requirement in meters. Maybe you can find a vehicle that is big enough, and use it's type as the requirement.
24. SHK_Fastrope

Which version are you using?
25. SHK_Fastrope

Thanks for checking it through. However, the fastrope/queue up action is available only once. The action condition includes: !(player in (_heli getVariable ["SHK_Fastrope_Queue",[]]) Though, I have not personally tested how it works in practice in MP. In SP the action is removed like it should be.
×

• Clubs