Why does my variable reset back to 0 when i start simulation

im trying to use this variable to count how many rounds of products are made and i need it to start at 1 and not 0. but every time i start the simulation, the variable resets to 0.
any idea why?
image

Properties in VC don’t have initial values, that UI is just misleading.
If you need a variable that doesn’t reset automatically at all, use a component property.

Or you can add a Boolean variable “initialized” and then an if statement at the start of the process where you check if initialized == False and set your variables, and initialized = True.

is there any way to make a window pop up at the start at the simulation and ask to input the value of a variable? or any similar solutions? the idea is to input at the start how many products should be produced

No, but you can read it from some component’s property with GetProperty statement.
That component property you can them make obvious with e.g. 3D text or something.

or maybe just a way to open the window on the right (statement properties) when the simulation starts. if the window has its ID or something that you can call it by in a python script?

No, you can’t do any UI stuff from Python.