OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Messiah on 14 Nov 2005, 11:46:38

Title: Working Para Flares?
Post by: Messiah on 14 Nov 2005, 11:46:38
I've just finished modeling and texturing a Uk used para flare (not that it was that complex) and we were quite keen on simulating a para flare as closely as possible...

currently it should fire up a normal flashpoint flare (but these dont light up at the moment - weird) but i was wondering if it would be possible for it to fire some dmmy ammo, then at 300m cam create a parachute (custom one) with a flare suspended from it...

possible?
Title: Re:Working Para Flares?
Post by: Messiah on 15 Nov 2005, 10:19:02
not even a clue?

hmm... my scripting is basic at best, but i reckon i can make a script that allows it to work for one man at a time... it's the other 20 or so who could be using it at once that worry me  :P
Title: Re:Working Para Flares?
Post by: Tyger on 15 Nov 2005, 12:28:30
I would assume it's possible. Just at an event handler that detects when the unit has fired, use nearestObject to detect the dummy ammo's position, then wait for it's (this select 2) value to begin to decrease, then delete it and create your para flare.
Title: Re:Working Para Flares?
Post by: h- on 15 Nov 2005, 18:21:45
Possible? Yes.

But (and we are now crossing over to Addons: Editing btw ;) ):
OFP flares have hardcoded features, one being that it will light up only after some time has passed once the flare has been 'initialized' (shot, camCreated, etc..)..
So, using flare as a dummy ammo and/or as the light source at the end of a parachute would not work very well..

I would suggest using a grenade (glauncher nade) with initSpeed etc. values so low that it's trajectory would 'simulate' a flare..
And then use the method Tyger here suggested, but I would use velocity check instead of getPos check on the dummy nade..
And, instead of using a flare, use a 'fireplace' object which is then setpos looped with the parachute to 'simulate' a flare..

I'm way too busy and tired to give any example codes, sorry  :-\ :-[
Title: Re:Working Para Flares?
Post by: Messiah on 15 Nov 2005, 19:40:34
no worries fella, i know you're busy as always

will try those suggestions out, but no doubt be back with problems  ;D