Jump to content
Sign in to follow this  
Trixta

Flares and Camcreate

Recommended Posts

Can somebody please walk me through camcreating a flare?

I need it for a cutscene and have tried everything I've found here and on biki but cannot make it work. banghead.gif I'm not new to scripting (nor am I a master) but this eludes me.  

Please: nice, easy, idiot-proof steps.

Share this post


Link to post
Share on other sites

Flares are a bit tricky. Maybe I could give you some tips that would help.

Firstly, I don't know if camCreate is a good idea. I think createVehicle might be a better choice. At least, consider trying them both.

Secondly, flares take a little while to light up, just as they do when you fire them in-game. To get around this, create them somewhere before you need to use them. I like to put flares at [0,0,10000]. A few seconds later, I use setPos to move it where it should be.

Thirdly, and I'm not too certain about this, flares seem to have a low terminal velocity once they're glowing, so they don't fall too fast I suppose. The side-effect of this is that it seems to be difficult to make them go very fast using setVelocity.

Share this post


Link to post
Share on other sites

Thanks for the reply Nichevo.

I tried using both camcreate & createvehicle. I can createvehicle a smoke grenade no problem but when I try pasting a flarewhite_m203 in it just doesn't seem to work.

I took on board what you said and scripted:

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

flarex=flarepos select 0;

flarey=flarepos select 1;

flarez=flarepos select 2;

flare1 = "FlareWhite_M203" createVehicle [0,0,10000];

titletext ["5","plain"];

~1

titletext ["4","plain"];

~1

titletext ["3","plain"];

~1

titletext ["2","plain"];

~1

titletext ["1","plain"];

~1

flare1 setpos [flarex,flarey,flarez+50];

titletext ["Flare fired","plain"];

exit

The titletext is just to let me know that the script is running and introduce the delay you talked about. Flaresite is an object that the flare should appear above. The script is run from a radio trigger.

I run it and the countdown shows ok (the script is definitely running) but no sign of the flare.

Interestingly, if I replace FlareWhite_M203 with HWWMV a Hummer appears ok.

Can you post one of your scripts that work (including instructions on setting up the trigger etc.). There's obviously something simple I'm missing here and seeing how you manage it may well highlight where I'm going wrong. Cheers.

Share this post


Link to post
Share on other sites

Of course it doesn`t work, you are creating "magazine" instead of "bullet" (as it should be). Flare "bullet" (in CfgAmmo) is named "F_40mm_White". smile_o.gif

Share this post


Link to post
Share on other sites

whistle.gif

Ah, erm. Yep. That would be it. Works like a charm.

Now, if you don't mind I'm just going to hide under my desk for a while. I did warn you that it was an idiot who needed guiding.

Thanks.

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  

×