Jump to content

Spriterfight

Member
  • Content Count

    171
  • Joined

  • Last visited

  • Medals

Community Reputation

10 Good

About Spriterfight

  • Rank
    Sergeant

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. 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
  2. I put the function in the init.sqf is it bad practice?
  3. 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
  4. Spriterfight

    Bad ai pilot

    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
  5. Spriterfight

    HELP Check if unit is in position

    When does ready fires actually?When a unit is at his position?
  6. 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?
  7. 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
  8. I have 3 sector and want to select the nearest to a sepcific group how can i achieve this beside using BIS_fnc_nearestPosition
  9. 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!
  10. Spriterfight

    HELP With direction of object

    _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
  11. 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
  12. Spriterfight

    HELP How can i activate the trigger?

    I solved it with leader grp1 inArea thisTrigger && leader grp2 inArea thisTrigger && leader grp3 inArea thisTrigger && leader grp4 inArea thisTrigger && leader grp5 inArea thisTrigger
  13. 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
×