OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Lazy Lays on 24 Mar 2005, 17:40:05
-
how do I make a singel explosion on a object and then 5 sec later another explosion on another object, and so on...... ?
you know like an Artrillery and not a bombardment, but just like a singel battery fire
I didt a seach in the Editors depot but didnt find what I am looking for
-
If you only want the sound then you could use a loop, something like this:
#Loop
PlaySound "Explosion"
~5
goto "Loop"
(don't forget to define the sound in the description.ext)
-
I want the whole explosion
but the sound will do great in another mission... thanks
-
If you don't want a random barrage, I'd suggest Triggerhappy's Multiple Explsion script. The instructions come with it.
-
just do this:
#loop
_BIGbomb = "LASERGUIDEDBOMB" camcreate getpos kablooiepos
~4
_Medeocrebomb = "SHELL125" camcreate getpos Kabampos
goto"loop"
Very easy, just put this in a .sqs file, this will not work in a trigger.
-
I need to understand this:
_BIGbomb = "LASERGUIDEDBOMB" camcreate getpos kablooiepos
_Bigbomb = ?
"Laserguidedbomb" = type of explosion right ?
camcreate getpos kablooiepos = is the position of the explosion right ?
But what is the bigbomb ?
-
Next quistion:
now how do I make the positon of the explosion random ?
-
several ways... there isa lotta of scripts wich use random explotions in a radios uf a tigger you set... but i made a "easy old shool" one, that u set the targets from Invisble H's... and then u "program" the bombing action...
seems like these
[] exec "0.sqs"
~4
[] exec "21.sqs"
~2
[] exec "12.sqs"
~1
[] exec "17.sqs"
~4
[] exec "16.sqs"
~2
[] exec "2.sqs"
~5
[] exec "8.sqs"
~1
[] exec "11.sqs"
~3
[] exec "10.sqs"
~2
[] exec "0.sqs"
~1
[] exec "24.sqs"
~4
[] exec "13.sqs"
~1
[] exec "0.sqs"
exit
but longer.. :p and in every "<number>.sqs" add this
;explotion 0
;target is target_0
explo0 = "shell125" CreateVehicle [(getpos target_0 select 0),(getpos target_0 select 1)]
exit
ni idea why adding the "explo0" but i add it anyway...
note that you have to put in the mission editor mani "invisible heliports" ass many diferent location of explotions u want... an name them like "target_0" "target_1" etc,
Tip: make an invisible H and name it "target" then copy, paste!
well im adding it if you want to test it...
U need 26 targets, from "target_0" to "target_25
-
em aye, that's one way of doing it....
another way would be like this -
create a marker called "target"
set up a variable called end_explosions and make it false
cut n paste the following:
;random explosions
#again
_x = getmarkerpos "target" select 0
_y = getmarkerpos "target" select 1
_h = random 6
_rad = random 4
_ang = random 360
"shell120" camcreate [_x+(_rad*sin(_ang)),_y+(_rad*cos(_ang)),_safemargin+_h]
_r = random 1
~_r
?not (end_explosions):goto "again"
exit
save and call it "explosions.sqs"
then call the script by using [] exec "explosions.sqs". when you've had enough of the fireworks, set end_explosions to true.
a little less work, and a little more random. :)
EDIT - oop, wrong code - making dinner at the same time y'see ;)
-
Thanks guys !..
-
_BIGbomb = "LASERGUIDEDBOMB" camcreate getpos kablooiepos
and this is:
_BIGbomb = tag name (can be whatever, no really know why addin thiese..)
"LASERGUIDEDBOMB" class of the explotion, can be "shell125"too or "bmp", but this adds a tank an not a explotion :P
camcreate the command for creating veihlces.. usage :
type camCreate position
Operand types:
type: String
position: Array
Type of returned value:
Object
Description:
Create camera or actor of given type on given initial position (format Position). Type is one of "CAMERA", "SEAGULL".
Example:
_camera = camCreate getPos player
and getpos kablooiepos is the posittion of the Objet named "kablooiepos"
cheers
-
Um i soppose what bedges said would work however it sounds more like he was just trying to confuzely the new guy with his incredably mathmaticly scripting...
I would suggest this:
_pos = getpos player
_boomcount = 0
;(or whatever the target)
#loop
?(_boomcount >= 10):hint"Outa bombs! DANG!";exit
_x = _pos + random 200
_y = _pos + random 200
_x2 = _x - 100
_y2 = _y - 100
_Bomb = "LASERGUIDEDBOMB" camcreate [_x2,_y2,0]
_boomcount = _boomcount + 1
~(random 10)
goto"loop";this will have a target area of random 100 meters, if you want the script to continually follow you place the _pos = getpos player right below the loop.
Also the _Boomcount is the number of bombs that have came down, if you want a higher number change the condition to something higher
-
Thanks guys !
-
So you solved the problem, but I still have a problem with this topic. ::)
You used "CreateVehicle" command to create a bomb and it then fall to ground and explode.
But in this way I cannot create a mid-air explotion when it doesn't hit a vehicle. I wanna to make a air defence mission and use some kind of mid-air explotion, then what can I do???
-
make two of the bombs at the same time in midair. they collide with each other, then POP goes the weasel ;)
-
I think you're looking for flak aren't you? (Mid air explosions?)
There's a good flak script here that randomly makes mid air explosions appear.. Is this what you're looking for ?