View unanswered posts | View active topics It is currently Fri Dec 27, 2024 8:31 am



Reply to topic  [ 5 posts ] 
 MovableMan:AddParticle() Quantity 
Author Message
User avatar

Joined: Wed Feb 17, 2010 12:07 am
Posts: 1545
Location: That small peaceful place called Hell.
Reply with quote
Post MovableMan:AddParticle() Quantity
As the title somewhat says, Is there any way to get this one line to add more than just one particle or do I have to make a seperate line for each Function to add or is this just some wierd question and get it to just add an Emitter instead?

Thanks.


Tue Dec 21, 2010 6:44 am
Profile
happy carebear mom
User avatar

Joined: Tue Mar 04, 2008 1:40 am
Posts: 7096
Location: b8bbd5
Reply with quote
Post Re: MovableMan:AddParticle() Quantity
You have to do it one at a time. Something like this would work for what you're thinking though.
Code:
for i = 0 to 10 do
  local particle = new particle (pseudocode)
  movableman.addparticle(particle)
end

I am unsure if for loops are done that way, but that's the general algorithm.


Tue Dec 21, 2010 7:20 am
Profile
User avatar

Joined: Wed Feb 17, 2010 12:07 am
Posts: 1545
Location: That small peaceful place called Hell.
Reply with quote
Post Re: MovableMan:AddParticle() Quantity
Alright, thanks Duh.


Tue Dec 21, 2010 7:38 am
Profile
User avatar

Joined: Tue Dec 12, 2006 3:10 pm
Posts: 495
Location: Uncertain quantum state
Reply with quote
Post Re: MovableMan:AddParticle() Quantity
Do not define a variable local multiple times.

Is baaad.

Code:
local particle
for i = 0, 10 do
particle = Create<insert class here>("Particle Name")
MovableMan:AddParticle(particle)
end


Tue Dec 21, 2010 10:15 am
Profile
happy carebear mom
User avatar

Joined: Tue Mar 04, 2008 1:40 am
Posts: 7096
Location: b8bbd5
Reply with quote
Post Re: MovableMan:AddParticle() Quantity
Ah, my bad. Thanks for the correction, findude.


Tue Dec 21, 2010 5:38 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.072s | 14 Queries | GZIP : Off ]