Hi there !
hey guys, I got a problem:
I made a Luftabwehr AddOn (Air Defense system (ADS)). If the Scripts starts, the explosion aren`t in the Air, they are on the ground. The explosions should be in the Air. Here is my Script: (Do somebody know, how to create Rockets with the Camcreate command ? If yes, please wrote it in this sript. The Rocket has to fly in the Air; if you need my .p3d, I can send ya)
SCRIPT NAME: Air_Bombing.sqs
>>>>>>>>>>> Start <<<<<<<<<<<<<<<<
;========================
; Script by Pliskin
;========================
;name and select this
_Luftabwehr = _this select 0
;number of explosions
_num = 80
;spreading area
_spread = 100
;random delay between explosions
_delay = 1.4
;counter to keep track of how many explosions so far
_count = 0
;beginning of loop
#beg
;setting everything to zero
_nx = 0
_ny = 0
_nz = 0
_x = 0
_y = 0
;generates plus or minus 1
_plusminus = (random 10)
?(_plusminus <= 5) : _plusminus = -1
?(_plusminus > 5) : _plusminus = 1
;determines how far off center the explosion will happen
_nx = (random _spread) * _plusminus
_plusminus = (random 10)
?(_plusminus <= 5) : _plusminus = -2
?(_plusminus > 5) : _plusminus = 2
_ny = (random _spread) * _plusminus
;determining floor and ceiling of explosions
_height = random (140)
?(_height < 140):_height = _height + 140
;new coordinates of explosion (I don't have _z or _nz in here because it's always 0
;you can easily add air bursts though.
_nx = _nx + _x
_ny = _ny + _y
_nz = _nz + _height
;add random delay up to delay specified by user (if you want constant rate, just take out the random
~(random _delay)
;creating explosion
Explo1="HandGrenade" CamCreate [(getpos _Luftabwehr select 0)+_nx,(getpos _Luftabwehr select 1)+_ny,_nz]
Explo2="Heat105" CamCreate [(getpos _Luftabwehr select 0)+_nx,(getpos _Luftabwehr select 1)+_ny,_nz]
;increment counter
_count = _count + 1
;check if done
?(_count == _num):exit
;if not done, do another explosion
goto "beg"
exit
>>>>>>>>>>> End <<<<<<<<<<<<<<<<
And I think, in my config.cpp is a error,too: If a east Plane is in a radius from 200m. of my Luftabwehr AddOn, it should start to fire the Rockets, but it does nothing:
>>>>>>>>>>> Start <<<<<<<<<<<<<<
// |(((((((((((((((|
// | By Pliskin |
// |)))))))))))))))|
class CfgPatches
{
class EPM_Luftabwehr
{
units[] = {EPM_Luftabwehr};
weapons[] = {};
requiredVersion = 1.90;
};
};
class CfgVehicles
{
class All {};
class Static: All {};
class Building: Static {};
class NonStrategic: Building {};
class TargetTraining: NonStrategic {};
class TargetGrenade: TargetTraining {};
class EPM_Luftabwehr: TargetGrenade
{
model="\EPM_Luftabwehr\Luftabwehr-feuer-rampe.p3d"; // where the model is
armor=80000; // I dunnow
vehicleClass="EPM Objects"; // Thats a own folder
scope=2; // I dunnow
displayName="Luftabwehr System"; // Name on the display
};
};
class UserActions // HELP ME
{
class Alarm
{
displayName="Raketen abfeuern"; // ?
radius=200; // this is the radius, where my AddOn should start to fire if a enemy // plane is in it
activationBy="EAST"; // That I copy from a trigger
activationType="WEST D"; // That, too
condition="this"; // This, too
statement="[] exec ""\EPM_Luftabwehr\Air_Bombing.sqs"""; // Yeah, this too.
};
}; // FUCKIN, WHATS WRONG ?
};
>>>>>>>>>>> End <<<<<<<<<<<<<<<<
I Hope you can understand this mail.
Greatings: Pliskin
My Mail: KSK-actions@web.de
~S~CD