Jump to content

semedar

Member
  • Content Count

    65
  • Joined

  • Last visited

  • Medals

Posts posted by semedar


  1. Add the action from the beginning, remove the trigger and put in a condition instead.

    player addAction [("<t color=""#FFFF00"">" + ("SATCOM") +"</t>"), "pxs_satcom_oa\start_satellite.sqf",[],1,false,true,"","!alive radar"];

    Ah! Sweet man, thanks! :D

    EDIT:

    I tried using the above example but I can't seem to get it to work. =\

    I'm using a Save Layout respawn and tried this:

    WaitUntil{not isNull player || isDedicated};
    
    player addEventHandler ["Killed",{
    player spawn {
    
    	_unit = _this;
    
    	private ['_magazines','_weapons','_backpack','_backpackweap','_backpackmags'];
    	if(isNil "savedloadout") then {
    		_weapons = weapons _unit;
    		_magazines = magazines _unit;
    		_backpack = typeOf unitBackpack _unit;
    		_backpackmags = getMagazineCargo unitBackpack _unit;
    		_backpackweap = getWeaponCargo unitBackpack _unit;
    	} else {
    		_weapons = savedloadout select 0;
    		_magazines = savedloadout select 1;
    		_backpack = savedloadout select 2;
    		_backpackmags = savedloadout select 3;
    		_backpackweap = savedloadout select 4;
    	};
    
    	WaitUntil{alive player};
    	[color="Red"]player addAction [("<t color=""#FFFF00"">" + ("SATCOM") +"</t>"), "pxs_satcom_oa\start_satellite.sqf",[],1,false,true,"","!alive Radar"];[/color]
    	removeAllWeapons player;
    	removeAllItems player;
                   removeBackpack player;
    	{player addMagazine _x} foreach _magazines;
    	{player addWeapon _x} foreach _weapons;
    	if (primaryWeapon player != "") then {
          			player selectWeapon (primaryWeapon player);
            	_muzzles = getArray(configFile>>"cfgWeapons" >> primaryWeapon player >> "muzzles"); // Fix for weapons with grenade launcher
    	        player selectWeapon (_muzzles select 0);
    	};
    	if(_backpack != "") then {
    		player addBackpack _backpack; clearWeaponCargo (unitBackpack player); clearMagazineCargo (unitBackpack player);
    
    		for "_i" from 0 to (count (_backpackmags select 0) - 1) do {
    			(unitBackpack player) addMagazineCargo [(_backpackmags select 0) select _i,(_backpackmags select 1) select _i];
    		};
    		for "_i" from 0 to (count (_backpackweap select 0) - 1) do {
    			(unitBackpack player) addWeaponCargo [(_backpackweap select 0) select _i,(_backpackweap select 1) select _i];
    		};
    	};
    };
    }];
    
    

    EDIT 2: Hah nevermind ;) User error. :whistle:


  2. Anyway someone can help me out by having a Backpack Heap dispense backpacks with the addAction command?

    Example: Walk up to a backpack heap and a bunch of Add Actions pop up with either "Get US Assault Pack" which in turns removes your current backpack (if any) and gives you a "US_Assault_Pack_EP1". With an option to get any backpack you want.

    I've searched and found someone did something similar but I couldn't figure it out since it was heavily embedded in his mission and couldn't port it into mine.


  3. Did you put it in the right mission folder? Lol OA uses the same ArmA2 mission folder.

    Example: C:\Users\Semedar\Documents\ArmA 2\missions\Silent_Woods.Chernarus

    Not: E:\arma 2 operation arrowhead\Missions

    My ArmA2 OA directory is most likely very different from yours. But only because I have it on my SSD so I doesn't use the whole Program Files folder just straight the the cheese. :rolleyes:


  4. I'm trying to spawn a unit via a trigger in my mission with:

    nul = this execVM "UPS_Woods_Spawn.sqf"; 
    

    USP_Woods_Spawn.sqf

    "Ins_Soldier_1" createUnit [getMarkerPos "UPS_Woods", "nul=[this,""UPS_Woods"",""random"",""nofollow"",""min:"",40,""max:"",50,""delete:"",300] execVM ""ups.sqf"";"]
    

    I've put double quotes on there since I was reading up on trying to figure it out and someone suggested using double quotes.. :confused:

    I also tried:

    "Ins_Soldier_1" createUnit [getMarkerPos "UPS_Woods", "nul=[this,"UPS_Woods","random","nofollow","min:",40,"max:",50,"delete:",300] execVM "ups.sqf";"]
    


  5. Ok it's getting very frustrating for me to figure this out :confused:

    1. The script I'm using to spawn a group does in fact work

    2. This is the error I get: KRON_Flag.jpg

    I found out it's from the UPS script.

    What I'm doing to try to get this script working:

    I'm trying to spawn an enemy group from my Init.sqf for now to just test and find how to add a group and make them init the ups.sqf: [this,"marker"] execVM "ups.sqf"

    From my init.sqf:

    //Spawns Group With UPS
    [] execvm "ups1spwn.sqf";
    Sleep 1;
    [_grp,"ups1spwn"] execVM "ups.sqf";

    From ups1spwn.sqf:

    //////////////////////////////////////////////////////////////////
    // Function file for Armed Assault
    // Created by: Semedar
    //exec: [] execvm "ups1spwn.sqf"
    //////////////////////////////////////////////////////////////////
    
    _grp = Creategroup EAST;
    
    _grp createUnit ["SquadLeaderE", getMarkerPos "GrpM", ["GrpM"], 5, "FORM"];
    _grp createUnit ["SoldierEB", getMarkerPos "GrpM", ["GrpM"], 2, "FORM"];
    _grp createUnit ["SoldierEB", getMarkerPos "GrpM", ["GrpM"], 2, "FORM"];
    _grp createUnit ["SoldierEG", getMarkerPos "GrpM", ["GrpM"], 2, "FORM"];
    _grp createUnit ["SoldierEMG", getMarkerPos "GrpM", ["GrpM"], 2, "FORM"];
    _grp createUnit ["SoldierEAT", getMarkerPos "GrpM", ["GrpM"], 2, "FORM"];
    _grp createUnit ["SoldierESniper", getMarkerPos "GrpM", ["GrpM"], 2, "FORM"];

    I have a rectangle marker named GrpM to spawn the units there. I'm trying to make them follow the ups script from the init.sqf

    So, to summarize:

    Does anyone know how to spawn an enemy group and make them init: [this,"marker"] execVM "ups.sqf" And make them spawn with a trigger?

    If so, can you post detailed instructions?


  6. Can anyone help me with making a script that makes an enemy group and have them init the Urban Patrol Script that you can call in with a trigger? :confused:

    I'm doing it this way because my mission is big and I dont want a bunch of units already spawned in all over the map when the mission spawns. I want the groups to spawn and follow the UPS script when triggered by BLUFOR.

    I tried making egroup1.sqf

    ups1 is the marker, _egroup1 is the group name

    _grp = Creategroup EAST;
    
    _grp createUnit ["SquadLeaderE", getMarkerPos "GrpM", ["GrpM"], 5, "FORM"];
    _grp createUnit ["SoldierEB", getMarkerPos "GrpM", ["GrpM"], 2, "FORM"];
    _grp createUnit ["SoldierEB", getMarkerPos "GrpM", ["GrpM"], 2, "FORM"];
    _grp createUnit ["SoldierEG", getMarkerPos "GrpM", ["GrpM"], 2, "FORM"];
    _grp createUnit ["SoldierEMG", getMarkerPos "GrpM", ["GrpM"], 2, "FORM"];
    _grp createUnit ["SoldierEAT", getMarkerPos "GrpM", ["GrpM"], 2, "FORM"];
    _grp createUnit ["SoldierESniper", getMarkerPos "GrpM", ["GrpM"], 2, "FORM"];

    Then after that I tried to call it in but kept giving me errors. Any help would be greatly appreciated. :D

×