Home   Help Search Login Register  

Author Topic: non lethal explosions  (Read 1541 times)

0 Members and 1 Guest are viewing this topic.

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
non lethal explosions
« on: 15 Jun 2007, 01:47:14 »
is dere ny way 2 create non lethal explosions ? im creatin a cutscene were da player runs nd after him deres explosions (u know cinametic style :D) but i cant make da explosions not kill him  ::) ny help ?

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: non lethal explosions
« Reply #1 on: 15 Jun 2007, 01:57:44 »
You may always create mock explosions with drop commands, you may also add sound, for example adding a gamelogic where you attach the drop effects and that logic would also "Say" the sound of the explosion.

EDIT:
This is one of my missile warheads effects slightly modified so there is no real detonation. I deleted many of the code there related to the real explosion and scoring, hope the script still works.

Code: [Select]
// mando missile warhead type 1
// mando_missilehead1a.sqf v1.0
// Jan 2007 Mandoble
//
// General explosion script for mando missiles
// This script may be used as explosion script argument for mando_missile.sqf
//
// Big smoke and falling smoke debris
// Medium power explosion (equivalent to M_Ch29_AT missile).

private ["_pos", "_target", "_launcher", "_drop1", "_drop2", "_debris", "_maxspd", "_mass", "_vol", "_rubb", "_size", "_numdrops", "_i", "_angh", "_angv", "_rad", "_radv", "_radh", "_vel", "_size1", "_size2", "_pos2", "_b2", "_b1", "_dmgtarget", "_score", "_cost", "_side", "_unit", "_crew"];

_pos = _this select 0;
_log = "logic" createVehicleLocal [0,0,0];
_log setPos _pos;

// PUT HERE YOUR EXPLOSION SOUND
_log say "yourlessthan4secondssound"

_drop1 = "\ca\data\cl_basic";
_drop2 = "\ca\data\cl_fireD";


_drop1 = "\Ca\Data\ParticleEffects\RocketSmoke\RocketSmoke";
_drop2 = "\ca\data\cl_exp";
_debris = "\ca\weapons\kusplechu2";

_maxspd = 30;
_mass  = 1.275 + 0.3;
_vol   = 1.0;
_rubb  = 1;
_size  = [0.25];
_numdrops = 6 + random 6;
for [{_i = 0},{_i < _numdrops},{_i = _i + 1}] do
{
   _angh = random 359;
   _angv = (random 180)-90;
   _rad  = 30 + random _maxspd;
   _radv = abs(_rad * sin(_angv));
   _radh = abs(_rad * cos(_angv));
   _vel = [sin(_angh)*_radh, cos(_angh)*_radh, sin(_angv)*_radv];
   drop [_drop1, "", "SpaceObject", 0.1, 6, _pos, _vel, 4, _mass, _vol, _rubb/8, _size, [[0,0,0,1]], [0,1,0], 5, 0.05, "smokedebrisa.sqs", "", ""];
};

_maxspd = 20;
_mass  = 1.275;
_vol   = 1.0;
_rubb  = 1;
_size1  = [3,7.5,11,15];
_size2  = [4,8,10,8];
_numdrops = 60;

for [{_i = 0},{_i < _numdrops},{_i = _i + 1}] do
{
   _angh = random 359;
   _angv = (random 180) - 90;
   _rad  = 20 + random _maxspd;

   _radv = abs(_rad * sin(_angv));
   _radh = abs(_rad * cos(_angv));
   _vel = [sin(_angh)*_radh, cos(_angh)*_radh, sin(_angv)*_radv];
   drop [_drop1, "", "Billboard", 1, 3, _pos, _vel, 0.5, _mass, _vol, _rubb/2, _size1, [[1,1,1,0.6],[0,0,0,0.5],[0,0,0,0.4],[0.5,0.5,0.5,0]], [0,1,0], 5, 0.05, "", "", ""];
   _vel = [sin(_angh)*_radh, cos(_angh)*_radh, sin(_angv)*_radv];
   drop [_drop2, "", "Billboard", 1, 1, _pos, _vel, 0.5, _mass, _vol, _rubb/1.5, _size2, [[1,0.5,0,0.6],[1,1,1,0.5],[1,1,1,0.4],[1,1,1,0]], [0,1,0], 5, 0.05, "", "", ""];
};
Sleep 4;
deleteVehicle _log;

And the smokedebrisa.sqs
Code: [Select]
;mando explosion falling debris
;smokedebris.sqs v1.0
;Jan 2007 Mandoble
;
;This script is called automatically by debris drops created by mando_missilehead1a.sqs and mando_missilehead2a.sqs
;
_pos = _this
_mass  = 1.275
_vol   = 1.0
_rubb  = 1
_size1  = [0.5,2,2.5,3]
_type = "\ca\data\cl_basic"

drop [_type, "", "Billboard", 100, 3, _pos, [0,0,0], 0.5, _mass, _vol, _rubb/2, _size1, [[1,1,1,0.6],[1,1,1,0.4],[0.7,0.7,0.7,0.2],[0,0,0,0]], [0,1,0], 0.1, 0.1, "", "", ""]
exit
« Last Edit: 15 Jun 2007, 02:07:36 by Mandoble »

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re: non lethal explosions
« Reply #2 on: 15 Jun 2007, 02:05:41 »
isnt dere nythin more explosion like ? at least w/ a flash or someting ? cuz da fire drop effects dont look good  :( nd da smoke ones arnt really 2 my likin  :no:

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: non lethal explosions
« Reply #3 on: 15 Jun 2007, 02:09:23 »
Test the scripts in the above modified post. You should also add a sound file there for the explosion to be reallistic, dont forget to include it in your description.ext and in the script where the logic "Say" it.

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: non lethal explosions
« Reply #4 on: 15 Jun 2007, 04:21:25 »
Add a little rock shower to it :)
urp!

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re: non lethal explosions
« Reply #5 on: 15 Jun 2007, 09:38:39 »
exactly what i need  :good: but....... deres alwayz a but :moon:  :D

da explosion is a lot bigger dan i want... im makin it start indoors... nd dis explosion fill my whole room... can u edit da script a lil more ???

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: non lethal explosions
« Reply #6 on: 15 Jun 2007, 10:21:46 »
Adjust the _sizes of the particles: _size, _size1 and _size2
For example, pick up every number in these size arrays and divide by 3. Play with them till you get the desired size. You may use a parameter as the divisor factor, so you may have smaller or bigger explosions at will.

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re: non lethal explosions
« Reply #7 on: 15 Jun 2007, 12:14:48 »
thx :D  :-*

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: non lethal explosions
« Reply #8 on: 15 Jun 2007, 12:16:12 »
Dont kiss me  :P

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re: non lethal explosions
« Reply #9 on: 15 Jun 2007, 12:48:54 »
but ur cute :P
 :-*

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: non lethal explosions
« Reply #10 on: 15 Jun 2007, 14:31:59 »
and he has such a nice long sword
urp!

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: non lethal explosions
« Reply #11 on: 15 Jun 2007, 15:11:12 »
aaaaand... back on topic.