Home   Help Search Login Register  

Author Topic: Explosion  (Read 1382 times)

0 Members and 1 Guest are viewing this topic.

Lazy Lays

  • Guest
Explosion
« 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
« Last Edit: 24 Mar 2005, 17:41:22 by Lazy Lays »

Silencer

  • Guest
Re:Explosion
« Reply #1 on: 24 Mar 2005, 17:49:08 »
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)

Lazy Lays

  • Guest
Re:Explosion
« Reply #2 on: 24 Mar 2005, 18:11:16 »
I want the whole explosion



but the sound will do great in another mission... thanks

Offline Morglor9

  • Members
  • *
Re:Explosion
« Reply #3 on: 24 Mar 2005, 18:24:03 »
If you don't want a random barrage, I'd suggest Triggerhappy's Multiple Explsion script. The instructions come with it.
Cymbaline

Offline RujiK

  • Members
  • *
  • KoKo Puh-Fizzles!
Re:Explosion
« Reply #4 on: 24 Mar 2005, 18:41:05 »
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 like your approach, lets see your departure.
Download the New Flashlight Script!

Lazy Lays

  • Guest
Re:Explosion
« Reply #5 on: 24 Mar 2005, 18:56:37 »

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 ?

Lazy Lays

  • Guest
Re:Explosion
« Reply #6 on: 24 Mar 2005, 19:02:19 »
Next quistion:
now how do I make the positon of the explosion random ?

Offline Flauta

  • Members
  • *
  • There is no knownledge, that is no power
    • Chek mi FLog
Re:Explosion
« Reply #7 on: 24 Mar 2005, 19:36:48 »
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
Code: [Select]
[] 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

Code: [Select]
;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
« Last Edit: 24 Mar 2005, 19:41:35 by Flauta »

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:Explosion
« Reply #8 on: 24 Mar 2005, 19:46:51 »
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:

Code: [Select]
;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 ;)
« Last Edit: 24 Mar 2005, 19:52:35 by bedges »

Lazy Lays

  • Guest
Re:Explosion
« Reply #9 on: 24 Mar 2005, 19:47:55 »
Thanks guys !..

Offline Flauta

  • Members
  • *
  • There is no knownledge, that is no power
    • Chek mi FLog
Re:Explosion
« Reply #10 on: 24 Mar 2005, 19:49:21 »
_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

Offline RujiK

  • Members
  • *
  • KoKo Puh-Fizzles!
Re:Explosion
« Reply #11 on: 24 Mar 2005, 20:48:46 »
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:

Code: [Select]
_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
« Last Edit: 24 Mar 2005, 20:50:41 by RujiK »
I like your approach, lets see your departure.
Download the New Flashlight Script!

Lazy Lays

  • Guest
Re:Explosion
« Reply #12 on: 25 Mar 2005, 11:50:25 »
Thanks guys !

Offline Plane

  • Members
  • *
  • You can call me my nickname "Plane"!
Re:Explosion
« Reply #13 on: 28 Mar 2005, 13:15:22 »
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???
The propeller is just a big fan in front of the plane used to keep the pilot cool. When it stops, you can actually watch the pilot start sweating.

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:Explosion
« Reply #14 on: 28 Mar 2005, 13:19:52 »
make two of the bombs at the same time in midair. they collide with each other, then POP goes the weasel ;)