Jump to content
Sign in to follow this  
VALROKOFFICIAL

How to call muzzle flash effect on tripflare

Recommended Posts

Hello guys,

I am creating a trip-flare, triggered by a trigger with the call for spawning a flare in the air.

Here, I have created a custom sound for the firing and flight of the flare, but am missing some kind of "flash", by the "flare" on ground (I am using a wired AP mine for visual reference), when it has been triggered.

I have searched for the call of a flash-effect, but have unfortunately not found anything on the subject.

What I did experiment with was the trigger's effects; thus using the stock A3 effects with a white fade; which gave some kind of a flash on the screen -but it was global, giving everyone in the mission the same visual effect, instead of just the persons next to the object.

Do we have anyone in here able to help me out on how to call for a certain effect, for an object? What could be the command of this?

Essentially what I am looking for is a kind of muzzle flash. Dampened, but still giving one a feeling of something going off, visually.

Thanks!

Share this post


Link to post
Share on other sites

Thanks for the reply.

Unfortunately, I can't seem to understand it correctly. It does not really make any sense. Also the particle editor does not have any effect that suits this purpose I think.

I have even tried reading through some posts on particleArrays and such; but no cigar.

Is it at all possible for you to describe it a bit more detailed on how I could be doing this?

I found this thread, containing some information; but I do not know if that is the correct one for me? https://community.bistudio.com/wiki/ParticleArray

Share this post


Link to post
Share on other sites

The drop command uses the ParticleArray format. So yes, that is relevant.

The explanation on the wiki is really detailed so I wouldn't know what else to tell you.

You'll probably simply have to do some trial&error with the debug console to see which settings look best.

In fact, the settings for your specific effect should be pretty simple, you just have to find the right sprite to use. Spark or flare-like sprites shouldn't be too hard to find in the default set.

Share this post


Link to post
Share on other sites

Alright,

Would the "drop" command be added to a trigger, or would it be set to something else?

And where do I even find the default sprites, flares etc? :s

I have tried searching for the "ca" folder for roughly 1-2 hours time now..

---------- Post added at 13:22 ---------- Previous post was at 12:31 ----------

This is how far I have gotten at this stage (from the template):

_pos = [ position trpflr1 select 0,position trpflr1 select 1,1 ];

drop ["cl_fire","","Billboard",0.01,0.2,_pos,[0,0,0],0,1,1,0,[20 + random 20],[[1,1,1,1],[1,1,1,0.7]],[1,0],0,0,"","",""];

I have saved it as a "flare".sqf script, and plan on pasting a "0 = [this] execVM "flare.sqf";" in the trigger for the actual flare itself. "trpflr1" is the APERS mine itself (the object) -Should this be changed to a logic placement?

When I am eventually finished with it, would this be the right way to go?

EDIT:

I have tried a few things.

Once of them is testing the default drop-script:

drop ["cl_basic", "", "Billboard", 1, 1, [-3.5*(sin(direction xural)), -3.5*(cos(direction xural)),0], [ random 0.1,random 0.1,random 0.5], 1, 0.005, 0.0042, 0.7, [0.3,3], [[0.5,0.5,0.5,0],[0.7,0.7,0.7,0.5],[0.9,0.9,0.9,0]], [0,1,0,1,0,1], 0.2, 0.2, "", "", xural]

another is the default ParticleArray example:

_pos = [ position logic1 select 0,position logic1 select 1,10 ];

drop ["blesk1","","Billboard",0.01,0.2,_pos,[0,0,0],0,1,1,0,[20 + random 20],[[1,1,1,1],[1,1,1,0.7]],[1,0],0,0,"","",""];

This has been done by setting them up in an sqf script in the missions folder, named "flare(.sqf)".

After this, I have called for the script upon activation by the trigger, with the "0 = execVM" command.

Result: Nothing has happened yet. Absolutely nothing.

I must be doing something wrong..

Edited by VALROKOFFICIAL

Share this post


Link to post
Share on other sites

drop can be used pretty much wherever you like.

You can also run it from the developer console, for testing.

Oh and do take a look at the parameters in your particle array. You're going to have a hard time observing a particle effect that last only for 0.2 seconds.

Alternately, use the editor that I posted before. It's there for a reason. ;)

Check out some of the other example (though the particle-paths may be outdated).:

https://community.bistudio.com/wiki/ParticleTemplates

Share this post


Link to post
Share on other sites

Yeah, I edited that to 2 seconds and 3 seconds before I tried to test it ;)

Okay, I have tried every one of the solutions. I am just about ready to give up. I am a noob when it comes to this kind of scripting. I have no idea what I am doing, despite the fact that I follow every step of the explanations and use every bit of the tools given. I have been through "drop", the templates, the example through ParticleArray etc.

Essentially, what I am trying to do is to get to use the particle effect: "\Ca\Data\ParticleEffects\SparksEffect\SparksEffect.p3d", as it sounds like that is the one I would be using.

My tripflare (the mine) is named: "trpflr1"

The object emitting the sound when the trigger is being activated is named: "flr1"

The trigger itself ("trig11"), with the code:

Condition: "isserver && this && ((getPosATL player) select 2 < 3)"
On Act: "flrObj = "F_40mm_white" createvehicle ((trig11) ModelToWorld [0,10,200]); flrObj setVelocity [0,0,-1]; flr1 say3D "sound1"; trpflr1 enableSimulationGlobal false;"
is where I want to implement the call for the particle-script; by using "execVM".

If it is at all possible, could I have a friendly soul out there who knows exactly how to do this take out a few minutes of your schedules, and create this kind of script, that you know is working for sure? At this stage, I am either doing everything wrong (which is a possibility when it comes to this), or the paths/syntax have been changed..

It is bugging me like hell -.-

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  

×