10-01-2024, 12:21 PM
(This post was last modified: 10-01-2024, 12:23 PM by amcadam@animmersion.co.uk.
Edit Reason: wrong information
)
Hi.
I have a custom float named "Hits". When there is a collision I send the particle to a new event and add 1 using --- test action>Increment Float --- in a 'Send Out' operator. This part is all fine and works as it should.
However, I also want "Hits" to decrease if there's been no collisions for 20 frames. I have added a 'Time Test' operator which sends out to a new event every 20 frames, and i'd like "Hits" to decrease by 1. At this point i'm stuck. From reading the forums it appears that the only way to decrease a custom float is to use the 'Script' operator. I have little to no scripting experience so am unable to do this.
Is there a few lines of code i could insert into the script operator to decrease "Hits" by 1?
Thanks,
Andy
I have a custom float named "Hits". When there is a collision I send the particle to a new event and add 1 using --- test action>Increment Float --- in a 'Send Out' operator. This part is all fine and works as it should.
However, I also want "Hits" to decrease if there's been no collisions for 20 frames. I have added a 'Time Test' operator which sends out to a new event every 20 frames, and i'd like "Hits" to decrease by 1. At this point i'm stuck. From reading the forums it appears that the only way to decrease a custom float is to use the 'Script' operator. I have little to no scripting experience so am unable to do this.
Is there a few lines of code i could insert into the script operator to decrease "Hits" by 1?
Thanks,
Andy