OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: bedges on 03 Feb 2005, 18:45:59
-
heheh. right, i'm trying to camcreate a flare into being, and having had a look in the tutorials i can find nothing about camcreating them, only making loons fire them. having learned about camcreating 2 colliding shells to make an explosion in midair, i thought the same principle might be true here, but all i'm getting is a wee puff of smoke and that's it...
{Flare} camcreate [getmarkerpos "flare" select 0, getmarkerpos "flare" select 1, 2]
what am i doing wrong?
-
The default BIS "flares" needs to be created at a height, say 100m, because they are starshells and drop. They disappear on contact with the ground.
There's also a couple of seconds delay between camcreating one and it illuminating.
I believe there are some light sources in the BAS packages, but it's a big download just for those.
-
I used this successfully in missions where I need a flaretrap
_AmmoType = "flare"
_tempObj = _AmmoType camCreate[_cx, _cy, _cz]
~0.01
_tempObj = objNull
Are you looking for an explosion to occur? Because I don't think you'll get one with 2 flares. If you want multiple flares next to each other then set their x-y coords just slightly different and loop the code above.
-
Your syntax is alll fucked up, to use the technical term. Check the example in the online comref, though actually you'll need to amend it to get the height.
A flare will light automatically in the air, you don't need to create a second to collide with it. Flares go out automatically when they get close to the ground. It is hard or impossible to see them in daylight or twilight.
-
What about adding an even6Handler????
init.sqs
flare addeventhandler ["fired", {[flare, _this select 4, _this select 1, _this select 3] exec "follow.sqs"}]
follow.sqs
_man = _this select 0
_RatingMan = rating _man
_bullet = nearestObject [_man, _this select 1]
_weapon = _this select 2
_ModeDeTir = _this select 3
_man cameraeffect ["TERMINATE","Front"]
setAccTime .5
? speed _bullet == 0 : goto "end"
_bullet cameraeffect ["EXTERNAL","Front"]
_bullet camSetTarget _man
_bullet camSetRelPos [3,3,1]
_bullet camCommit 0
_bullet camSetTarget s1
@speed _bullet != 0
? rating _man != _RatingMan : goto "camera"
#camera
titlecut ["", "BLACK IN",0]
_cam = "camera" camCreate [0,0,0]
_cam cameraEffect ["INTERNAL","Back"]
_cam camSetTarget _bullet
_cam camSetRelPos [3,3,1]
_cam camCommit 0
@camCommitted _cam
setAccTime .5
@speed _bullet == 0
? rating _man == _RatingMan : goto "end"
showCinemaBorder FALSE
_bullet cameraeffect ["FIZED","Front"]
~1.5
#end
_man cameraeffect ["TERMINATE","Front"]
camDestroy _cam
setAccTime 1
showCinemaBorder TRUE
^^ create a man named flare (such as a Resistance Officer (night) ... and make it dark.
Then shot the flare...
It chould follow the flare if you want it to... just edit the script.
*****
Is this somethign you wanted... if not... explain what you meant.
-
{flarered} camcreate [getpos sumthing select 1,getpos sumthing select 2,200]