OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: RedHouse 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.
-
Where exactly in there does the error crop up.......I mean where is the '#' placed?
Planck
-
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.
-
I was wondering about that too. ;D ;D
Planck
-
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
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 - 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
-
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
-
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
-
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.
-
maybe i didnt explain what i meant clearly enough the i is a 0 its just if i type a 0 in [] you get
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
-
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:
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.
-
it works! your a geneius. Cheers, thanks alot