Jump to content

Spriterfight

Member
  • Content Count

    171
  • Joined

  • Last visited

  • Medals

Everything posted by Spriterfight

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

    HELP Check if unit is in position

    When does ready fires actually?When a unit is at his position?
  8. 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
  9. I have 3 sector and want to select the nearest to a sepcific group how can i achieve this beside using BIS_fnc_nearestPosition
  10. 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!
  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 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
  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
  14. 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
  15. How can i set "B_Parachute_02_F" ,to not open until certain hegiht?I thought i could disable the parachute opening animation.
  16. 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!
  17. 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
  18. You can copy paste it then and do it with naother vehicle.
  19. Without error?Any unnecsesary element in syntax can cause error.
  20. let me check this in my game
  21. _spawnedvehicle = createVehicle["rhsusf_m1078A1P2_B_D_fmtv_usarmy",getMarkerPos""Truck"",[], 0, ""NONE""];try this you should have two ",between the truck name
  22. Try this https://community.bistudio.com/wiki/selectionPosition.Best regards!
×