Jump to content

splatsh

Member
  • Content Count

    123
  • Joined

  • Last visited

  • Medals

Community Reputation

10 Good

About splatsh

  • Rank
    Sergeant
  1. Thanks. ---------- Post added at 07:44 PM ---------- Previous post was at 07:28 PM ---------- It was no good with that check... I shoot it so its engine got damage, so the helo landed. And then the helo got no damage 1. I need to check if vehicle is alive or canMove And if it is not alive and can not move, then I need to do some code. But where to put that code in my code? And what to use: - do while... - If vehicle...
  2. It is just for delete stuff =) ---------- Post added at 07:05 PM ---------- Previous post was at 07:04 PM ----------
  3. I have this right now: // Code with spawn of vehicle // " // " // " // Code with creation of wayoints // " // " // " // Code with waypoint 2 // Here I have one setWaypointStatements ["true","TheEnd=1;"]; // " // " // " // Code with delete stuff if (TheEnd == 1) then { Delete all stuff }; Now, how can I at best way check if my spawned stuff is alive all the way from start to the end? 1) Create a trigger to check it 2) With other code to check it (what kind of code can I use then)
  4. Oh, thanks, I will try it out later =) Thanks =)
  5. I have a code that is called by player. Then the code will create a marker in front of player and the helo is landing at that marker. But if I am in a big town or in a heavy forest, then the helo will allways try to land at the marker and allways chrash. So how can I get the helo to land on safe ground?
  6. Nice, thanks. Now I can build some nice support =)
  7. This code will spawn one MtvrRefuel on my transporthelo in air: _spawntype = [position transporthelo, 0, "MtvrRefuel", WEST] call bis_fnc_spawnvehicle; 1) How to do if I want the MtvrRefuel to spawn 5 meter under the transporthelo? Can my transporthelo fly with this MtvrRefuel attached with attachTo command? If yes then: 2) How to attach this MtvrRefuel to this transporthelo, so its attached like 5 meter under the transporthelo with code? 3) How to release this MtvrRefuel from transporthelo with code?
  8. deleteWaypoint work fine =) Thanks
  9. If I give a medic a support waypoint with: wp08 = _spawngroup addwaypoint [_cpos, 0]; // Position player wp08 setwaypointtype "SUPPORT"; wp08 setWaypointSpeed "FULL"; wp08 setWaypointStatements ["true",""]; How to cancel that wayoint and give it one other waypoint, one "MOVE" waypoint for example? I did try this, but it did not work: wp09 = _spawngroup addwaypoint [_cpos, 10]; // Position player wp09 setwaypointtype "MOVE"; wp09 setWaypointSpeed "FULL"; wp09 setWaypointStatements ["true",""];
  10. I have now remaked my code and after the help I got from you I got this to wirk fine now, and I got it all to work as I wanted. Thanks My code are: call_medic.sqf menuID0_7 = _unit addaction ["Cancel Medic", "scripts\request\medic\cancel.sqf", [transporthelo, _spawngroup, _chGroup], 1, false, true, "", ""]; cancel.sqf _unit = _this select 0; // who called it. _position = (_this select 3) select 0; // Helo position _spawngroup = (_this select 3) select 1; // Group with medic _chGroup = (_this select 3) select 2; // Helo pilot group DeleteAll = 0; HomeReady = 0; hint "Medic team returning to base!"; // Assign group to helo {_x assignAsCargo _position;} forEach Units _spawngroup; // Create waypoint to get group inside helo wp03 = _spawngroup addwaypoint [_position, 10]; wp03 setwaypointtype "GETIN NEAREST"; wp03 setWaypointStatements ["true","HomeReady=1"]; waitUntil {HomeReady == 1}; // Create waypoint to get helo to fly home wp04 = _chGroup addwaypoint [getMarkerPos "hStart", 10]; wp04 setwaypointtype "MOVE"; wp04 setWaypointStatements ["true","DeleteAll=1; {deleteVehicle _x} forEach crew transporthelo; deletevehicle transporthelo;"]; waitUntil {DeleteAll == 1}; deleteMarker hStart; // Delete marker. hint "Medic team are ready for new orders!" Thanks for the assist and help. And I am sure this code can get better and so on, but it works anyway so I am happy, feel free to make it better if you want to =)
  11. I am sorry, but that did not work =/
  12. Oh sorry, I mean cancel.sqf =) And I have this in my code: _ch = [[_start select 0, _start select 1, 50], _flightPath, _chopperType, side _unit] call BIS_fnc_spawnVehicle; transporthelo = _ch select 0; _chGroup = _ch select 2; _ch select 0 setVehicleInit "transporthelo = this; this setVehicleVarName ""transporthelo"""; But I don't have any like that for my group of medics, I use _spawngroup = [_start, WEST, ["US_Soldier_TL_EP1", "US_Soldier_MG_EP1", "US_Soldier_Medic_EP1", "US_Soldier_Medic_EP1", "US_Soldier_Medic_EP1", "US_Soldier_Medic_EP1"],[],[],[],[],[],180] call BIS_fnc_spawnGroup; And my waypoints is working fine wp01 = _chGroup addwaypoint [_landPos, 0]; wp01 setwaypointtype "TR UNLOAD"; wp01 setWaypointStatements ["true","MedicOut=1;transportHelo land ""LAND"""]; waitUntil {MedicOut == 1}; wp02 = _spawngroup addwaypoint [_cpos, 10]; wp02 setwaypointtype "MOVE"; wp02 setWaypointSpeed "FULL"; wp02 setWaypointStatements ["true","MedicReady=1"]; And I am at this part right now waitUntil {MedicReady == 1}; hint "You can now cancel your support medic team!"; menuID0_7 = _unit addaction ["Cancel Medic", "scripts\request\medic\cancel.sqf", ["_transporthelo", "_spawngroup"], 1, false, true, "", ""]; And the last part is not working cancel.sqf _unit = _this select 1; _transporthelo = (_this select 3) select 0; _spawngroup = (_this select 3) select 1; hint "Medic team returning to base!"; {_x assignAsCargo _transporthelo; _x action ["getIn", _transporthelo]} foreach units _spawngroup;
  13. Well, I think that is that I am trying to find out and I did think that my addAction could tell cancel_medic.sqf Is that wrong? How does the cancel_medic.sqf file know what _trasporthelo and _spawngrop is then? =)
  14. I am playing with som stuff, and now I am trying to build one support script that will fly in some medics and so on.. And to get my medics into the chopper I use this call_medic.sqf {_x assignAsCargo _transporthelo; _x moveInCargo _transporthelo} forEach Units _spawngroup; Now the transporthelo is flying to me and land and the medics are coming to me (player) So far so god... Now I have done one addAction to get cancel on my medics, and I want to let them go inside this chopper again and the chopper will lift of and go home. menuID0_7 = _unit addaction ["Cancel Medic", "scripts\request\medic\cancel.sqf", [], 1, false, true, "", ""]; cancel_medic.sqf _unit = _this select 0; // who called it. hint "Medic team returning to base!"; {_x assignAsCargo _transporthelo; _x action ["getIn", _transporthelo]} foreach units _spawngroup; How do I get right arguments in my addAction to get my code to work proper in cancel_medic.sqd file?
×