nuke

Microb

Member
Hello.

I've been searching nuke script for a long time for event on my epoch server.
I found this...
http://pastebin.com/Xch8LmsT
but it seems this nuke script cannot cause any damage...
Is it possible to add dmg to this script? And if it is: can someone help me with it?
 
are you sure, because the is some code that should cause damage:
Code:
_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;
 
are you sure, because the is some code that should cause damage:
Code:
_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;


Well... I got it working with setdamage 1... but there is another problem=with setdamage 1 it destroys everything(as I want) but after player relog only supermarket, hospital, and a few others buildings are destroyed... other buildings are in "damaged" state (broken windows etc)
Any ideas how to fix it?
 
Last edited:
Hmm... but SCUD launch counts as weapon? This script allows to stick script to weapon but SCUD be is just a misc item with no default use.
 
Hmm... but SCUD launch counts as weapon? This script allows to stick script to weapon but SCUD be is just a misc item with no default use.
dont attach it to the SCUD, just place the SCUD and add a option to create/launch nuke from SCUD (player cursor target should do it), ill post what i come up with soon (yep my soon is when i feel like it :p )
 
dont attach it to the SCUD, just place the SCUD and add a option to create/launch nuke from SCUD (player cursor target should do it), ill post what i come up with soon (yep my soon is when i feel like it :p )

well it's easy... but if player will try to spam with these nukes? Is it possible to make limit to launch... example: to 1 launch per server restart?
 
well it's easy... but if player will try to spam with these nukes? Is it possible to make limit to launch... example: to 1 launch per server restart?

Yep just have a global variable set to false on server start, then when nuke is launched set it true, make the nuke only launch if the variable is not true, eg

Nukehaslaunched = false;

Launch nuke code

Nukehaslaunched = true;


Or have a variable number and make it start at 0, then when nuke is launched add +1 to variable, make the nuke only launch if the variable equals 0, or to let it launch more than once make sure the variable equals 1 less than launch limit

eg if you want to launch 4 nukes make the nuke launch if variable is less than 3, that way on the 4th launch it can't be used again as the variable will be 4.


Hope that helps a bit.
 
Last edited:
well
then I must add to init.sqf

SCUD = true;

and then to script

if(SCUD) then {... ... ... SCUD = false} else {cutText ["Already Fired", "PLAIN DOWN"];
};
 
Back
Top