Crash when changing lightpulse example
#1
Exclamation 
Hi!

I am very fascinated by the lightpulse scripting example, and I was trying to see if I could use it to generate lichen growth!

I tried changing the script so that the leading edge of the light pulse emits particles into a new event. I did that by editing the "pulse" function. But I am not 100% sure if the code I made is valid, and 3ds Max crashes after I made the change.

This is the new function:

void pulse(int sInx, float pulseID) //this function initializes the pulse of a particular particle
{
tf.SetCustomFloat(sInx, "pulseID", pulseID); //assign the specified pulse value to a particle
tf.SetUVW(sInx, 1, new Point3(1, 0, 0)); //set the x-axis of a particle's UVW value to 1

int newSInx = tf.NewParticle(); //create a new particle
tf.SetPos(newSInx, tf.GetPos(sInx)); //assign the current position to the new particle
tf.OutputParticle(newSInx); //output the new particle
}

I have almost zero experience with C#, so there's probably something very wrong here. Can anyone help me out?
  Reply


Messages In This Thread
Crash when changing lightpulse example - by superrune - 04-04-2023, 06:03 PM

Forum Jump: