Reset attribute | solver infection

   663   2   2
User Avatar
Member
7 posts
Joined: Aug. 2015
Offline
Just a simple infection solver; but I'm trying to reset the "infect" attribute so my grid of points can be infected again. I'm using age attribute to set infectioin to 0 after certain frame. But i need it to feed it back in. How can i do this?
Edited by YoungLegend - April 18, 2023 11:30:00

Attachments:
infection_reset.hipnc (204.8 KB)
2023-04-18-11-28-01.gif (6.0 MB)

User Avatar
Member
398 posts
Joined: Nov. 2016
Offline
You have to reset @age at some point, otherwise the @age>15 condition will remain true.
User Avatar
Member
7 posts
Joined: Aug. 2015
Offline
Tanto
You have to reset @age at some point, otherwise the @age>15 condition will remain true.

Yup, you're right. I probably need a coffee.

Just had to add if(@infect==0)@age=0

Thanks!
  • Quick Links