Using script operator to subtract 1 from custom float
#2
It's not entirely clear to me what you're trying to do, but to decrement a value by 1 with a Script operator, you'd do something like this:

Code:
tf.SetCustomFloat(sInx, "hits", tf.GetCustomFloat(sInx, "hits") - 1);

That would go in the for-loop that iterates over all event particles and retrieves their simulation index (you can see this loop in the example script that is created when you create a new Script operator).
  Reply


Messages In This Thread
RE: Using script operator to subtract 1 from custom float - by tyFlow - 10-03-2024, 02:00 AM

Forum Jump: