Forum Jump :

Author Message


Posts: 7
Rank:


Level: Member

Country: uk
Location: London
Occupation: Mathematician
Age: 21
In-game name:

 
#1 Posted at 2011-12-02 21:49        
     
To use the LK script nuke in missions you must do the following:
1. Create a trigger (switch) and a game logic called Nukepos.

2. In the init of the trigger type :
nul=[nukepos] ExecVM "lk/nuke/nuke.sqf";

3. In the documents radzone.sqf and damage.sqf replace the first line with the code
_target = nukepos;

This should allow you to now use the nuke through a trigger. If you do experiance any problems using this revised code, feel free to ask me and i'll get back to you as quickly as possible. I shall be releasing a mission on Fallujah called 'Shock and Awe' which includes this revised script so feel free to use the files from my mission.Thanks to LuciLK for crating this wonderful script and thanks also to Adana_Bandit (a good friend of mine) for helping me go through the code and testing my Fallujah mission! Enjoy!

This post was edited by ylli122 (2011-12-04 12:12, ago)


Author Message


Posts: 20251
Rank:


Level: Super Admin

Country: nl
Location: The Netherlands
Occupation:
Age: 41
In-game name: Foxhound

 
#2 Posted at 2011-12-03 21:56        
     
Thanks for posting the solution to your troubles on our forums. This will help other people as well and is appreciated!

This post was edited by Foxhound (2011-12-04 11:28, ago)

Visit my family webshop desteigerhoutshop.nl.

Advertisement


Author Message


Posts: 17
Rank:


Level: Member

Country: us
Location: Wilmington, NC
Occupation:
Age: 29
In-game name: Blackbeard

 
#3 Posted at 2012-03-04 09:42        
     
# ylli122 : To use the LK script nuke in missions you must do the following:
1. Create a trigger (switch) and a game logic called Nukepos.

2. In the init of the trigger type :
nul=[nukepos] ExecVM "lk/nuke/nuke.sqf";

3. In the documents radzone.sqf and damage.sqf replace the first line with the code
_target = nukepos;

This should allow you to now use the nuke through a trigger. If you do experiance any problems using this revised code, feel free to ask me and i'll get back to you as quickly as possible. I shall be releasing a mission on Fallujah called 'Shock and Awe' which includes this revised script so feel free to use the files from my mission.Thanks to LuciLK for crating this wonderful script and thanks also to Adana_Bandit (a good friend of mine) for helping me go through the code and testing my Fallujah mission! Enjoy!

I've tried doing this and it am left with nothing happening.. Perhaps I did something wrong?

This is EXACTLY what I did:

-added "snuke" folder to my mission folder.

-Tried to play, but got a mission or deleted file error So I unpbo'ed the "skud.pbo" file and drag & dropped the now unpbo'd file into the snuke folder. Now I am able to play mission. (I want to have no addition required mods for my server guests.)

-added "_target = nukepos;" to the 1st line of "radzone.sqs" (did not see a .sqs only .sqf extension) (did not overwrite any lines.)

-added "_target = nukepos;" to the 1st line of "damage.sqs" (did not see a .sqf only .sqf extension) (did not overwrite any lines.)

-Finally I did what you said with adding the trigger. Now since I have never before used the switch commands with-in the trigger I'm confused on how to get this nuke to explode on a simple trigger for radio alpha.


Author Message

palyarmerc  

I live inside the editor


Posts: 753
Rank:


Level: Member

Country: uk
Location:
Occupation: *Retired from ArmA*
Age:
In-game name: Paly

 
#4 Posted at 2012-03-04 11:04        
     
Sounds like you have a good grasp of what you are trying to do. Make sure file paths and file extensions are correct, the only other thing is the semi-colon.
In sqs a ; is like // in sqf so make sure you don't put one ay the end of the line _target = nukepos

....that's all folks....!

Author Message


Posts: 2
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#5 Posted at 2012-09-05 16:24        
     
hi there, My Major apologises for reviving a uber old thread, but i thought itd be better to post here rather than start a new thread.

im fairly new to the arma series so hi to all here, and have little experience with scripts.

i currently have a private DayZ server running for myself and a couple of friends, battle eye is disabled so we can use our scripts.

what im trying to do is make it so i can drop the nuke by shift+p. then select the target area on the map,

i know LK's nuke is a number of scripts, i think it was 7, so ive merged a few of the scripts into one and
ive successfully managed to get the nuke to drop by clicking a location on the map once ive hit shift+p
the nuke drops and explodes fine. the exsplosion effects are there wind smoke etc etc

but i just cannot seem to get any kind of damage working at all. ive raked my brains for hours and hours trying to figure it out. but i havnt got anywhere, ive looked through numerous threads on numerous forums,

its probabbly something simple, but i jus cannot see it.
i know the script is probablly totally wrong and half of it probablly not needed,
but it works for dropping a nuke via shift+p and then selecting the target on the map. nuke drops, but with no damage.

so im just wondering if anyone would be able to help me out or have a look at the script ive knocked together and tell me where ive possibly gone wrong?

ive done a little vid, (apologises for the crappy iphone vid) to show what i mean.

http://www.youtube.com/watch?v=yOCXlseMqDQ&list=UU3kXD8RcTfQWAfgXdIy4VGA&index=1&feature=plcp

nukev=false;
nul = [lkcom] execVM "lk\menu\close_menu.sqf";
//----------------------
//----------------------

nul = [] execvm "lk\nuke\nuke_var.sqf";
//----------------------
//----------------------

hint "Click on the map to designate target-area";

nukepos = "HeliHEmpty" createVehicle (position player);




_path = "\ca\air2\cruisemissile\";
_pathS = _path + "data\scripts\";


nukehold=true;
titleText ["Click on the map to designate target-area","plain down"];
onMapSingleClick "nukepos setPos _pos; nukehold=false";
waituntil{!nukehold};
onMapSingleClick "";
titleText ["", "plain down"];

_dropPosition = getpos nukepos;
nukemarker = createMarkerLocal ["nukemarker", position nukepos]; 
hint "Nuclear Strike inbound at designated location";
nul = [lkcom] execVM "lk\menu\close_menu.sqf";
nukev=true;

nukemarker setmarkerposLocal getPos nukepos;
nukemarker setMarkerTypeLocal "Destroy";
nukemarker setMarkerTextLocal "  Nuclear Strike";
nukemarker setMarkerColorLocal "ColorRed";

_cruise = createVehicle ["Chukar",_dropPosition,[], 0, "FLY"];
_cruise setVectorDir [ 0.1,- 1,+ 0.5];
_cruise setPos [(getPos _cruise select 0),(getPos _cruise select 1),1000];
_cruise setVelocity [0,2,0] ;
_cruise flyInHeight 1000;
_cruise setSpeedMode "FULL";

sleep 0.5; 
_dropPosX = _dropPosition select 0;
_dropPosY = _dropPosition select 1;
_dropPosZ = _dropPosition select 2;

_droppos1 = [_dropPosX + 4, _dropPosY + 4, _dropPosZ];
_droppos2 = [_dropPosX + 8, _dropPosY + 8, _dropPosZ];

_planespawnpos = [_dropPosX , _dropPosY , _dropPosZ + 1000];

_misFlare = createVehicle ["cruiseMissileFlare1",_planespawnpos,[], 0, "NONE"];
_misFlare inflame true;
_cruise setVariable ["cruisemissile_level", false];
[_cruise, _misFlare] execVM (_pathS + "cruisemissileflare.sqf");
_cruise setObjectTexture [0, _path + "data\exhaust_flame_ca"];
[_cruise] execVM (_pathS + "exhaust1.sqf");
sleep 7;

waitUntil {!alive _cruise};
nul = [nukepos] execvm "lk\nuke\nuke.sqf";
nul = [nukepos] execvm "lk\nuke\damage.sqf";
deletevehicle _misFlare;
deletevehicle _cruise;
//----------------------
//----------------------
quake = {

		for "_i" from 0 to 140 do {
			_vx = vectorup _this select 0;
			_vy = vectorup _this select 1;
			_vz = vectorup _this select 2;
			_coef = 0.03 - (0.0001 * _i);
			_this setvectorup [
				_vx+(-_coef+random (2*_coef)),
				_vy+(-_coef+random (2*_coef)),
				_vz+(-_coef+random (2*_coef))
			];
			sleep (0.01 + random 0.01);
		};

};


wind = {
	while {windv} do {
	setwind [0.201112,0.204166,true];
		_ran = ceil random 2;
		playsound format ["wind_%1",_ran];
		_pos = position player;

		//--- Dust
			setwind [0.201112*2,0.204166*2,false];
		_velocity = [random 10,random 10,-1];
		_color = [1.0, 0.9, 0.8];
		_alpha = 0.02 + random 0.02;
		_ps = "#particlesource" createVehicleLocal _pos;  
		_ps setParticleParams [["\Ca\Data\ParticleEffects\Universal\universal.p3d", 16, 12, 8], "", "Billboard", 1, 3, [0, 0, -6], _velocity, 1, 1.275, 1, 0, [9], [_color + [0], _color + [_alpha], _color + [0]], [1000], 1, 0, "", "", _pos];
		_ps setParticleRandom [3, [30, 30, 0], [0, 0, 0], 1, 0, [0, 0, 0, 0.01], 0, 0];
		_ps setParticleCircle [0.1, [0, 0, 0]];
		_ps setDropInterval 0.01;

		sleep (random 1);
		_delay = 1 + random 5;
		sleep _delay;
		deletevehicle _ps;
	};
};


envi = {

if (viewdistance < 3500) then {setviewdistance 3500};
"colorCorrections" ppEffectAdjust [2, 30, 0, [0.0, 0.0, 0.0, 0.0], [0.8*2, 0.5*2, 0.0, 0.7], [0.9, 0.9, 0.9, 0.0]];
"colorCorrections" ppEffectCommit 0;
//"colorCorrections" ppEffectAdjust [1, 1, 0, [0.0, 0.0, 0.0, 0.0], [0.8*2, 0.5*2, 0.0, 0.7], [0.9, 0.9, 0.9, 0.0]];
"colorCorrections" ppEffectAdjust [1, 0.8, -0.001, [0.0, 0.0, 0.0, 0.0], [0.8*2, 0.5*2, 0.0, 0.7], [0.9, 0.9, 0.9, 0.0]];  
"colorCorrections" ppEffectCommit 3;
"colorCorrections" ppEffectEnable true;
"filmGrain" ppEffectEnable true; 
"filmGrain" ppEffectAdjust [0.02, 1, 1, 0.1, 1, false];
"filmGrain" ppEffectCommit 5;
};

ash = {
	_pos = position player;
	_parray = [
	/* 00 */		["\Ca\Data\ParticleEffects\Universal\Universal", 16, 12, 8, 1],//"\Ca\Data\cl_water",
	/* 01 */		"",
	/* 02 */		"Billboard",
	/* 03 */		1,
	/* 04 */		4,
	/* 05 */		[0,0,0],
	/* 06 */		[0,0,0],
	/* 07 */		1,
	/* 08 */		0.000001,
	/* 09 */		0,
	/* 10 */		1.4,
	/* 11 */		[0.05,0.05],
	/* 12 */		[[0.1,0.1,0.1,1]],
	/* 13 */		[0,1],
	/* 14 */		0.2,
	/* 15 */		1.2,
	/* 16 */		"",
	/* 17 */		"",
	/* 18 */		vehicle player
	];
	snow = "#particlesource" createVehicleLocal _pos;  
	snow setParticleParams _parray;
	snow setParticleRandom [0, [10, 10, 7], [0, 0, 0], 0, 0.01, [0, 0, 0, 0.1], 0, 0];
	snow setParticleCircle [0.0, [0, 0, 0]];
	snow setDropInterval 0.003;

};
//----------------------
//----------------------
nul = [] execVM "lk\nuke\nenvi.sqf";



if (player distance nukepos < 2000) then {

	setaperture 2;

	"dynamicBlur" ppEffectEnable true;
	"dynamicBlur" ppEffectAdjust [0.5];
	"dynamicBlur" ppEffectCommit 3;

	sleep 0.1;

	"dynamicBlur" ppEffectAdjust [2];
	"dynamicBlur" ppEffectCommit 1;

	"dynamicBlur" ppEffectAdjust [1];
	"dynamicBlur" ppEffectCommit 4;
};
nul = [nukepos] execvm "lk\nuke\damage.sqf";
sleep 3;
//*******************************************************************
//*******************************************************************

_Cone = "#particlesource" createVehicleLocal getpos nukepos;
_Cone setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 7, 48], "", "Billboard", 1, 10, [0, 0, 0],
				[0, 0, 0], 0, 1.275, 1, 0, [40,80], [[0.25, 0.25, 0.25, 0], [0.25, 0.25, 0.25, 0.5], 
				[0.25, 0.25, 0.25, 0.5], [0.25, 0.25, 0.25, 0.05], [0.25, 0.25, 0.25, 0]], [0.25], 0.1, 1, "", "", nukepos];
_Cone setParticleRandom [2, [1, 1, 30], [1, 1, 30], 0, 0, [0, 0, 0, 0.1], 0, 0];
_Cone setParticleCircle [10, [-10, -10, 20]];
_Cone setDropInterval 0.005;

_top = "#particlesource" createVehicleLocal getpos nukepos;
_top setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 3, 48, 0], "", "Billboard", 1, 21, [0, 0, 0],
				[0, 0, 65], 0, 1.7, 1, 0, [100,80,110], [[1, 1, 1, -10],[1, 1, 1, -7],[1, 1, 1, -4],[1, 1, 1, -0.5],[1, 1, 1, 0]], [0.05], 1, 1, "", "", nukepos];
_top setParticleRandom [0, [75, 75, 15], [17, 17, 10], 0, 0, [0, 0, 0, 0], 0, 0, 360];
_top setDropInterval 0.002;

_top2 = "#particlesource" createVehicleLocal getpos nukepos;
_top2 setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 3, 112, 0], "", "Billboard", 1, 22, [0, 0, 0],
				[0, 0, 60], 0, 1.7, 1, 0, [100,80,100], [[1, 1, 1, 0.5],[1, 1, 1, 0]], [0.07], 1, 1, "", "", nukepos];
_top2 setParticleRandom [0, [75, 75, 15], [17, 17, 10], 0, 0, [0, 0, 0, 0], 0, 0, 360];
_top2 setDropInterval 0.002;

_smoke = "#particlesource" createVehicleLocal getpos nukepos;
_smoke setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 7, 48, 1], "", "Billboard", 1, 25, [0, 0, 0],
				[0, 0, 70], 0, 1.7, 1, 0, [50,20,120], 
				[[1, 1, 1, 0.4],[1, 1, 1, 0.7],[1, 1, 1, 0.7],[1, 1, 1, 0.7],[1, 1, 1, 0.7],[1, 1, 1, 0.7],[1, 1, 1, 0.7],[1, 1, 1, 0]]
				, [0.5, 0.1], 1, 1, "", "", nukepos];
_smoke setParticleRandom [0, [10, 10, 15], [15, 15, 7], 0, 0, [0, 0, 0, 0], 0, 0, 360];
_smoke setDropInterval 0.002;

_Wave = "#particlesource" createVehicleLocal getpos nukepos;
_Wave setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 7, 48], "", "Billboard", 1, 20/2, [0, 0, 0],
				[0, 0, 0], 0, 1.5, 1, 0, [50, 100], [[0.1, 0.1, 0.1, 0.5], 
				[0.5, 0.5, 0.5, 0.5], [1, 1, 1, 0.3], [1, 1, 1, 0]], [1,0.5], 0.1, 1, "", "", nukepos];
