Home   Help Search Login Register  

Author Topic: white smoke from the side of a tank script  (Read 1674 times)

0 Members and 1 Guest are viewing this topic.

Offline sfc.itzhak

  • Members
  • *
white smoke from the side of a tank script
« 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. 

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: white smoke from the side of a tank script
« Reply #1 on: 19 Apr 2007, 12:42:10 »
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).

Code: [Select]
;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

Offline sfc.itzhak

  • Members
  • *
Re: white smoke from the side of a tank script
« Reply #2 on: 19 Apr 2007, 12:58:46 »
it dosent work it gives me an eror..

type any somthin somthing
« Last Edit: 19 Apr 2007, 19:15:24 by bedges »

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: white smoke from the side of a tank script
« Reply #3 on: 19 Apr 2007, 13:32:17 »
"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.

Offline sfc.itzhak

  • Members
  • *
Re: white smoke from the side of a tank script
« Reply #4 on: 19 Apr 2007, 14:19:45 »
my mistake it works..

thanks alot mandoble..

edit..
how do i make it thicker??
« Last Edit: 19 Apr 2007, 19:15:35 by bedges »

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: white smoke from the side of a tank script
« Reply #5 on: 19 Apr 2007, 19:16:12 »
@sfc.itzhak

please do not quote the post to which you are replying - there's no need.

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: white smoke from the side of a tank script
« Reply #6 on: 19 Apr 2007, 19:23:09 »
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 and, as said before, experiment with particle parameter combinations with Drop Dialog and Drop effects present here.

Offline sfc.itzhak

  • Members
  • *
Re: white smoke from the side of a tank script
« Reply #7 on: 19 Apr 2007, 20:05:44 »
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

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: white smoke from the side of a tank script
« Reply #8 on: 19 Apr 2007, 20:53:48 »
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:
Code: [Select]
;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
Code: [Select]
;switchsmoke.sqs
stopsmoke = !stopsmoke

And finaly change your smokescript this way (lets say it is named whitesmoke.sqs)
Code: [Select]
;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


Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: white smoke from the side of a tank script
« Reply #9 on: 20 Apr 2007, 21:25:17 »
Try hardrock's Keyboard Input Script in the scripts section of the Ed Depot.¦nbsp; It is always worth checking the Ed Depot(and the FAQ) to see if someone has already done it.
urp!