OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: sfc.itzhak on 19 Apr 2007, 11:12:58
-
hey..
i searched but didnt understood how to do it..
i want by a script that there sill be a big whit smoke from the right side of the tank and to keep it runing until an deactivation.
is it possibale and how...
thanks.
-
Of course that is possible and quite easy.
Change colour array and sizes as needed, if you set, externally, global variable stopsmoke to true, the smoke will stop.
I suggest you to play with other particle array elements until you get the desired final effect. You may also experiment with drop dialog (look for it in Editor Depot scripts).
;Execute it passing vehicle and vehicle's relative position of the smoke
_vehicle = _this select 0
_relpos = _this select 1
stopsmoke = false
_size = [1,2.5,3,3.5]
_colours = [[0.5,0,0.5,1],[0.7,0,0.7,0.5],[0.8,0,0.8,0],[0.8,0,0.8,0]]
#dropsmoke
drop ["cl_basic","","Billboard",100,2,_relpos,[0,0,1],0,1.0,1.0,0.05,_size,_colours,[0],0,0,"","",_vehicle]
~0.05
?!stopsmoke: goto "dropsmoke"
exit
-
it dosent work it gives me an eror..
type any somthin somthing
-
"type any somthin somthing" is a quite weird error BTW, never seen that before >:(
[yourvehiclename, [0,0,0]]exec"nameyougavetothescript.sqs" fails where? Perhaps you can point to the line number, if any. And perhaps you may take the time needed to point the exact error message text.
-
my mistake it works..
thanks alot mandoble..
edit..
how do i make it thicker??
-
@sfc.itzhak
please do not quote the post to which you are replying - there's no need.
-
how do i make it thicker??
Increase the size, increase the Alpha of each colour array (last number is transparency, 0 = full transparent), drop more than one particle each time, you may play with velocity vector which is [0,0,1] in the exaple to have particles moving in different directions to generate a bigger cloud. Check also ,0,0 before the last "", "", these values help you to add random trajectory variations, and the most important thing, learn every parameter here: Particle Array (http://www.ofpec.com/COMREF/arrays.php#ParticleArray) and, as said before, experiment with particle parameter combinations with Drop Dialog and Drop effects present here (http://www.ofpec.com/ed_depot/scripts.php).
-
thanks allot really...
but if i may trouble you with 1 more question..
how do i define a key so whan i press it the smoke will begin and if i press it agin it will stop.
thanks again sfc.itzhak
-
You may define actions for keys in ArmA, as far as I know, no way in OFP. But you can define menu actions. In your mission, do the following:
Create an init.sqs script if still not present:
;init.sqs
stopsmoke = true
;Change _relpos to have the smoke comming out from the desired vehicle spot
_relpos = [0,0,0]
[yourvehiclename, _relpos]exec"whitesmoke.sqs"
player addAction ["Switch smoke", "switchsmoke.sqs"]
exit
And the switchsmoke.sqs script
;switchsmoke.sqs
stopsmoke = !stopsmoke
And finaly change your smokescript this way (lets say it is named whitesmoke.sqs)
;whitesmoke.sqs
;Execute it passing vehicle and vehicle's relative position of the smoke
_vehicle = _this select 0
_relpos = _this select 1
stopsmoke = true
_size = [1,2.5,3,3.5]
_colours = [[0.5,0,0.5,1],[0.7,0,0.7,0.5],[0.8,0,0.8,0],[0.8,0,0.8,0]]
#startingpoint
@!stopsmoke
#dropsmoke
drop ["cl_basic","","Billboard",100,2,_relpos,[0,0,1],0,1.0,1.0,0.05,_size,_colours,[0],0,0,"","",_vehicle]
~0.05
?!stopsmoke: goto "dropsmoke"
goto "startingpoint"
exit
-
Try hardrock's Keyboard Input Script in the scripts section of the Ed Depot (http://www.ofpec.com/ed_depot/scripts.php).¦nbsp; It is always worth checking the Ed Depot(and the FAQ) to see if someone has already done it.