I am creating a simulation where 3 seperate factors have to be set before the simulation begins. I have set this up by having 3 buttons to set these factors and checkboxes to visually see that the buttons have been clicked. These factors and checkboxes are reset when resetting the simulation.
My question is that is there a way you can have a pop up or a warning that triggers if you try to initialise the simulation when these factors haven't been reset? (i.e the buttons have not been clicked). I am creating this simulation for people that have no experience with the software so I am trying to make it as user friendly as possible.
Any help on this would be greatly appreciated!
Solved! Go to Solution.
you can do something like this in your init-method:
if not (check1.value and check2.value and check3.value) then messageBox("Warning! The Model was not prepared properly!",1,3); root.eventController.stop(false); root.eventController.reset; end;
Hope this helps!