Jump to content
Sign in to follow this  
_Pingu_

Trip flare effects

Recommended Posts

I've been working on a tripflare, everything is done and working aside from the effect. I currently have it spawning a flare a couple of hundred meters above the tripflare, which isn't right as it's a ground based tripflare not a parachute one. I'll probably end up releasing two versions of the flare (ground and parachute based) but I need help with the effects for the ground based one.

I have no idea how to do effects at all, does anyone know how to get something looking like this? The smoke is important, multiplayer compatibility is imporant too (though if it's hard I can probably get the detonation code to run on all clients as it isn't as imperative as it is with claymores for them to detonate at the exact same moment).

http://www.youtube.com/watch?v=w3FCDM0kF8w

Share this post


Link to post
Share on other sites

Thats an awesome idea you have there. Unfortunately I can only be a cheerleader and not really help you any here, but I really hope you get the help you need. Just reading this popped many ideas for night missions into my head. Someone help a brotha out biggrin_o.gif

Share this post


Link to post
Share on other sites

Pingu, I'm pretty sure there is an M203 launched flare in the MAPFACT Misc.pbo addon. There's a parachute one and a ground based one. Will be on armaholic in the misc section I think.

Share this post


Link to post
Share on other sites

Pingu, my fuel fire effects in my smoke addon uses very bright orange lights for the duration of the fire. Sounds like you could use this effect in your addon? It's pretty simple just spawning a light.

*edit* looks like the smoke could just be a modified smokeshell too.

Share this post


Link to post
Share on other sites

Chaos once made a ground base flare script for OFP.

Luckily i still got OFP installed biggrin_o.gif

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">;------------------------------------------------------------------;

;--- Scripted by Chaos --- for Operation Flashpoint RESISTANCE ----;

;-------------------------- in February 2004 ----------------------;

;------------------------------------------------------------------;

;------------------------------------ http://www.ofpmdb.de.vu -----;

;------------------------------------------------------------------;

; syntax: [object,delay1,delay2,"alarm_variable"] exec "ChSLTS.sqs"

_place = _this select 0

_lifeT = _this select 1

_delay = _this select 2

_alarm = _this select 3

call format ["%1=true",_alarm]

_fir01 = "fire" camcreate [(getPos _place select 0)+random 2-random 1,(getPos _place select 1)+random 1-random 2,0]

~.001

_fir01 setPos [(getPos _fir01 select 0),(getPos _fir01 select 1),-0.15]

~.001

_fir02 = "fire" camcreate [(getPos _fir01 select 0)+.01,(getPos _fir01 select 1),(getPos _fir01 select 2)]

_fir03 = "fire" camcreate [(getPos _fir01 select 0),(getPos _fir01 select 1)+.01,(getPos _fir01 select 2)]

_fir04 = "fire" camcreate [(getPos _fir01 select 0)-.01,(getPos _fir01 select 1),(getPos _fir01 select 2)]

_fir05 = "fire" camcreate [(getPos _fir01 select 0),(getPos _fir01 select 1)-.01,(getPos _fir01 select 2)]

_fir06 = "fire" camcreate [(getPos _fir01 select 0)+.01,(getPos _fir01 select 1)+.01,(getPos _fir01 select 2)]

_fir07 = "fire" camcreate [(getPos _fir01 select 0)-.01,(getPos _fir01 select 1)-.01,(getPos _fir01 select 2)]

[_place] exec "chslts_sound.sqs"

_fir01 inflame true

_fir02 inflame true

~.2

_fir03 inflame true

_fir04 inflame true

~.2

_fir05 inflame true

_fir06 inflame true

~.2

_fir07 inflame true

#loop

drop ["cl_basic", "", "Billboard", .005, 34, [0,0,-0.2], [0,0,0], 0.2, .25, 1.7, 4.0, [0.35,90.5,117.0], [[1,1,1,1], [1,1,1,1], [1,1,1,1]], [0], 0.0, 0.0, "", "", _fir01]

drop ["cl_basic", "", "Billboard", .05, 36, [0,0,-0.3], [0,0,0], 0.2, .35, 1.7, 4.0, [0.2,80.5,100.0], [[1,1,1,1], [1,1,1,1], [1,1,1,1]], [0], 0.0, 0.0, "", "", _fir01]

; shape, Ani, Type, TPer, LTime, Pos, MVeloc, RttVel, Wght, Vol, Rub, Siz, Clr, AnPhase, RndDirPer, RndDirInt, OnTmr, BefDstr, Obj

~.1

~_delay

_lifeT = _lifeT - 1

? _lifeT < 2.85 : _fir07 inflame false

? _lifeT < 2.40 : _fir06 inflame false

? _lifeT < 2.05 : _fir05 inflame false

? _lifeT < 1.60 : _fir04 inflame false

? _lifeT < 1.25 : _fir03 inflame false

? _lifeT < 0.80 : _fir05 inflame false

? _lifeT < 0.45 : _fir01 inflame false

? _lifeT < 4.40 : chsLTS_exit=true

? _lifeT > 0 : goto "loop"

~6

deletevehicle _fir01

deletevehicle _fir02

deletevehicle _fir03

deletevehicle _fir04

deletevehicle _fir05

deletevehicle _fir06

deletevehicle _fir07

~5

