|
| 10 May 2015 07:51 PM |
Like, in a script?
The properties I'm trying to define are the Speed, Lifetime, and Color
http://wiki.roblox.com/index.php?title=API:Class/ParticleEmitter
doesn't explain it.
How do I define it? Can someone give me an example?
Thanks in advance!
-Theninjaguy987 |
|
|
| Report Abuse |
|
|
|
| 10 May 2015 07:52 PM |
NumberRange.new() for Speed and Lifetime ColorSequence.new() for colour. |
|
|
| Report Abuse |
|
|
amanda
|
  |
| Joined: 21 Nov 2006 |
| Total Posts: 5925 |
|
|
| 10 May 2015 08:04 PM |
bool http://wiki.roblox.com/index.php?title=API:Type/bool -Enabled
ColorSequence http://wiki.roblox.com/index.php?title=API:ColorSequence -Color
Content http://wiki.roblox.com/index.php?title=API:Content -Texture
float http://wiki.roblox.com/index.php?title=API:Type/float -LightEmission -Rate -VelocitySpread -ZOffset
NumberRange http://wiki.roblox.com/index.php?title=API:NumberRange -Lifetime -RotSpeed -Rotation -Speed
NumberSequence http://wiki.roblox.com/index.php?title=API:NumberSequence -Size -Transparency
Vector3 http://wiki.roblox.com/index.php?title=API:Vector3 -Acceleration |
|
|
| Report Abuse |
|
|
|
| 10 May 2015 08:21 PM |
Can someone give me an example?
Like, what goes in between the ()'s. I've tried everything I think might work, so please example?
And amanda, I didn't ask to be redirected to the wiki again. I already stated it didn't help... =/ |
|
|
| Report Abuse |
|
|
amanda
|
  |
| Joined: 21 Nov 2006 |
| Total Posts: 5925 |
|
|
| 10 May 2015 08:30 PM |
It was a bit of an inconvenience for me sorting those out and linking the appropriate wiki pages. You stated the actual API didn't help, so I assumed you were blind and didn't see you could click to see what arguments each property accepted.
It is another problem if you don't have the ability to read. For those like
ColorSequence.new()
and such, it tells you what to put in the parentheses. In that case, either one or two Color3 values.
To make a new Color3 value, you do Color3.new(#, #, #)
Color3's are composed of numbers between 0 and 1, so if you want to do RGB, you need to divide each number by 255
Color3.new(#/255, #/255, #/255)
So a valid way to set the Color of a ColorSequence is this:
ParticleEmitter.Color = ColorSequence.new(Color3.new(23/255, 1/255, 160/255), Color3.new(255/255, 82/255, 160/255))
Or if you think that is messy, you could always make variables.
local startColor = Color3.new(23/255, 1/255, 160/255) local endColor = Color3.new(255/255, 82/255, 160/255)
ParticleEmitter.Color = ColorSequence.new(startColor, endColor) |
|
|
| Report Abuse |
|
|