_Wave setParticleRandom [2, [20, 20, 20], [5, 5, 0], 0, 0, [0, 0, 0, 0.1], 0, 0];
_Wave setParticleCircle [50, [-80, -80, 2.5]];
_Wave setDropInterval 0.0002;


_light = "#lightpoint" createVehicleLocal [((getpos nukepos select 0)),(getpos nukepos select 1),((getpos nukepos select 2)+800)];
_light setLightAmbient[1500, 1200, 1000];
_light setLightColor[1500, 1200, 1000];
_light setLightBrightness 1000000.0;

//*******************************************************************
//*******************************************************************

sleep 1.5*2;

_Wave setDropInterval 0.001;
deletevehicle _top;
deletevehicle _top2;


sleep 3;

player spawn envi;


player spawn quake;


if (player distance nukepos < 1000) then {player say "nuke2s"};
if (player distance nukepos > 1000) then {player say "nuke1s"};

sleep 1;
setaperture -1;

_top3 = "#particlesource" createVehicleLocal getpos nukepos;
_top3 setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 3, 48, 0], "", "Billboard", 1, 24, [0, 0, 450],
				[0, 0, 49], 0, 1.7, 1, 0, [120,130,150], [[1, 1, 1, -10],[1, 1, 1, -7],[1, 1, 1, -4],[1, 1, 1, -0.5],[1, 1, 1, 0]], [0.05], 1, 1, "", "", nukepos];
_top3 setParticleRandom [0, [75, 75, 15], [17, 17, 10], 0, 0, [0, 0, 0, 0], 0, 0, 360];
_top3 setDropInterval 0.002;
sleep 4;
deletevehicle _top3;

sleep 4;

if (player distance nukepos < 4000) then {
	"dynamicBlur" ppEffectAdjust [0];
	"dynamicBlur" ppEffectCommit 1;
};

_top4 = "#particlesource" createVehicleLocal getpos nukepos;
_top4 setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 3, 48, 0], "", "Billboard", 1, 22, [0, 0, 770],
				[0, 0, 30], 0, 1.7, 1, 0, [100,120,140], [[1, 1, 1, -10],[1, 1, 1, -7],[1, 1, 1, -4],[1, 1, 1, -0.5],[1, 1, 1, 0]], [0.05], 1, 1, "", "", nukepos];
_top4 setParticleRandom [0, [75, 75, 15], [17, 17, 10], 0, 0, [0, 0, 0, 0], 0, 0, 360];
_top4 setDropInterval 0.002;
sleep 3;

_top4 setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 3, 48, 0], "", "Billboard", 1, 25, [0, 0, 830],
				[0, 0, 30], 0, 1.7, 1, 0, [100,120,140], [[1, 1, 1, -10],[1, 1, 1, -7],[1, 1, 1, -4],[1, 1, 1, -0.5],[1, 1, 1, 0]], [0.05], 1, 1, "", "", nukepos];



_Wave setDropInterval 0.001*10;
_Wave setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 7, 48], "", "Billboard", 1, 20/2, [0, 0, 0],
				[0, 0, 0], 0, 1.5, 1, 0, [50, 100], [[0.1, 0.1, 0.1, 0.5], 
				[0.5, 0.5, 0.5, 0.5], [1, 1, 1, 0.3], [1, 1, 1, 0]], [1,0.5], 0.1, 1, "", "", nukepos];
_Wave setParticleCircle [50, [-40, -40, 2.5]];

player spawn ash;
windv=true;
player spawn wind;
30 setovercast 0.8;




deleteVehicle _light;

60 setRain 1;

sleep 4;
deletevehicle _top4;

_i = 0;
while {_i < 100} do
	{
	_light setLightBrightness (100.0 - _i)/100;
	_i = _i + 1;
	sleep 0.1;
	};


for "_i" from 0 to 15 do {
	_smoke setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 7, 48, 1], "", "Billboard", 1, 25, [0, 0, 0],
					[0, 0, 60+_i], 0, 1.7, 1, 0, [40,15,120], 
					[[1, 1, 1, 0.4],[1, 1, 1, 0.7],[1, 1, 1, 0.7],[1, 1, 1, 0.7],[1, 1, 1, 0.7],[1, 1, 1, 0.7],[1, 1, 1, 0.7],[1, 1, 1, 0]]
					, [0.5, 0.1], 1, 1, "", "", nukepos];
};


_timeNow = time;
waituntil {(time - _timeNow) > 180};

_smoke setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 7, 48, 1], "", "Billboard", 1, 25, [0, 0, 0],
				[0, 0, 30], 0, 1.7, 1, 0, [40,25+10,80], 
				[[1, 1, 1, 0.2],[1, 1, 1, 0.3],[1, 1, 1, 0.3],[1, 1, 1, 0.3],[1, 1, 1, 0.3],[1, 1, 1, 0.3],[1, 1, 1, 0.3],[1, 1, 1, 0]]
				, [0.5, 0.1], 1, 1, "", "", nukepos];

_smoke setDropInterval 0.012;
_Cone setDropInterval 0.02;
_Wave setDropInterval 0.01;

sleep 10;
deleteVehicle _Wave;
deleteVehicle _cone;
deleteVehicle _smoke;
deletevehicle snow;

sleep 300;


"filmGrain" ppEffectEnable false;
sleep 10;
"colorCorrections" ppEffectEnable false;
sleep 10;
60 setovercast 0;
windv=false;
setwind [0,0,true];
//----------------------
//----------------------



many thanks and i hope to help out some fellow members if i can.

thanks

This post was edited by grum09 (2012-09-05 17:24, ago)


Author Message


Posts: 1471
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#6 Posted at 2012-09-06 03:37        
     
Just taking a quick look and apart from what damage the "Chukar" may cause there isn't any damage being applied.


Yo will need to force some damage.

destroy city

or use some combination of nearestobjects and setdamage to kill or destroy what you need.

If the original script does destroy stuff take another look and see if you can find anything that is applying damage.


Author Message


Posts: 2
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#7 Posted at 2012-09-06 12:38        
     
hi, yes i didnt realise it at the time but there wasnt any damage in the script i posted. the original script does cause damage and upon futher investigation i can get the damage to work,

But the damage only seesms to happen where I the player is, if i dropped a bomb in cherno and i was in stary sober, stary sober would take the damage.

i had to change a line in the damage for the damage to work. this is the line i changed.

_target = _this select 0;
to
_target = "HeliHEmpty" createVehicle (position player);

this made the damage work but only where the player is, this is due to player position i think but thats the only way i could seem to get the damage to work. i also tried nukepos but the damage didnt seem to do naff all.

this is the damage section i added to the previous script i posted.
_target = "HeliHEmpty" createVehicle (position player);
deletemarkerlocal "nukemarker";

_array = _target nearObjects ["Man", 1000];;
{_x setdammage ((getdammage _x) + 1.0)} forEach _array;

_array = _target nearObjects ["Land", 1000];
{_x setdammage ((getdammage _x) + 1.0)} forEach _array;

_array = _target nearObjects ["Ship", 1000];
{_x setdammage ((getdammage _x) + 1.0)} forEach _array;

_array = _target nearObjects ["Motorcycle", 1000];
{_x setdammage ((getdammage _x) + 1.0)} forEach _array;

_array = _target nearObjects ["Car", 1000];
{_x setdammage ((getdammage _x) + 1.0)} forEach _array;

_array = _target nearObjects ["Air", 1000];
{_x setdammage ((getdammage _x) + 0.5)} forEach _array;

_array = _target nearObjects ["Tank", 1000];
{_x setdammage ((getdammage _x) + 1.0)} forEach _array;

_array = _target nearObjects ["Thing", 100];
{_x setdammage ((getdammage _x) + 1.0)} forEach _array;

_array = _target nearObjects ["Static", 500];
{_x setdammage ((getdammage _x) + 1.0)} forEach _array;

_array = _target nearObjects ["Strategic", 1000];
{_x setdammage ((getdammage _x) + 1.0)} forEach _array;

_array = _target nearObjects ["NonStrategic", 1000];
{_x setdammage ((getdammage _x) + 1.0)} forEach _array;


_array = (nearestObjects [_target,[], 300]) - ((getPos _target) nearObjects 300);
if dtree then {{DeleteCollection _x} forEach _array} else {{_x setdammage 1.0} forEach _array};


sleep 7;
_array = (_target nearObjects ["All", 1500]) - ((getPos _target) nearObjects 1000);
{_x setdammage ((getdammage _x) + 0.4)} forEach _array;

nul = [_target] execVM "lk\nuke\radzone.sqf";


Author Message


Posts: 1471
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#8 Posted at 2012-09-06 16:28        
     
I copied and pasted both scripts and a part from one missing file warning it worked as it should using
_target = _this select 0;

The damage isn't total it's main focus is 1000 meters.

Due to changes made by BIS part of the damage script may not work correctly in OA

this will have no effect as the use of DeleteCollection was changed, you can no longer delete or hide trees you can only damage them.
_array = (nearestObjects [_target,[], 300]) - ((getPos _target) nearObjects 300);
if dtree then {{DeleteCollection _x} forEach _array} else {{_x setdammage 1.0} forEach _array};


try instead
_array = (nearestObjects [_target,[], 800]) - ((getPos _target) nearObjects 800);
{_x setdammage ((getdammage _x) + 1.0)} forEach _array;


Other than that is seems fine.


Author Message


Posts: 2
Rank:


Level: Member

Country: ca
Location:
Occupation:
Age:
In-game name:

 
#9 Posted at 2013-06-02 15:33        
     
Sort of reviving this, I've been testing out the lk script pack on a MP Wasteland Takistan mission. With my limited knowledge it took me a while just to figure out how to get the command menu to show up.

I had to inject the different lines in appropriate places in the missions init, description and mission.sqm to get it to work with a wasteland mission instead of just drag drop and replace. I'm hoping there is a tool out there similar to ArmAEdit that can combine two descriptions into one or show me what to fix in my script.

I've been playing around with the nuke.sqf, damage.sqf and radzone.sqf. I was successful in removing the radzone marker, radzone damage, change the message to "" when using nuke_incoming.sqf so people don't know they can click on the map when the servers live to drop their own nukes.

Basically I just want to know how to flatten trees, dtree=true says it's for deleting trees that's in the var.sqf.

Also if I wanted to drop a tomahawk without even using the command console, for example in the proving grounds menu if I access the console and enter execVM "lk\tomahawk\launch.sqs"; it commences the first part and tells me to click on the map but the detonation.sqs obviously isn't part of the exec so it doesn't work. Works fine in the command menu.

How do you exec multiple sqfs or sqs in a single 'function?' or trigger. Thanks.


Author Message


Posts: 1
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name:

 
#10 Posted at 2013-09-26 03:28        
     
# ylli122 : To use the LK script nuke in missions you must do the following:
1. Create a trigger (switch) and a game logic called Nukepos.

2. In the init of the trigger type :
nul=[nukepos] ExecVM "lk/nuke/nuke.sqf";

3. In the documents radzone.sqf and damage.sqf replace the first line with the code
_target = nukepos;

This should allow you to now use the nuke through a trigger. If you do experiance any problems using this revised code, feel free to ask me and i'll get back to you as quickly as possible. I shall be releasing a mission on Fallujah called 'Shock and Awe' which includes this revised script so feel free to use the files from my mission.Thanks to LuciLK for crating this wonderful script and thanks also to Adana_Bandit (a good friend of mine) for helping me go through the code and testing my Fallujah mission! Enjoy!

I have 2 problems:
problem in nuke.sqf, line 3, RPT logs:

20:50:24 Error in expression < select 1;
_playersInvicibility = _this select 2;
_fC = _this select 3;

windAng>
20:50:24   Error position: <select 2;
_fC = _this select 3;

windAng>
20:50:24   Error Zero divisor

and also there is not nuclear cloud effect, I mean the big fire cloud... only the whether and the earthquake.

any ideas?