Jump to content

Waffle_SS

Member
  • Content Count

    49
  • Joined

  • Last visited

  • Medals

Posts posted by Waffle_SS


  1. Is anyone else having issues with the secondary movement mode, moving multiple objects at the same time, and rotating an object around a user-defined axis? For all 3 of these functions, I have issues where the object will move far away. If I try to move multiple objects, they scatter about a 1km away and spread out from each other in random directions.

    EDIT - seems to be an issue with certain objects that breaks the functions for all objects.


  2. Is there a fix to make this script work again? Currently, you just slip and slide off of the ship.

    I found a temporary fix. I didn't test it on the custom ship, but it works with regular objects. In "attachToWithMovement.sqf" find (ctrl+f) (line 53)

    _attachThis setVelocity [
    _vel select 0,
    _vel select 1,
    (_vel select 2) + STICK
    ];

    and replace it with:

    _attachThis setVelocity [
    0,
    0,
    (_vel select 2) + STICK
    ];

    This seems to prevent the player from sliding after moving.

    • Like 1

  3. The addaction command is local to the client it runs on, meaning the script that adds the action to what you want has to be running on everyone's computer or they wont have it.

    http://community.bistudio.com/wiki/addAction

    Either put the addAction code in init.sqf, or have your "exec.sqf" executed by a trigger/unit initialization field. ex: execVM "exec.sqf"

    You can then use the "condition" parameter of addAction to show/hide based on true/false.


  4. If you want to save a single date, use a specific variable for it:

    timeStamp = date;
    sleep 1;
    hint str timeStamp;
    

    if you want to save multiple times and be able to add onto it, create an array:

    if (isNil "timeStamps") then {
    timeStamps = [];
    };
    
    timeStamps set [count timeStamps,date];
    sleep 1;
    hint format ["Timestamps: %1\nFirst timestamp: %2\nCurrent timestamp: %3",timeStamps,timeStamps select 0,timeStamps select (count timeStamps - 1)];
    


  5. init.sqf:

    clientCode = nil;
    "clientCode" addPublicVariableEventHandler {call (_this select 1)};
    

    trigger activation:

    clientCode = compile format ["hint '%1 has called for support'",player];
    publicVariable "clientCode";
    

    This was just off the top of my head (and will only work in multiplayer), so I can't confirm that 100%. This may help you if that doesn't work.

    http://forums.bistudio.com/showthread.php?172867-Simplest-to-broadcast-a-message-globally


  6. The coords of Stratis and Altis in ArmA 3 actually make them in spitting distance of each other. Last time I checked you could fly East from Stratis for about 4 minutes and you would "be" in Altis technically. They won't connect the two maps because they would have to decrease the detail of the overall map due to the limitations currently in place. If anything they will have a campaign setup so that once you are close enough to the other map, it go through a loading screen and place you in the correct position on the other map. I've already managed to do this in ArmA 3 Beta.


  7. _staticGunner = {
    private ["_gun","_group","_newUnit"];
    _gun = _this select 0;
    _group = _this select 1;
    while {alive _gun} do
    {
    	if (typeName(gunner _gun) != "OBJECT") then {
    		_newUnit = "RUS_Soldier_GL" createUnit [getMarkerPos "M2ai2",_group,"",1,"corporal"];
    		_newUnit moveInGunner _gun;
    		if (true) exitWith {};
    	};
    	sleep 1;
    };
    };
    

    // Adding HMMWV M2 enemy, static guns, and infantry to man them
    private ["_aiGroup","_aiGroup3"];
    _aiGroup = createGroup east;
    _aiGroup setVariable ["Mission",1,true];
    _aiGroup3 = createGroup east;
    _aiGroup3 setVariable ["Mission",1,true];
    
    // Adding group using spawnvehicle
    [getMarkerPos "devilsm21st",random 360,"BRDM2_INS",_aiGroup] call BIS_fnc_spawnVehicle;
    
    //Adding vehicle via createvehicle
    _veh = "HMMWV_M1151_M2_CZ_DES_EP1" createVehicle (getMarkerPos "devilsm21st");
    _veh addeventhandler ["fired",
    {
    	(_this select 0) setvehicleammo 1;
    	(_this select 0) setFuel 1;
    }
    ];
    sleep 0.5;
    
    _newUnit = "RUS_Soldier_GL" createUnit [getMarkerPos "M2ai1",_aiGroup,"",1,"Major"];
    _newUnit moveInDriver _veh;
    _newUnit = "RUS_Soldier_GL" createUnit [getMarkerPos "M2ai1",_aiGroup,"",1,"corporal"];
    _newUnit moveInGunner _veh;
    _newUnit = "RUS_Soldier_GL" createUnit [getMarkerPos "M2ai2",_aiGroup,"",1,"corporal"];
    _newUnit moveInCargo _veh;
    _newUnit = "RUS_Soldier_GL" createUnit [getMarkerPos "M2ai2",_aiGroup,"",1,"corporal"];
    _newUnit moveInCargo _veh;
    _aiGroup setVariable ["Mission",1,true];
    //set skills for the above units
    {
    _x setSkill ["aimingAccuracy",1];
    _x setSkill ["aimingShake",1];
    _x setSkill ["aimingSpeed",1];
    _x setSkill ["endurance",1];
    _x setSkill ["spotDistance",1];
    _x setSkill ["spotTime",1];
    _x setSkill ["courage",1];
    _x setSkill ["reloadSpeed",1];
    _x setSkill ["commanding",1];
    _x setSkill ["general",1];
    } forEach units _aiGroup;
    //sleep 0.5;
    
    // Reduce Damage for createvehicle spawned vehicle
    _veh setVariable ["selections",[]];
    _veh setVariable ["gethit",[]];
    _veh addEventHandler [
    "HandleDamage",
    {
    	_veh = _this select 0;
    	_selection = _this select 1;
    	_selections = _veh getVariable ["selections",[]];
    	_gethit = _veh getVariable ["gethit",[]];
    	if !(_selection in _selections) then {
    		_selections set [count _selections,_selection];
    		_gethit set [count _gethit,0];
    	};
    	_i = _selections find _selection;
    	_olddamage = _gethit select _i;
    	_damage = _olddamage + ((_this select 2) - _olddamage) * 0.25;
    	_gethit set [_i,_damage];
    	_damage;
    }
    ];
    
    // add static gun
    _biggun = "DSHKM_TK_INS_EP1" createVehicle [6938.8813,11350.258,3.0517578];
    _biggun addEventHandler ["HandleDamage",{false}];
    _biggun setDir 120.91074;
    _biggun addeventhandler ["fired",{(_this select 0) setvehicleammo 1}];
    sleep 0.5;
    
    // make AI for gun and tell them to move in as gunner
    _newUnit = "RUS_Soldier_GL" createUnit [getMarkerPos "M2ai2",_aiGroup3,"",1,"corporal"];
    _newUnit moveInGunner _biggun;
    [_biggun,_aiGroup3] spawn _staticGunner;
    // static gun ends
    
    // add static gun2
    _biggun2 = "DSHKM_TK_INS_EP1" createVehicle [6911.6792, 11406.456, -0.10166994];
    _biggun2 addEventHandler ["HandleDamage",{false}];
    _biggun2 setDir 196.36488;
    _biggun2 addeventhandler ["fired",{(_this select 0) setvehicleammo 1}];
    sleep 0.5;
    
    // make AI for gun and tell them to move in as gunner
    _newUnit = "RUS_Soldier_GL" createUnit [getMarkerPos "DevilsAI",_aiGroup3,"",1,"corporal"];
    _newUnit moveInGunner _biggun2;
    [_biggun2,_aiGroup3] spawn _staticGunner;
    // static gun ends
    
    // Make AI with RPGs
    "TK_INS_Soldier_AT_EP1" createUnit [getMarkerPos "DevilsAI",_aiGroup3,"",1,"corporal"];
    "TK_INS_Soldier_AT_EP1" createUnit [getMarkerPos "DevilsAI",_aiGroup3,"",1,"corporal"];
    "INS_Soldier_AA" createUnit [getMarkerPos "DevilsAI",_aiGroup3,"",1,"corporal"];
    "RUS_Soldier_GL" createUnit [getMarkerPos "DevilsAI",_aiGroup3,"",1,"corporal"];
    "USMC_SoldierS_SniperH" createUnit [getMarkerPos "DevilsAI",_aiGroup3,"",1,"corporal"];
    "USMC_SoldierS_SniperH" createUnit [getMarkerPos "DevilsAI",_aiGroup3,"",1,"corporal"];
    
    // Stop them running away
    _aiGroup allowFleeing 0;
    _aiGroup3 allowFleeing 0;
    
    // Add Waypoints for M2
    _this = _aiGroup addWaypoint [[6934.8335, 11336.827, 0], 0];
    _this setWaypointCombatMode "RED";
    _this setWaypointBehaviour "AWARE";
    _waypoint_3 = _this;
    
    _this = _aiGroup addWaypoint [[6962.9517, 11343.79, 0], 0];
    _waypoint_4 = _this;
    
    _this = _aiGroup addWaypoint [[6909.5718, 11323.544, 0], 0];
    _waypoint_5 = _this;
    
    _this = _aiGroup addWaypoint [[6973.5161, 11344.028, 0], 0];
    _waypoint_6 = _this;
    
    _this = _aiGroup addWaypoint [[6933.4819, 11334.185, 0], 0];
    _this setWaypointType "CYCLE";
    _waypoint_7 = _this;
    


  8. if (isServer || isDedicated) then 
    {
    private ["_units","_i","_unit"];
    while {true} do
    {
    	_units = playableUnits;
    	for "_i" from 0 to ((count _units)-1) do
    	{
    		_unit = _units select _i;
    		if ((alive _x) && (_x iskindOf "Man") && (primaryWeapon _x != "")) then {
    			hint format ["%1 is one badass motherfucker",_x];
    			sleep 1;
    		};
    	} forEach _units;
    };
    };
    

×