View unanswered posts | View active topics It is currently Thu Dec 26, 2024 6:36 pm



Reply to topic  [ 5 posts ] 
 Particles Vanishings. 
Author Message
DRL Developer
DRL Developer

Joined: Tue Aug 11, 2009 5:09 am
Posts: 395
Reply with quote
Post Re: Particles Vanishings.
I think that doing self.Age = 1 (if set to 0 glows won't show) every frame extends the life time of the object, but you still need a mechanism to recreate it when it is eventually deleted. Have you tried setting MissionCritical to 1 in the ini?


Thu Feb 03, 2011 6:55 pm
Profile
DRL Developer
DRL Developer

Joined: Tue Aug 11, 2009 5:09 am
Posts: 395
Reply with quote
Post Re: Particles Vanishings.
Code:
function Create(self)
   self.Vel = (10,0)
end

function Update(self)
   self.Age=1
   
   if self.ToDelete then
      local SnowPixel = CreateMOPixel(self.PresetName, "Weather.rte")
      SnowPixel.Pos = self.Pos
      SnowPixel.Vel = self.Vel
      MovableMan:AddParticle(SnowPixel)
   end
end
I think this would make the pixel pretty much impossible to delete.


Fri Feb 04, 2011 11:53 am
Profile
DRL Developer
DRL Developer

Joined: Tue Aug 11, 2009 5:09 am
Posts: 395
Reply with quote
Post Re: Particles Vanishings.
Sorry, I just copied your code and did not notice the error in the create function. self.Vel = (10,0) sould be self.Vel = Vector(10,0)


Fri Feb 04, 2011 6:12 pm
Profile
DRL Developer
DRL Developer

Joined: Tue Aug 11, 2009 5:09 am
Posts: 395
Reply with quote
Post Re: Particles Vanishings.
No console errors? If you post your script I can take a look.


Sat Feb 05, 2011 9:45 pm
Profile
DRL Developer
DRL Developer

Joined: Tue Aug 11, 2009 5:09 am
Posts: 395
Reply with quote
Post Re: Particles Vanishings.
The code I gave you only makes an object hang around for ever, you have to add the code that spawn the snow yourself.


Sun Feb 06, 2011 12:08 am
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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.478s | 13 Queries | GZIP : Off ]