chsLTS_exit=false

chsLTS_exit=nil

exit

edit: looking at it imgame i remember that it was rather a smokescreen indicating the breach...still hope it helps in some way.

Share this post


Link to post
Share on other sites

OK here is the first test for you to try out Pingu. If your original Tripflare was MP then this should be too. Tripflare lasts for around 55-60 seconds, light is adjustable in Detonate.sqf and smoke is adjustable in config.

Oh BTW, there was an error on mission start because the dark green RVMAT is still local to your machine apparently smile_o.gif so for me the tripflare model itself is white and untextured.

Share this post


Link to post
Share on other sites

Pingu, in the Detonate script there is a setLightAmbient which can be set to give general lighting effect like this:

FlareTest1.jpg

or can be set to give a directional effect like this:

FlareTest2.jpg

As you can see the difference is quite a bit. Personally I prefer the directional effect, but of course it's up to you smile_o.gif

Also, you can set the effect to be somewhere in-between.

Share this post


Link to post
Share on other sites

Please directional! Thats the only way imho. Dont see a reason to use ambient as its a single bright lightsource.

Share this post


Link to post
Share on other sites

Thanks for that dmarkwick, works great. I'm just getting it flickering right now, I tried to play with the smoke but failed utterly. Is it easy to get it to originate from a much smaller point? Right now it looks like it's smoke blowing out of a large hole in a ground, I want a thin stream making an inverted cone coming from the top of the flare. Check the video in the first post, that's exactly what I want, is it possible? If not, can we at least make the particles smaller and the cloud itself less fat?

Share this post


Link to post
Share on other sites
Thanks for that dmarkwick, works great. I'm just getting it flickering right now, I tried to play with the smoke but failed utterly. Is it easy to get it to originate from a much smaller point? Right now it looks like it's smoke blowing out of a large hole in a ground, I want a thin stream making an inverted cone coming from the top of the flare. Check the video in the first post, that's exactly what I want, is it possible? If not, can we at least make the particles smaller and the cloud itself less fat?

I tried for that effect too but what's there is as close as a smokeshell will get, which as you might have seen in the script is exactly what it is. (Well, a modified and custom smoke shell especially for this addon anyway smile_o.gif)

I've not managed (yet wink_o.gif) to get the thin cone we saw in the vid (and which I based the effect on, as far as I could) and smaller particles just highlight the sprite nature of the particles. I also toyed with having them ejected upwards faster but to get an effect that would be worth the trouble makes the entire effect too tall.

However, I'll toy with it some more, see if anything new occurs to me, but I think for a simple quick solution it's not too bad.

Yeah the light flickering is the next stage I would have gone with, but if you want to do it then that's fine. Ramping down the flickering light toward the end of it's life would also add to the authenticity, shouldn't be hard to do I do it with lights in my own addons.

Share this post


Link to post
Share on other sites

Right Pingu I think I got it smile_o.gif

Replace your class CfgAmmo section with this:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

class CfgAmmo {

class TimeBombCore;

class Tripflare : TimeBombCore{

model = "\tripflare\models\m49a1";

};

class Grenade;

class GrenadeHand;

class TripflareSmoke : GrenadeHand {

model = "\ca\Weapons\anm8_white";

hit = 5;

indirectHit = 2;

indirectHitRange = 0.2;

cost = 100;

simulation = "shotSmoke";

explosive = false;

deflecting = 60;

explosionTime = 0.2;

timeToLive = 60;

soundHit[] = {"", 0, 1};

smokeColor[] = {1, 1, 1, 0.3};

explosionEffects = "";

class Smoke {

interval = 0.01;

cloudletDuration = 0.2; // time to live (not including fades)

cloudletAnimPeriod = 1.0; // animation speed

cloudletSize = 0.2;

cloudletAlpha = 1.0;

cloudletGrowUp = 1.0; // grow-up time

cloudletFadeIn = 0.2; // fade-in time

cloudletFadeOut = 1.0; // fade-out time

cloudletAccY = 2.5; // vertical acceleration

cloudletMinYSpeed = 0; // vertical speed range

cloudletMaxYSpeed = 10;

cloudletShape = "\ca\data\cl_basic";

cloudletColor[] = {1, 1, 1, 0.3};

initT = 1000;

deltaT = -500;

class Table {

class T1 {

maxT = 0;

color[] = {0.7, 0.7, 0.7, 1};

};

class T2 {

maxT = 1000;

color[] = {0.4, 0.4, 0.4, 1};

};

};

density = 1.0;

size = 0.1;

initYSpeed = 1.0;

timeToLive = 50;

in = 3.0;

out = 2.0;

};

};

};

And you will see a very accurate replication of the flare from the vid you posted up.

*edit*

Formatting seems to have gone a bit awry, but it should still work. Maybe quote the message & copy & paste from there to restore the tabs & spaces etc.

Share this post


Link to post
Share on other sites

Looks awesome, thankyou. I'll put my flicckering in and release them. Tomorrow, probably.

Share this post


Link to post
Share on other sites

Hey Pingu I was thinking you could have 2 lights on the go. One bright generic directional light that will peter out toward the end of it's life, and another dimmer light that will supply the flicker, and also the ambient ground lighting. I think it could be quite effective, but only trying it will show smile_o.gif

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×