Spriterfight
Member-
Content Count
171 -
Joined
-
Last visited
-
Medals
Everything posted by Spriterfight
-
Called function wont execute multiple times in while loop
Spriterfight posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I have a while loop and i created a function that updates a certain position, the problem is it dosent execute everytime it is called in the while loop only once, so the object that i want to move only moves towards the first position thaht the function has created -
Called function wont execute multiple times in while loop
Spriterfight replied to Spriterfight's topic in ARMA 3 - MISSION EDITING & SCRIPTING
func_PredictIntrecept = { _target = _this select 0; _aircraft = _this select 1; _targetPos = getPos _target; // Get the velocity of the target _targetVel = velocity _target; // Get the current position of the aircraft _aircraftPos = getPos _aircraft; // Calculate the time it will take to reach the target _timeToTarget = (_aircraftPos distance _targetPos) / (speed _aircraft / 3.6); // Calculate the future position of the target _futureTargetPos = _targetPos vectorAdd (_targetVel vectorMultiply _timeToTarget); // Calculate the direction to the future target position _directionToFutureTarget = _aircraftPos vectorFromTo _futureTargetPos; // Calculate the interception point _intersectionPoint = _futureTargetPos vectorAdd (_directionToFutureTarget vectorMultiply _timeToTarget); // Create a marker at the interception point (for debugging purposes) _markerStr = createMarker ["markername", _intersectionPoint]; _markerStr setMarkerShape "RECTANGLE"; _markerStr setMarkerSize [100, 100]; // Display a hint for debugging hint "OK"; _intersectionPoint; }; This is my code which predicts intrecept position of a target, i fixed it by simplifying the formula(it has an object attached to it and wanted a relase position where the plane relases it to hit target, nevermind it is complicated and arma has strange physics).The problem was it seemed to be a delay and the plane moved behind the target.It needs to be updated every second.It seems to be work, but i want to be sure that it executes instantly and there are no delay since accurate position is crucial -
Called function wont execute multiple times in while loop
Spriterfight replied to Spriterfight's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I put the function in the init.sqf is it bad practice? -
HELP Detecting units from a group in triggerarea
Spriterfight posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
So i have this in the trigger condition: ({alive _x} count units test1) == ({_x in thisList} count units test1) and this in the units's init test1 = group this; The problem is it wont detect if the units from test1 are in trigger area. -
So can someone help me to make ai pilots fire accurately or use the plane properly it is so frustrating seeing ww 2 fighters geting shot by biplanes and the problem is that the fighters are fleeing from the bipalnes and they arent using the full potential of their speed also everytime they let the biplanes in their backs so they can shot them.I know arma isnt made for flight sim but want to make a ai vs ai dogfight that is random and dont wanna chees it with scripts,maybe if i can make them more accurate would be better since these planes dont have heat missiles
-
HELP Check if unit is in position
Spriterfight posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
i want a script that checks if the unit is in formation ,when a unit is is ready they say ready to fire,is there a way to check this when they say that? -
HELP Check if unit is in position
Spriterfight replied to Spriterfight's topic in ARMA 3 - MISSION EDITING & SCRIPTING
When does ready fires actually?When a unit is at his position? -
So i have a waypoint and i want to set a timer for if a certain time passes the waypoint deletes itself so i thoguht the setWaypointTimeout is for this .Any ide?The reason for this is simple,I want a dynamic ai co op exeprience and if certain waypoint dosent seems to fit the role i want to cahnge it thats why i would set a timer for it so if the ai didnt comepletes the waypoint then the waypoint will delete itself and will be replaced with another one with different role, like move---> sek and destroy
-
I have 3 sector and want to select the nearest to a sepcific group how can i achieve this beside using BIS_fnc_nearestPosition
-
How can i detect if a sector has no side?Are there any index like west,east etc to identify sideunknown?i have this for east and west "sectorname getVariable "owner" == east" Thnx in advance!
-
I have this code What i want is to set the direction of the plane to face the caller but everytime i run the script the plane is facing the right direction but it is upside down
-
HELP With direction of object
Spriterfight replied to Spriterfight's topic in ARMA 3 - MISSION EDITING & SCRIPTING
_bomberplane = createVehicle [_planetype, _posspawn, [], 0, 'FLY']; [_bomberplane, 600, _posspawn, "ASL"] call BIS_fnc_setHeight; _dir = _bomberplane getDir _caller; _bomberplane setDir _dir; _crewbomber = createVehicleCrew _bomberplane; _wp1 = _crewbomber addWaypoint [_targetpos,1]; _wp1 setWaypointType "MOVE"; _wp1 setWaypointSpeed "Full"; _wp1 setWaypointBehaviour "Aware"; _wp1 setWaypointStatements ["true", "deleteVehicle this"]; It is sabs secret weapon planes i want the plane to face the direction of caller -
HELP How can i activate the trigger?
Spriterfight posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
So i have three group and i want the trigger to be activated when each leader of the group is in the trigger area.How can i do this?Thanks in advance -
HELP How can i activate the trigger?
Spriterfight replied to Spriterfight's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks! -
HELP How can i activate the trigger?
Spriterfight replied to Spriterfight's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I solved it with leader grp1 inArea thisTrigger && leader grp2 inArea thisTrigger && leader grp3 inArea thisTrigger && leader grp4 inArea thisTrigger && leader grp5 inArea thisTrigger -
Can i disable object animation?(B_Parachute_02_F)
Spriterfight posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
How can i set "B_Parachute_02_F" ,to not open until certain hegiht?I thought i could disable the parachute opening animation. -
Saving Gear When go out Trigger Location.
Spriterfight replied to bong oh's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thank you -
Saving Gear When go out Trigger Location.
Spriterfight replied to bong oh's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You pack the mission in a zip and upload to a drive.This will help us reproduce the error Do you use any mod? Thank you! -
Saving Gear When go out Trigger Location.
Spriterfight replied to bong oh's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I think you can place the first script in the intPlayerServer.sqf where each player will have this action.Though and maybe if player not present in trigger area then your code.The problem is you implemented a complex system in your mission and we need the repo to understand what is your intention -
Trying make custom point& store system...
Spriterfight replied to bong oh's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You can copy paste it then and do it with naother vehicle. -
Trying make custom point& store system...
Spriterfight replied to bong oh's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Without error?Any unnecsesary element in syntax can cause error. -
Trying make custom point& store system...
Spriterfight replied to bong oh's topic in ARMA 3 - MISSION EDITING & SCRIPTING
let me check this in my game -
Trying make custom point& store system...
Spriterfight replied to bong oh's topic in ARMA 3 - MISSION EDITING & SCRIPTING
_spawnedvehicle = createVehicle["rhsusf_m1078A1P2_B_D_fmtv_usarmy",getMarkerPos""Truck"",[], 0, ""NONE""];try this you should have two ",between the truck name -
Identify position of soldier's head
Spriterfight replied to arma_max's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Try this https://community.bistudio.com/wiki/selectionPosition.Best regards! -
Trying make custom point& store system...
Spriterfight replied to bong oh's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I am glad to hear that.