OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: The-Architect on 01 Jan 2006, 06:41:10

Title: The Drop
Post by: The-Architect on 01 Jan 2006, 06:41:10
Ok, I got one of the drop tutorials from the ed depot and I created an effect I like.

Code: [Select]
["cl_basic","","Billboard",1,5.09846,[9696.86,3963.32,0],[0,0,3.07692],0,1.3998,1,1,[0.11,0.11],[[1,1,1,1],[1,1,1,1],[1,1,1,1],[1,1,1,1]],[0,1,0,1],2.46154,5,"","",""]
That's as far as I got.
I want to have many of these appear around the player so as to give the effect of snow flakes being blown around.

Where do I go from here?
Title: Re:The Drop
Post by: THobson on 01 Jan 2006, 10:23:33
Put it in a loop with a small (0.1 to 0.8) delay and a counter to tell it when to stop?  If you don't want it to stop suddenly then use the counter to lengthen the delay over time.
Title: Re:The Drop
Post by: The-Architect on 02 Jan 2006, 02:01:35
What I'm saying is that that line of code is all I have sitting in the .sqs file. I don't know how to make the thing appear in the game or anything.
Title: Re:The Drop
Post by: Igor Drukov on 02 Jan 2006, 03:07:02
This line will only create... one snowflake.
What you need is a loop that creates several.


But why not use Kegetys' snow script ? Here it is, as extracted from his winter Nogojev :

Code: [Select]
;
; Snowing script v1.0 by Kegetys <Kegetys@raketti.net>
; http://www.ofp.kege.cjb.net
;
; For Winter Nogojev
;

;
; Usage:
; [density] exec "\KEGnoecain_snow\script\snow.sqs"
;
; where density is the density of the snowing. If density is not specified a default of 5 is used.
; Note that the maximum working density is relative to the FPS.
;

_velocity = [0,0,-0.61]

_density = 5

? count _this > 0 : _density = _this select 0



#Begin

~0.001
_spawnDist = 35
_spawnHeight = 15



_foo = 0

#luup
_posDrop = [(getpos player select 0)-_spawnDist+(random (_spawnDist*2)), (getpos player select 1)-_spawnDist+(random (_spawnDist*2)),  (getpos player select 2)+_spawnHeight]
_posDrop = [(_posDrop select 0)+((velocity vehicle player select 0)*5),(_posDrop select 1)+((velocity vehicle player select 1)*5),_posDrop select 2]
drop ["cl_water", "",            "Billboard", 1,           7,       _posDrop, _velocity,     1,                0.000001,  0.000, 1.4,     [0.06,0.06], [[1,1,1,0], [1,1,1,1], [1,1,1,1], [1,1,1,1]], [0,1,0,1,0,1],  0.2,                   1.2,                      "",      "",            ""]
_foo = _foo + 1
? _foo < _density : goto "luup"

goto "Begin"
Title: Re:The Drop
Post by: The-Architect on 02 Jan 2006, 03:43:28
Yep, I already did.

I manages to get a fairly acceptable effect. I'll probably need helkp with sorting out some final issues in the future so I'll keep the thread open.

Cheers.
Title: Re:The Drop
Post by: Mikero on 04 Jan 2006, 11:15:15
Ha! crafty bugger.  you're trying to win the Xmas Competition by snowflakes alone @architect
Title: Re:The Drop
Post by: The-Architect on 04 Jan 2006, 21:43:07
Lol, no Mikero. We aren't allowed to win it are we?
Anyway it's for a winter mission I'm making. Probably release it as an addon free normal weather mission too.