[Closed] Particles won't activate
Hey,
I’m creating some particles in maxscript to do some selections, but the particles don’t show up. If I create a new standard flow manually in particle view after I run the script, and delete it right away, the particles created with the script show up. Is it some variables I don’t have initialized or something similar?
Here is the script
http://folk.ntnu.no/havardsc/scripts/tmp/particleTrails.ms
Pick the plane as a surface and the sphere as a trailer object and hit go.
As a side question, if I get my particles to show up, some still spawn randomly over the plane surface and the others spawn correctly, the effect I want to achieve is in this file http://folk.ntnu.no/havardsc/scripts/tmp/pathdisplace2.max
A pointer to what I do wrong would be great!
It works for me as far as I can see the particle ticks in the viewport. You can try just cycle the emission state with <PF_Source>.Enable_Particles
In the Position Object operator you need to enable If Location Is Invalid->Delete Particles
Position_Object : Helper [left]<Position_Object>.delete Integer default:0
[/left]
[left]When set to true, if the software cannot place a particle according to the current option, it deletes the particle. When set to false, particle placement is undefined; that is, it depends on other variables.
[/left]
Hope that helps
The .delete parameter worked like a charm, thanks John!
I tried toggling the .enable_particles parameter but with no success. It should be true by default too.
Tried the script in max 2008 and 2010 and the particles still won’t show up before I create a new system and delete it. I.e if I create a new event in the script like this:
particleFlow.BeginEdit()
local lolEvent = event()
particleFlow.EndEdit()
If run the script and delete this event manually, the particles show up. If I try to delete the event using the script, the particles don’t show up.
I must be missing something.
There is a known bug somewhere deep in PFlow which prevents a newly script-created system from generating particles unless the scene is saved and then reloaded again.
The hack I have been using since Max 6 is to call holdMaxFile() followed by (fetchMaxFile quiet:true) to enforce an update. It is true that it can take a bit of time depending on the content, but it tends to solve the issue with newly created flows using MAXScript.