Home   Help Search Login Register  

Author Topic: spiral drops....  (Read 541 times)

0 Members and 1 Guest are viewing this topic.

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
spiral drops....
« 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?

Offline RujiK

  • Members
  • *
  • KoKo Puh-Fizzles!
Re:spiral drops....
« Reply #1 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.
I like your approach, lets see your departure.
Download the New Flashlight Script!

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:spiral drops....
« Reply #2 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.
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:spiral drops....
« Reply #3 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.
« Last Edit: 20 Aug 2005, 10:43:10 by bedges »