Can you trigger a procedure on varriable type update?

Started by nilek20 on

Topic category: Advanced modding

Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Can you trigger a procedure on varriable type update?

I am making a mod with ~50 player persistent variables and almost 40 procedures that "Calculate" these Variables. In order to reduce lag i am trying to have the "Calculation" procedures trigger as little as possible. the problem i am having is that i need them to trigger off of almost every non "Calculation" procedure i am making. I was hopping to reduce the code by having the "Calculation" procedures all trigger only when the respective variable is changed. Is there a way to do this?

Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
The only thing I can think…
Mon, 10/28/2024 - 12:09

The only thing I can think of would be to use the advanced 'call procedure' procedure block whenever the variables are changed, although this would mean manually going in and editing all procedures that change the variables, so I don't know how appealing this solution would be for you.