Jump to content

Darkside360

Member
  • Content Count

    14
  • Joined

  • Last visited

  • Medals

Community Reputation

10 Good

About Darkside360

  • Rank
    Private First Class
  1. Here is what I have I have a group of men hidden and only want them to reappear when a unit crosses into the trigger. In the group leaders init field I have this: Grp1 = Group this; {_x hideObject true} ForEach units group this Now when I have my unit cross into the trigger the group does not reappear. I put the exact same thing in the triggers activation but change true to false. I tried changing the name of "this" to Grp1 and still nothing. I'm not sure what to do.
  2. Well its not that I don't understand how they spawn, its that I don't understand the script file and where exactly to edit it to my liking. Here is one of the files // This script borrows some stuff from Norrins AI respawn script, so thanks to him for lessening my pain // ----------------------------------------------------------------------------------------------------- // !!!THIS SCRIPT USES THE BIS FUNCTION MODULE!!! Be sure to have one // // A NOTE ON THE LIMITATIONS OF THIS SCRIPT: It does not save vehicle name, so dont use them for complicated stuff... Or edit the script to save it. // The purpose of this script is to create easily manageable AI units for triggered "missions". Such as if you want an ambush to take place in a town, you // place the units like usual with the ordinary waypoints, add the proper init and place a trigger that set the "mission" to true. Units will be created and go about their buisness. // // V2 // - Added types of spawns: "once", "repeated", "wave" and "reset" // - Cleaned up the script to make use of functions, much shorter group scripts this way and easier to add new modes // - Can now be used on flying vehicles // - Made use of define to set the global trigger variable, easier user editing // - Made use of BIS functions, can now recreate groups of vehicles instead of just one (much less scripts running) // - Removed the need for a vehicle boolean // // V1 // - First basic script, place units in the editor and link to a spawn trigger //------------------------------------------------------------------------------------------------------ // General usage (init): nul = [this,"SPAWNTYPE",LIVES,DELAY] execVM "SCRIPT_GROUP_NAME.sqf"; // Example: nul = [this,"once"] execVM "group_one.sqf"; ---- Will spawn the editor unit based on the trigger in group_one script // Example: nul = [this,"repeated",4,30] execVM "group_one.sqf"; ---- Will spawn the editor unit based on the trigger in group_one script, then respawn it 4 times with a 30 second delay upon death // Example: nul = [this,"wave",5,60] execVM "group_one.sqf"; ---- Will spawn the editor unit once based on the trigger in group_one script, then respawn the entire group (regardless of deaths) 5 times 60 seconds between // Example: nul = [this,"reset",5] execVM "group_one.sqf"; ---- Will spawn the editor unit once based on the trigger in group_one script, then reset the trigger after a preset time (20 seconds default). The unit will be created when trigger is true again, maximum number of lives. // ----------------------------------------------------------------------------------------------------- if (!isServer) exitWith {}; // CHANGE THIS TRIGGER #define SPAWN_TRIGGER_VARIABLE fourth_group // CHANGE THIS TRIGGER #ifndef MURK_SPAWN_RUNONCE fnc_murk_deleteInfantry = compile preprocessFileLineNumbers "murkspawn_functions\fnc_murk_deleteInfantry.sqf"; fnc_murk_spawnInfantry = compile preprocessFileLineNumbers "murkspawn_functions\fnc_murk_spawnInfantry.sqf"; fnc_murk_deleteVehicle = compile preprocessFileLineNumbers "murkspawn_functions\fnc_murk_deleteVehicle.sqf"; fnc_murk_spawnVehicle = compile preprocessFileLineNumbers "murkspawn_functions\fnc_murk_spawnVehicle.sqf"; #endif #define MURK_SPAWN_RUNONCE #define WAITING_PERIOD 10 #define RESET_WAIT 20 _unit = _this select 0; _spawntype = _this select 1; _spawnlives = _this select 2; _spawndelay = _this select 3; // Check if its a vehicle _vehicle = false; _sim = getText(configFile >> "CfgVehicles" >> typeOf _unit >> "simulation"); if (_sim in ["airplane","helicopter","car","motorcycle","tank","APC"]) then { _vehicle = true; }; // AI variables _AI_varArray = []; _origposition = getPos _unit; _origdir = getDir _unit; _origside = side _unit; _unitsGroup = []; // Create a dummy group and copy the editor created waypoints to this group _newgroup = createGroup (side _unit); _newgroup copyWaypoints (group _unit); // This deletes the units, either infantry or vehicles if (_vehicle) then { _AI_varArray = [_unit] call fnc_murk_deleteVehicle; } else { _AI_varArray = [_unit] call fnc_murk_deleteInfantry; }; //------------------------------------------------------------------------ // Put the script on hold until the mission is active while { !SPAWN_TRIGGER_VARIABLE } do { sleep WAITING_PERIOD; }; //------------------------------------------------------------------------ // REPEAT MODE, ie basic respawn based on lives if (_spawntype == "repeated") then { while { _spawnlives > 0 } do { _oldGroup = _newgroup; if(_vehicle) then { _unitsGroup = [_newgroup,_AI_varArray] call fnc_murk_spawnVehicle; } else { _unitsGroup = [_origPosition,_newGroup,_AI_varArray] call fnc_murk_spawnInfantry; }; // This sleeps while the group still lives while {(count _unitsGroup) > 0} do { _remainingUnits = []; {if (alive _x) then {_remainingUnits = _remainingUnits + [_x]}} forEach _unitsGroup; _unitsGroup = _remainingUnits; sleep 2; }; _spawnlives = _spawnlives - 1; sleep _spawndelay; _newgroup = createGroup _origside; _newgroup copyWaypoints _oldgroup; }; }; // WAVE MODE, this is fairly simple, just sleep a while then respawn. Spawnlives in this case is number of waves if (_spawntype == "wave") then { while { _spawnlives > 0 } do { _oldGroup = _newGroup; if(_vehicle) then { _unitsGroup = [_newgroup,_AI_varArray] call fnc_murk_spawnVehicle; } else { _unitsGroup = [_origPosition,_newGroup,_AI_varArray] call fnc_murk_spawnInfantry; }; sleep _spawndelay; _spawnlives = _spawnlives - 1; _newgroup = createGroup _origside; _newgroup copyWaypoints _oldgroup; }; }; // RESET MODE, sleep a while then set the variable to false (even if you set it like 50 times over). Spawn lives is used to tick how many times its possible to reset. if (_spawntype == "reset") then { while { _spawnlives > 0 } do { _oldGroup = _newGroup; if(_vehicle) then { _unitsGroup = [_newgroup,_AI_varArray] call fnc_murk_spawnVehicle; } else { _unitsGroup = [_origPosition,_newGroup,_AI_varArray] call fnc_murk_spawnInfantry; }; sleep RESET_WAIT; SPAWN_TRIGGER_VARIABLE = false; while { !SPAWN_TRIGGER_VARIABLE } do { sleep WAITING_PERIOD; }; _spawnlives = _spawnlives - 1; _newgroup = createGroup _origside; _newgroup copyWaypoints _oldgroup; }; }; // ONCE MODE if (_spawntype == "once") then { if(_vehicle) then { _unitsGroup = [_newGroup,_AI_varArray] call fnc_murk_spawnVehicle; } else { _unitsGroup = [_origPosition,_newGroup,_AI_varArray] call fnc_murk_spawnInfantry; }; };
  3. I just use a trigger with no added scripts. Name your trigger whatever, then name the target whatever In act: (name of trigger) = "(ordinance)" createvehicle getPos (then name of target) Something I do is just take a dog, take away its health so its dead, then when your unit comes into the trigger area it'll detonate. Pretty much like the IED's in real life. Of course you can just have say a car come into the trigger area and have the target be the car. Same result. Example: bomb = "Bo_GBU12_LGB" createVehicle getPos Blastzone Just take away the parentheses but leave the quotes. I know its not what you asked but I find this easy.
  4. con is just true and act is just calling the script file
  5. Yeah I just did that, and I'm still quite lost. :confused:
  6. Eh, I don't even know where to begin with that one.
  7. I'm not sure what I'm doing wrong in the SQF file. Here is what I have. // [getMarkerPos "spawn"] execVM "randomspawn.sqf" private ["_pos", "_group"]; _pos = _this select 0; _group = createGroup GUER; "TK_GUE_Warlord_EP1" createUnit [_group, _pos, [], 0, "FORM"];
  8. So I just replace the "markertoAppearat" with the name of the marker I make? The unit I wanted to spawn would be the Takistani Militia. How would I specify that in the script exactly? Also is there a way to make them use a waypoint?
  9. I'm wanting to set up an ambush mission in a city but I'm not sure how to make the game spawn enemies when my unit crosses into a trigger. Is there a simple script or just init code to enter?
  10. Darkside360

    Error Message

    Whenever I start the game I get this message at the start and every time I place a unit in the editor. No Entry 'bin/config\cfgvehicles/usmc_soldier-pilot.scope' I just find it really annoying and would like to find a way to stop it. Any help appreciated.
  11. Darkside360

    T-72

    The only thing different to me was that the cheaper one is a NAPA tank and the more expensive one is a CDF tank. Maybe the CDF tank is tougher? Correct me if I'm wrong.
  12. Darkside360

    Digital or Boxed Copy?

    As much as I enjoy the smell of a new game, if it comes out on the 30th in stores, but available on Steam on the 26th, I'm going with Steam. A manual really isn't important. Any info in there that you may need to know I am sure someone will post it or you can just as easily learn as you go.
  13. What do you think about my computer? Processor: Intel Quad Core Q6600 2.4Ghz Video Card: Nvidia GeForce 8800GT 4GB of RAM Vista 32 bit Should it run ArmA 2 without problems?
×