script query - Printable Version +- tyFlow Forum (https://forum.tyflow.com) +-- Forum: tyFlow Discussion (https://forum.tyflow.com/forum-1.html) +--- Forum: Bugs and Issues (https://forum.tyflow.com/forum-3.html) +--- Thread: script query (/thread-1196.html) |
script query - nayan - 10-14-2019 Hi! I am attaching a file (3dsmax2020). I am a complete newbie, when comes to writing a code...so help me out or make me understand I have technically two questions 1. when i am spawning a particle with Newparticle() function, I am not getting one particle but a bunch of particles, I dont know why.... 2. I want a lerp float interpolation according to box position, which i manage to get it right, but it happens in realtime, but not taking the object animation into consideration - now i do understand the problem, but can manage to figure out the way to write through script.....So help me out Please can you also provide me the link for C# Help or libraries, where i can see more of mathematical operators and more, the Docs mentioned Max.net - honestly have no clue regarding that..... Please look into my file and you will get, what i am look for..... Thank you Nayan Bodawala RE: script query - tyFlow - 10-15-2019 You are getting multiple particles because you're calling 'NewParticle' inside your eventParticleCount loop. So it's getting called once for each existing particle. If you only want a single particle, call it outside the loop at the top of the simulationStep function. If you only want a single particle birthed at the first frame, make sure to put it inside an "if (f == 0)" condition as well. I'm not sure I understand your second question, but right now your lerp is happening inside the "eventAge == 0" condition, so it will not update each frame...but instead only when the event particles first enter the event. |