Home   Help Search Login Register  

Author Topic: Particle scripting. What's wrong?  (Read 619 times)

0 Members and 1 Guest are viewing this topic.

RedHouse

  • Guest
Particle scripting. What's wrong?
« on: 17 Dec 2004, 01:30:21 »
Ok I'm fairly new to the particle side of scripting, I created this line of code to create a particle but it does not work. Can anyone see any errors in this line of code?

All the letters (eg _a, _b, _c) stand for numbers

Drop ["cl_basic","","Billboard",2,15,[_a,_b,_c],[0,0,0],0,_d,0.77,_e,[0.01,0.02,0],[0.1,0,_f],[0],1,0.5,"","",""]

the error is type number expect array. But I can't see where anymore arrays are needed.

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Particle scripting. What's wrong?
« Reply #1 on: 17 Dec 2004, 01:44:17 »
Where exactly in there does the error crop up.......I mean where is the '#' placed?


Planck
I know a little about a lot, and a lot about a little.

Offline MI_Fred

  • Members
  • *
  • AA
    • OFP Team Finlanders
Re:Particle scripting. What's wrong?
« Reply #2 on: 17 Dec 2004, 01:55:01 »
Hm strange what is that round thingy there? I ... can't ... copy ith! ;D

Anywayho,

Drop ["cl_basic","","Billboard",2,15,[_a,_b,_c],[0,0,0],0,_d,0.77,_e,[0.01,0.02,0],[[[0.1,0,_f]]],
,1,0.5,"","",""]


Missing brackets from the colour array. Ironically I couldn't colour them. grr.
« Last Edit: 17 Dec 2004, 01:57:20 by MI_Fred »
There's gooks over there, there's mines over there, and watch out those goddamn monkeys talk, I'll bite ya.

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Particle scripting. What's wrong?
« Reply #3 on: 17 Dec 2004, 01:56:31 »
I was wondering about that too.   ;D ;D


Planck
I know a little about a lot, and a lot about a little.

RedHouse

  • Guest
Re:Particle scripting. What's wrong?
« Reply #4 on: 17 Dec 2004, 02:45:04 »
Ok i've just relized why theres that round thingy if you type but with a 0 or a o instead of an i you get this [0]
but anyway heres the line of code with an i instead of a 0. I've put the # thing in to show where the error message comes up but being at the end suggests theres nothing wrong with whats in the middle, so what is wrong? Even if you check the disable smilies box you still get the [o] its probably for a bullet point or something


Drop ["cl_basic","","Billboard",2,15,[_a,_b,_c],[0,0,0],0,_d,0.77,_e,[0.01,0.02,0],[[0.1,0,_f]],,1,0.5,"","",""]#

@MI_Fred
It just says generic error

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Particle scripting. What's wrong?
« Reply #5 on: 17 Dec 2004, 02:52:34 »
What value does 'i' have.

The color array is supposed to be of the form [Red,Green.Blue,Alpha].........I least that is my understanding.

e.g. [1.0,0.5,0.5,0.0]

Planck
I know a little about a lot, and a lot about a little.

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Particle scripting. What's wrong?
« Reply #6 on: 17 Dec 2004, 03:03:46 »
Forgot to mention...........

There is a demo for the drop command in the Editors Depot........Tutorials section.

It uses a dialog for you to change various parameters.......try it out.

Here:
http://www.ofpec.com/editors/browse.php?browsewhat=1&start=50

Drop [] Tutorial by VektorBoson


Planck
« Last Edit: 17 Dec 2004, 03:06:35 by Planck »
I know a little about a lot, and a lot about a little.

Offline MI_Fred

  • Members
  • *
  • AA
    • OFP Team Finlanders
Re:Particle scripting. What's wrong?
« Reply #7 on: 17 Dec 2004, 03:09:57 »
If you look closely, or simply copy&paste the line I gave, it should atleast be different, if not even work.

The difference, double brackets in the colour array. See, the colour array has arrays inside it, for the colour and opacity transitions. When you have a shift from a colour to another you'd notice your fault easier:
[[[0.5,0.5,0.5,0.5],[0.5,0.5,0.5,0.5]]]

Atleast with close eye'ing that's what I'd slap you for  ;D

And now I understand the I, or I think I do. You have 1 too many elements... perhaps your trying to use I as a colour?
Drop ["cl_basic","","Billboard",2,15,[_a,_b,_c],[0,0,0],0,_d,0.77,_e,[0.01,0.02,0],[[[0.1,0,_f],]],1,0.5,"","",""]
Now you should see it.
« Last Edit: 17 Dec 2004, 03:12:51 by MI_Fred »
There's gooks over there, there's mines over there, and watch out those goddamn monkeys talk, I'll bite ya.

RedHouse

  • Guest
Re:Particle scripting. What's wrong?
« Reply #8 on: 17 Dec 2004, 03:26:23 »
maybe i didnt explain what i meant clearly enough the i is a 0 its just if i type a 0 in [] you get [0]

And that part is the AnimationPhase, and i had already d/l the tut, i understand the 4 values in the array [red,green,blue,alpha] alpha is transparancey. but i don't understand what you mean by double brackets

Offline MI_Fred

  • Members
  • *
  • AA
    • OFP Team Finlanders
Re:Particle scripting. What's wrong?
« Reply #9 on: 17 Dec 2004, 03:37:17 »
Oh, yea yabb is buggy that way. And makes my task difficult too. For all I know you might already have double brackets there. But try copy&pasting this:
Code: [Select]
Drop ["cl_basic","","Billboard",2,15,[_a,_b,_c],[0,0,0],0,_d,0.77,_e,[0.01,0.02,0],[[0.1,0,0,_f]],[0],1,0.5,"","",""]

Note that you were still missing 1 element from the colour arrays first and only array. b from r g b.

And the code tag helps in this case of yabb.
There's gooks over there, there's mines over there, and watch out those goddamn monkeys talk, I'll bite ya.

RedHouse

  • Guest
Re:Particle scripting. What's wrong?
« Reply #10 on: 17 Dec 2004, 03:45:43 »
it works! your a geneius. Cheers, thanks alot