-
Content Count
40 -
Joined
-
Last visited
-
Medals
Everything posted by Antman2o1o
-
George, I found you and David Doss having a discussion on this thread
I have tried the code below and nothing happens any ideas why?
NOTES:
I have tried: Full Bush Path: a3\plants_f\Bush\b_ficusc2d_f.p3d and without full path b_ficusc2d_f.p3d
The bushes do not get replaced
CODE SAMPLE BELOW
if (isServer) then {
private _repleacearray = [
["a3\plants_f\Bush\b_ficusc2d_f.p3d", "a3\plants_f\Bush\b_ArundoD3s_F.p3d", 0],
["a3\plants_f\Bush\b_neriumo2d_f.p3d", "a3\plants_f\Bush\b_ArundoD3s_F.p3d", 0]
];
{
private _a = ((getModelInfo _x) select 0);
private _c = _repleacearray select {_a == _x select 0};
if !( _c isEqualTo []) then {
private _b = ((getModelInfo _x) select 1);
private _replacetree = ([(_c select 0) select 1] call BIS_fnc_simpleObjectData) select 1;
private _directionOffset = (_c select 0) select 2;private _position = getPosWorld _x;
private _vectorDirUp = [vectorDir _x, vectorUp _x];
hideObjectGlobal _x;
private _simpletree = createSimpleObject [_replacetree, _position];
_simpletree setVectorDirAndUp _vectorDirUp;
_simpletree setDir (getdir _simpletree) + _directionOffset;
_simpletree enableSimulationGlobal false;
systemchat format["getModelInfo: %1 getPosWorld: %2 replacing tree ",getModelInfo _x, getPosWorld _x, _x];};
} forEach nearestTerrainObjects
[
[worldSize/2, worldSize/2],
["Tree"], //["Tree","Bush"],
worldSize,
false
];
};hint "Replacing_trees_script done";
Any help appreciated
Ant
-
Pierre, I am trying to change the appearance of this civilian group created in the code below.
THIS CODE WORKS TO SPAWN GROUPS. SO GOOD TILL HERE.
hint parseText "<img size='6' image='images\rap.paa'/><br/><t align='center' color='#b80406' shadow='2' size='2.75'>WARNING</t><br/><t align='center' color='#FFFFFF'>------------------------------</t><br/><t align='center' color='#FFFFFF'> Suicide Bombers Have Been Detected.</t><t align='center' color='#b80406'></t><br/><t align='center' color='#f6d140'> Stay On High Alert!</t><t align='center' color='#b80406'></t>"; playSound "nukewarn";
private ["_k_unit","_grp","_ksound","_chasep","_distep"];
if (!isServer) exitWith {};
_origin = _this select 0;
_no = _this select 1;
_ksound = _this select 2;
_chasep = _this select 3;
_distep = _this select 4;if (_no>0) then
{
_nr_k = 0;
while {_nr_k<_no} do
{
_grp = createGroup civilian;
_type_k = ["C_Man_casual_6_F_afro","C_man_1_1_F","C_Man_casual_1_F_asia","C_man_1_3_F","C_man_polo_1_F","C_man_polo_1_F_afro","C_Man_casual_3_F_asia","C_man_polo_1_F_asia","C_man_polo_2_F","C_man_polo_2_F_afro","C_man_polo_2_F_euro","C_Man_casual_4_F_euro","C_man_polo_3_F","C_man_polo_3_F_afro","C_Man_casual_5_F_euro","C_man_polo_3_F_asia","C_man_polo_4_F","C_man_polo_4_F_afro","C_man_polo_4_F_euro","C_man_polo_4_F_asia","C_man_polo_5_F","C_man_polo_5_F_afro","C_man_polo_5_F_euro","C_man_polo_5_F_asia","C_man_polo_6_F","C_man_polo_6_F_afro","C_man_polo_6_F_euro","C_man_polo_6_F_asia","C_man_p_fugitive_F","C_man_p_fugitive_F_afro","C_man_p_fugitive_F_euro","C_man_p_fugitive_F_asia","C_man_hunter_1_F","C_Orestes","C_Nikos","C_Nikos","C_man_sport_2_F_afro","C_man_sport_3_F_asia"] call BIS_fnc_selectRandom;
_type_k createUnit [getMarkerPos _origin, _grp, "[this,_distep,_ksound,_chasep] execvm 'Scripts\kam.sqf'",1];
_nr_k = _nr_k +1;
sleep 1;
};
};I added these three lines of code below to try and change just the uniform and headgear
_uniformTypes = ["U_I_C_Soldier_Para_1_F"];
_type_k_unit addUniform (_uniformTypes call BIS_fnc_selectRandom);
_type_k unit addHeadgear "H_ShemagOpen_tan";SO NEW CODE LOOKS LIKE THIS NOW
hint parseText "<img size='6' image='images\rap.paa'/><br/><t align='center' color='#b80406' shadow='2' size='2.75'>WARNING</t><br/><t align='center' color='#FFFFFF'>------------------------------</t><br/><t align='center' color='#FFFFFF'> Suicide Bombers Have Been Detected.</t><t align='center' color='#b80406'></t><br/><t align='center' color='#f6d140'> Stay On High Alert!</t><t align='center' color='#b80406'></t>"; playSound "nukewarn";
private ["_k_unit","_grp","_ksound","_chasep","_distep"];
if (!isServer) exitWith {};
_origin = _this select 0;
_no = _this select 1;
_ksound = _this select 2;
_chasep = _this select 3;
_distep = _this select 4;if (_no>0) then
{
_nr_k = 0;
while {_nr_k<_no} do
{
_grp = createGroup civilian;
_type_k = ["C_Man_casual_6_F_afro","C_man_1_1_F","C_Man_casual_1_F_asia","C_man_1_3_F","C_man_polo_1_F","C_man_polo_1_F_afro","C_Man_casual_3_F_asia","C_man_polo_1_F_asia","C_man_polo_2_F","C_man_polo_2_F_afro","C_man_polo_2_F_euro","C_Man_casual_4_F_euro","C_man_polo_3_F","C_man_polo_3_F_afro","C_Man_casual_5_F_euro","C_man_polo_3_F_asia","C_man_polo_4_F","C_man_polo_4_F_afro","C_man_polo_4_F_euro","C_man_polo_4_F_asia","C_man_polo_5_F","C_man_polo_5_F_afro","C_man_polo_5_F_euro","C_man_polo_5_F_asia","C_man_polo_6_F","C_man_polo_6_F_afro","C_man_polo_6_F_euro","C_man_polo_6_F_asia","C_man_p_fugitive_F","C_man_p_fugitive_F_afro","C_man_p_fugitive_F_euro","C_man_p_fugitive_F_asia","C_man_hunter_1_F","C_Orestes","C_Nikos","C_Nikos","C_man_sport_2_F_afro","C_man_sport_3_F_asia"] call BIS_fnc_selectRandom;
_uniformTypes = ["U_I_C_Soldier_Para_1_F"];
_type_k_unit addUniform (_uniformTypes call BIS_fnc_selectRandom);
_type_k unit addHeadgear "H_ShemagOpen_tan";
_type_k createUnit [getMarkerPos _origin, _grp, "[this,_distep,_ksound,_chasep] execvm 'Scripts\kam.sqf'",1];
_nr_k = _nr_k +1;
sleep 1;
};
};After doing this now the AI Groups do not spawn. Any Ideas why.... any help appreciated.
Ant
-
Pierre I am kind of stuck trying to bind a key like maybe shift+m to my map I am trying to build.
Reference code on page below. Do you have any suggestions or know of any code samples?I have been looking around for examples but have not found any. Kind of lost.
- Show previous comments 19 more
-
Pierre, I got it working so once again thank you for your help. The only bug i have left is that the player MAP MARKERS do not show on the map. They show if you place a unit down and start a mission but not with spawned in players. Any ideas or suggestions?
Once again thank you for all your help.
ANT
-
Larrow, do you know if it is possible to remove the player map icons/markers when a player enters a specific area that has a trigger. I am not trying to take them out on the whole map only in a specific area that a trigger area represents when players are in that area. So the remove player markers would be dictated by the trigger area.
Not sure if possible
-
Pierre, is it possible to remove the player map icons / markers when a player enters a specific area that has a trigger. I am not trying to take them out on the whole map only in a specific area that a trigger area represents when a player is in that area.
Not sure if possible