OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: bedges on 19 Aug 2005, 19:05:09

Title: spiral drops....
Post by: bedges on 19 Aug 2005, 19:05:09
i'm trying pretty much anything i can think of as i type this, but just in case i'm wasting my time, is it possible to get a drop particle to move both downwards and in a circle horizontally, a downward spiral in other words?
Title: Re:spiral drops....
Post by: RujiK on 19 Aug 2005, 21:49:55
Nope. Because you can only set a dropped objects velocity once sadly. I found this out when I was going to make bugs fly around the player however I could not get it to work.

Some one please correct me, However I dont think anyone will.
Title: Re:spiral drops....
Post by: General Barron on 20 Aug 2005, 01:16:49
Yeah, I wanted to do something like this before as well, but no dice.

You CAN execute a script after a particle 'dies', so you could make that script drop another particle in a slightly different direction... but I think that this is kinda unwieldly... best to just drop a number of short-lived particles in a spiral pattern.
Title: Re:spiral drops....
Post by: bedges on 20 Aug 2005, 09:11:12
yup... thought as much. guess who's been looking at vampire spells lately  ::)

second and related question - i am making an arc of drop particles in front of the player from -90 to 90 degrees, but flashpoint seems to align them north/south, or something weird is going on...

here's the drop code

Code: [Select]
_dir = getdir player
_dir = _dir - 90
_deg = random 180
_deg = _deg - (_deg mod 1)

drop ["halflight","","Billboard",2,1.5, [1*sin(_dir+_deg),1*cos(_dir+_deg),1],[0,0,0],0,1.275,1,0,[0.5,0.75,0.1],_color,[0],0,0,"","",player]

basically, when pointing due north it works as it should, in front of the player; when pointing due south it's behind the player; due east = to the right of the player; due west, to the left.

now i'm thinking it has something to do with the relative position of the particle to the player, i.e. to the left is -x, to the right is +x, but how do i correct the code to take account of this?

EDIT - fixed... i just took out the reference to the player's direction and it works a treat.