Jump to content

goliath86

Member
  • Content Count

    454
  • Joined

  • Last visited

  • Medals

Everything posted by goliath86

  1. goliath86

    Medevac Module

    It's very strange. I have no CTD in all mine testing. I use both vanilla ArmA 2 and ArmA 2 with ACE2 and GL4 and I haven't experienced any CTD. I'll test it more and more to verify it. ;) Thanks Manzilla ---------- Post added at 09:34 AM ---------- Previous post was at 09:31 AM ---------- Thank you CyOp for your report! I'll check it out the throwing action to fine tuning it. I have look at yours PM, good work CyOp! It's strange that you couldn't extract the pbo file. But not worry, I'll send you the code so you can help me in bug finding and tuning ;) Thank you CyOp!! :D
  2. goliath86

    Medevac Module

    Good news soldier! When you have finished your work I will be very happy to implement it :D
  3. goliath86

    Medevac Module

    Updated version of Medevac module available on the first post.. ChangLog: - Added: corpsman, when dismount, join player's group for more control over it's capabilities (the corpsman will return in the helo, for RTB, when called Radio Bravo) - General optimization at the code
  4. goliath86

    Medevac Module

    Download link in first post.. Post here if you encounter any bugs or if you think it need some mod ;) Thank you guys!! :D
  5. goliath86

    Medevac Module

    I can release it immediatly if anyone want it to test and bug report to me ;)
  6. I've added all this script in one module that anyone can simply put in a mission via the editor (F7) and synchronize it with the player so he can has the Medevac call function in his menu..no more creating .sqf file to add in the mission folder..only a simple module to synchronize :D
  7. Hi CyOp! I've finally made the 'beta' version of this script (I've updated the script in mine previous post). Now the scripts correctly manage all (i hope! ;)) the events that may occur during a game using these scripts. Maybe, if I will not find others bugs, I will add some more to this scripts (more animation, better radio chatter etc.). For now I will test it for a while. I hope I helped you. Goliath
  8. I've modified the script above..unit will now dismount without problem (getting killed by the helo hovering too high)..added new animation for throw the smoke..and manage the soldier1's death..Now I'm finishing to manage even the helicopter's destruction..It works fine for me..;)
  9. Hi CyOp! I've edited the above script so soldiers don't die when dismount the chopper. The radio chatter is always upper case..if you don't like it then you may comment out the code player sideChat "....." so you don't receive any radio messages.. BTW the script is WIP ;)
  10. goliath86

    SOM - Activation

    Yes, this code works! I have tested it a lot! With this code you DON'T need to put the SOM module in the mission editor because the module is created at the trigger activation (i.e. on Radio Alpha trigger activation). try this: 1.put in editor a GameLogic object and put in its initline this: beta = group this 2.put a unit (player) in the editor 3.put a trigger (Radio Alpha activation) and in its 'On activation' field write this code: "SecOpManager" createUnit [[0,0,0], beta, "som1 = this; som1 synchronizeObjectsAdd [player]"]; som1 setVariable ["settings", [["ambush","attack_location","defend_location","destroy"], true, ["Razor", ["Razor"], "H.Q.", ["HQ"]], 60, false, 10, 1, [400, 700]]]; That's it. Call in Radio Alpha (0-0-1) and after about 60 seconds from the trigger's activation you will start to receive the Secondary Ops. ;) It works for me.
  11. Hi guys! Here it is mine working code. It still a WIP but for now it works very well: write in a .sqf file named 'heli.sqf' the following code: //********************************************************************************* //heli.sqf //this script permit to call a medevac chopper that will go to the player, //a corpsman dismount the chopper and willo go near the player position //to heal all soldiers at player command //********************************************************************************* if (start == 1) then { //check if this script is already active created = 0; start = 0; //do not permit that another activation of this script can be launched before its end ready = 0; //permit the 'Return to base' action of the mh60s action1 = 0; //initialize action1 variable //initial radio messages player sideChat "HQ we need medic support, over"; sleep 4; PAPABEAR=[West,"HQ"]; PAPABEAR SideChat "Roger that! Helicopter medic support sended at your coordinates. ETA 1 minute"; sleep 4; player sideChat "Roger HQ. Over"; //creating western groups beta = createGroup west; alpha = createGroup west; charlie = createGroup west; //-------------------------------------- Create Units -------------------------------------------- uh60 = createVehicle ["MH60S", getMarkerPos "marker1", [], 0, "FLY"]; //create an empty mh60s uh60 addEventHandler ["Engine", {scrip = _this execVM "rescue.sqf"}];//eventHandler that check if helo touches ground (destroyed or heavily damaged) uh60 addEventHandler ["killed", "terminate scrip; hint 'Medevac helicopter is blowned up'; terminate null0; start = 1"]; //add a killed event handler to the chopper soldier1 = beta createUnit ["FR_OHara", getMarkerPos "marker1", [], 0, "NONE"]; //create the corpsman soldier1 moveInCargo uh60; //embark soldier1 in the mh60s soldier1 addEventHandler ["killed", {_this execVM "aborted.sqf"}]; soldier2 = beta createUnit ["USMC_Soldier_GL", getMarkerPos "marker1", [], 0, "NONE"]; //create a unit soldier2 moveInCargo uh60; //embark soldier2 in the mh60s soldier3 = beta createUnit ["USMC_Soldier_MG", getMarkerPos "marker1", [], 0, "NONE"]; //create a unit soldier3 moveInCargo uh60; //embark soldier3 in the mh60s pilot1 = beta createUnit ["USMC_Soldier_Pilot", getMarkerPos "marker1", [], 0, "NONE"]; //create a pilot for mh60s pilot1 moveInDriver uh60; //embark pilot1 in the mh60s pilot2 = beta createUnit ["USMC_Soldier_Pilot", getMarkerPos "marker1", [], 0, "NONE"]; //create a co-pilot for mh60s pilot2 moveInGunner uh60; //embark pilot2 in the mh60s //-------------------------------------- Create waypoints ---------------------------------------- _wp1 = beta addWaypoint [position player,0]; //add a waypoint at the pilot which moves nearby the player position [beta, 1] setWaypointType "MOVE"; [beta, 1] setWaypointSpeed "FULL"; //[beta, 1] setWaypointStatements ["true", ""]; //indicates when the helo is nearby the player position waitUntil{uh60 in ((getPos player) nearObjects ["MH60S",1000])}; //when the helo is nearby the player pilot1 sideChat "We are near your last position, throw a smoke grenade so we can easily find your position, sir"; action1 = player addAction ["Throw smoke", "throwing.sqf"]; waitUntil{created == 1}; sleep 4; pilot1 sideChat "We see the purple smoke, sir"; sleep 3; pilot1 sideChat "Approaching to landing zone"; _wp2 = beta addWaypoint [position player,0]; //add a waypoint at the mh60s to get near the player position [beta, 2] setWaypointType "UNLOAD"; [beta, 2] setWaypointSpeed "FULL"; //don't allow soldier to gat damage when dismount soldier1 allowDamage false; soldier2 allowDamage false; soldier3 allowDamage false; //-------------------------- corpsman disembarked ------------------------------------------- waitUntil{(getPosATL soldier1) select 2 < 0.5}; //wait the helo flying in height below 2m before moving the corpsman //re-allow soldier to get damage soldier1 allowDamage true; soldier2 allowDamage true; soldier3 allowDamage true; _trg = createTrigger["EmptyDetector",[0,0,0]]; //create a radio trigger to abort the medevac mission _trg setTriggerArea[5,5,0,false]; _trg setTriggerActivation["BRAVO","PRESENT",false]; _trg setTriggerStatements["this", "ready = 1", ""]; _trg setTriggerText "Return to base"; pilot1 sideChat "Heli support in position sir!"; soldier1 moveTo (position player); //move the corpsman nearby the player soldier1 setUnitPos "Middle"; [soldier2, soldier3] join charlie; [pilot1, pilot2] join alpha; //pilots join a dummy group to prevent the mh60s go into formation _wps1 = charlie addWaypoint [position uh60,0]; //units guard the landing point of the mh60s [charlie, 1] setWaypointType "MOVE"; [charlie, 1] setWaypointBehaviour "SAFE"; [charlie, 1] setWaypointCompletionRadius 10; soldier2 setUnitPos "Middle"; soldier3 setUnitPos "Middle"; waitUntil{ready == 1}; //wait orders from player to get in the mh60s _wp3 = beta addWaypoint [position uh60,0]; //add a waypoint at the corpsman to get in the mh60s after doing his job [beta, 3] setWaypointType "GETIN"; [beta, 3] setWaypointSpeed "FULL"; waitUntil{soldier1 in (crew uh60)}; //wait soldier1 to get in the mh60s [pilot1, pilot2, soldier2, soldier3] join beta; //rejoin pilots and units to group beta (corpsman's group) sleep 5; uh60 flyInHeight 150; //restore the flying height of the mh60s _wp4 = beta addWaypoint [getMarkerPos "marker1",0]; //add a waypoint at the pilot to return to base [beta, 4] setWaypointType "MOVE"; [beta, 4] setWaypointSpeed "FULL"; [beta, 4] setWaypointStatements ["true", "deleteVehicle uh60; deleteVehicle pilot1; deleteVehicle pilot2; deleteVehicle soldier1; deleteVehicle soldier2; deleteVehicle soldier3; start = 1 hint 'Medevac Chopper available'"]; //set the helo to hovering instead landing } else { player sideChat "Heli support already active, sir.."; } then write in a .sqf file named 'throwing.sqf' the following code: //********************************************************************************* //throwing.sqf //this script make the player throwing (or putting down) a purple smoke grenade //to permit the mh60s to get the player's position //********************************************************************************* player removeAction action1; //remove the 'Throw smoke' action from the player's menu player sideChat "Roger that! I'm throwing now the smoke grenade, over"; sleep 1; //pause to simulate the take of a grenade from the backpack //throwing the smoke grenade player addMagazine "SmokeShellPurple"; player selectWeapon "SmokeShellMuzzle"; player fire "SmokeShellMuzzle"; //uncomment the three lines below (and comment the three lines above!) to put the smoke grenade instead throwing //player playMove "AinvPknlMstpSnonWnonDnon_3"; //play the put animation for the smoke grenade //sleep 2; //_smoke = "SmokeShellPurple" createVehicle (position player); //create the smoke grenade sleep 6; //pause to simulate that pilot of the mh60s wait to see the smoke before landing created = 1; write another file named 'aborted.sqf' and put in it this code: //********************************************************************************* //aborted.sqf //this script is activated only when the corpsman dead and make the helicopter //to return to base and make correctly ending all previous scripts //********************************************************************************* if(alive uh60) then{ //check if mh60s is still alive sleep 3; deleteVehicle soldier1; //delete the corpsman's model _way_count = waypoints beta; //array that countain all the references about beta's waypoints terminate null0; //terminate the 'heli.sqf' script { deleteWaypoint _x; //delete all the waypoints for beta } forEach _way_count; [pilot1, pilot2, soldier2, soldier3] join beta; // regroup all units _wp8 = beta addWaypoint [position uh60,0]; //make all the units to get in the mh60s if eventually dismounted _wp8 setWaypointType "GETIN"; _wp8 setWaypointSpeed "FULL"; player removeAction action1; //remove the Throw Smoke action hint "corpsman is dead..medevac is returning to base"; _wpret = beta addWaypoint [getMarkerPos "marker1",0]; //make the helo to RTB _wpret setWaypointType "MOVE"; _wpret setWaypointStatements ["true", "deleteVehicle uh60; deleteVehicle pilot1; deleteVehicle pilot2; deleteVehicle soldier1; deleteVehicle soldier2; deleteVehicle soldier3; start = 1"]; } else{ //if mh60s not alive terminate the 'heli.sqf' scripts terminate null0; player removeAction action1; start = 1; } then write the last file named 'rescue.sqf' and write in it: //********************************************************************************* //rescue.sqf //this script is activated only when the chopper is heavily damaged and make //an emergency landing but it will not blown up //********************************************************************************* waitUntil{(getPosATL uh60) select 2 < 0.5}; //wait the chopper to touch ground sleep 7; //pause to wait if heli blown up against some objects if(!alive uh60) then {terminate scrip}; soldier1 removeAllEventHandlers "killed"; //remove all killed event handlers to the corpsman uh60 removeAllEventHandlers "killed"; //remove all killed event handlers to the mh60s player removeAction action1; //remove the eventually present player action "Throw smoke" [pilot1, pilot2, soldier2, soldier3] join beta; // regroup all units _way_count = waypoints beta; //array that countain all the references about beta's waypoints terminate null0; //terminate the 'heli.sqf' script { deleteWaypoint _x; //delete all the waypoints for beta } forEach _way_count; doStop [pilot1, pilot2, soldier2]; //pilots and one unit remain to guard the crash site if(!(soldier1 in ((position player) nearObjects ["SoldierWB", 200]))) then{ //check if survived units are NOT near player's position doStop [soldier1, soldier3]; }; hint "Medevac helo is heavily damaged..crash site marked on your map"; //create a red marker at the crash site _mkr = createMarker ["marker2", position uh60]; "marker2" setMarkerShape "ELLIPSE"; "marker2" setMarkerBrush "SOLID"; "marker2" setMarkerSize [50, 50]; "marker2" setMarkerColor "ColorRed"; sleep 4; hint "Maybe some unit are still alive..check the crash site area if you can"; sleep 10; start = 1; then write in the initfield area of the player's unit the line: start = 1 then put a trigger in the editor which is activated by Radio Alpha (or whatever you want) and put in its 'On activation' field this code: null0 = [] execVM "heli.sqf" now, put a marker in the editor (of any type) far from the player and name it exactly marker1 (it's the location where the helicopter will be spawned) At Radio Alpha calling this code create an helicopter and its crews and move the helicopter near the position of the player; then the player give the action 'Throw smoke'; only after player throw the smoke, the helicopter approach near the player itself; after this the corpsman (soldier1) disembark and run to the player; even other two soldiers disembark from the helicopter to cover the landing zone and they stay at the landing zone. After that, if the player activate Radio Bravo (which is created dinamically via the script, so you DON'T need to put a Radio Bravo trigger in the editor!) the corpsman remount in the helicopter, even the two other soldier (only after the corpsman is mounted: the first give the correct cover at the corpsman and then they mount in the heli; it's a correct military procedure) and return to base (the helicopter and all its crews will be deleted when far from the player). It's already possible to make this script to work with mine previous script (on the first page of this thread) with some little modification at this scripts. Otherwise it works very well. P.S. the helo do not land but hover over the landing zone and wait for the corpsman to remount.
  12. The script is near to be done and it works very well till now..with mine scripts is possible to go near the medics and receive the action "heal" like in ArmA 1 or OFP in your normal menu..if you go far from medics this action disappear..its attached to the medic..
  13. Do not worry CyOp..I'm still finishing a little and simple script that allow you to call in the helo, disembark the medic (with the helo hovering and NOT landing ;) ), re-mount the medic and the helo return to base..:D
  14. The script folder is recommended (only to have all the scripts inside a folder for some type of order ;)). If you put a script inside a folder you have to modify the code above (i.e. "folder\heal.sqf" and "folder\healing.sqf" but NOT "folder\Heal" in the addAction command because it's only a string and not a path). Try the code above first without putting the .sqf files in a folder then put these files and the other yours in a folder inside the mission's folder in 'mydoc\ArmA 2\missions\yourmissionname'..then in the editor save the mission and export it like 'SP mission' and the editor will create a .pbo file and put automatically in the right ArmA 2's folder so you can find your mission under the SP mission when you start ArmA 2. The .pbo file contain all the mission's files like scripts, sounds etc.
  15. Hi CyOp! To add a heal action at any unit you want (if not alredy a medic) try this code: create a .sqf file and name it 'healing.sqf' and write in it the following code: { if ((getDammage _x) > 0) then { while {((getDammage _x) > 0) && _x != medic} do { scopeName "loop1"; if(_x in ((getPos medic) nearObjects ["SoldierWB",2])) then //Check if the unit is still nearby the 'medic' in a 2 meters radius from it { _x setDammage ((getDammage _x)-0.1); titleText [format ["Healing %1", name _x],"PLAIN"]; //Display the healing action titleFadeOut 2; sleep 4; //Show message at the end of the heal if ((getDammage _x) <= 0) then { titleText [format ["Soldier %1 ready!",name _x],"PLAIN"]; sleep 5; }; } else { breakOut "loop1"; //exit from while loop because the unit is moved far from the medic }; }; } else { if (_x != medic) then { titleText [format ["The soldier %1 don't need to be healed",name _x],"PLAIN"]; titleFadeOut 4; }; }; } forEach container; healaction = 0; then write another .sqf file and name it 'healer.sqf' and write in it the following code: container = []; //inizialization of an empty array if (healaction == 0) then //avoid multi-healing action at the same man { _trgger = createTrigger ["EmptyDetector", getPos medic]; _trgger setTriggerArea [2,2,0,false]; //heal all West units that are nearby the medic in a 2 meters radius _trgger setTriggerActivation ["WEST","PRESENT",false]; _trgger setTriggerStatements ["this", "_counter = 0; healaction = 1; {container set [_counter,_x]; _counter = _counter + 1;} forEach thislist; null0 = [] execVM 'healing.sqf';", "titleText ['DEBUG: End Trigger', 'PLAIN'];"]; } else { hint "Heal already started"; }; then in the init field of the unit that you want to be a medic put this code: healaction = 0; _action = this addAction ["Heal","healer.sqf",[], -1, true, true, "", "_target == medic"]; and remember to name the medic unit 'medic' in the editor. This code make the medic unit to completely heal all units which are nearby the medic itself in a radius of 2 meters. This code don't make the medic play an animation but it can be easily implemented. ;) It display on the screen many messages that you can delete or modify. It was tested by me and it works. :)
  16. goliath86

    SOM - Activation

    Hi Frencherman! To activate the SOM manager on an event put a trigger in the editor that activate itself when a certain condition is reached (i.e. when the russian radar-station is blown up)..then put in its 'On Activation' field this code: "SecOpManager" createUnit [[0,0,0], beta, "som1 = this; som1 synchronizeObjectsAdd [player]"]; som1 setVariable ["settings", [["ambush","attack_location","defend_location","destroy"], true, ["Razor", ["Razor"], "H.Q.", ["HQ"]], 60, false, 10, 1, [400, 700]]]; this little piece of code create a SOM manager, synchronize it to the player and initialize it with a few Secop mission (not all). In the editor you have to put even a Game Logic Object (wherever you want) and put in its init field this line: beta = group this this is a must to do because the createUnit command create the defined object (in your case the SecOpManager) only if it can add that object to an existing group (in this example at the group named beta). P.S. remember: this code works well in SinglePlayer only..for MP games there are some changes to do ;)
  17. Hy Monotone! Try the command 'disableUserInput true'..it will disable the user input during cutscenes..then you have to enable the user input again (disableUserInput false).. You can find a more complete explanation here: http://community.bistudio.com/wiki/disableUserInput :)
  18. goliath86

    Ambient Combat Module

    Ok, now I understand. It seems that the ACM module have some problems with that function (addGroupsClassesFunc) in MP games :confused:..it was discussed some posts ago.. with that function enabled the ACM module seems to don't start in MP games.. without that function the module works fine even in MP..
  19. goliath86

    Ambient Combat Module

    Why do you have two instances (ACM1, ACM2) of the ACM module?
  20. goliath86

    Ambient Combat Module

    You have to use the elliptical marker and/or the rectangular marker because you need to mark an area and the use of the icon marker has not sense at all. In your case you have to create a marker that cover all the US base and naming it BIS_ACM_1 If you have other areas which you don't want the ACM module spawn units in it, you have to create another marker (rectangular or elliptical) and naming it BIS_ACM_2 and so on.... to kill enemy units that enter in these areas you can create triggers (of the same dimensions of the marker and one for every markers you have created) and make it to activate by 'OPFOR', 'REPEATEDLY' and in the 'On Activation' field put the follow line: {_x setDamage 1} forEach thislist the code above lets the enemy units, which enter in the marker's area, to die immediately
  21. goliath86

    Ambient Combat Module

    Yes, it is possible and more easy than you expect ;) You only need to put markers in the editor (where you DON'T want the ACM module spawn units) and name it exactly: BIS_ACM_X where X must be a number from 1 and you can't skip any numbers. Here's the 'official' explaination to blacklisting areas: you can find all the ACM's functions here: http://community.bistudio.com/wiki/Ambient_Combat_Manager_-_Functions
  22. Good workadamdf! :D for the despawn try only this code: {deleteVehicle _x} forEach thislist It delete both the Hercules and the crews
  23. goliath86

    Ambient Combat Module

    Sorry, mine fault :rolleyes: the code must be: [bIS_ACM,[b][[/b]"RU_TankPlatoon", "RU_MechInfSquad_1"[b]][/b]] call BIS_ACM_removeGroupClassesFunc; there must be present the "[ ]" in the group definition..
  24. Hi all! Let's try this: write in the initfield of the uav this line: nul = this execVM "scripts.sqf" then write an .sqf file and name it 'scripts.sqf' and write in it this code: waitUntil{ ((getPos _this) select 2)<9 }; //try to raise or fall the number '9' (the height of the uav before it touches the ground) _this setVelocity [0,0,0]; _this setPos [(getPos _this) select 0, (getPos _this) select 1, 0]; _this allowDamage false; It work for me, I've tested it for a few. It don't allow the UAV to get damage when it touches the ground. Maybe you have to raise or fall the number '9' in the waitUntil command but I've seen that 9 seems to be the perfect height.
  25. goliath86

    Ambient Combat Module

    If you want to add a squadron of AH1Z, for example, you have to write in the ACM initfield: [acm1, "USMC_AH1ZSquadron"] call BIS_ACM_addGroupClassesFunc; where 'acm1' stands for the name of the ACM module you have to put in the editor (and name it exactly acm1) and "USMC_AH1ZSquadron" (that you can find under this site http://community.bistudio.com/wiki/Ambient_Combat_Manager_-_Group_types) is a USMC Squadron of AH1Z helicopters. otherwise if you don't want the spawn of russian tanks platoon you have to write in the initfield of the ACM module: [acm1,"RU_TankPlatoon"] call BIS_ACM_removeGroupClassesFunc; and go on with all groups you want/don't want to spawn by the ACM module. A list of the common groups in ArmA2 you can find at this site http://community.bistudio.com/wiki/Ambient_Combat_Manager_-_Group_types but is already possible to add groups from addons (you only have to know the group's name, normally writed in ReadMe or similar files in the addon)
×