How to use number values to build a temprature based reactor?

Hello, I am Immebest a beginner to the developer community recently I have decided to make a nuclear reactor sci-fi genre game which is generally temperature and pressure based. Although due to the lack of tutorials and experience I have in scripting I couldn’t build a value system.

I am trying to make a control system that reduces/increases heat and pressure and also adding that if a certain value is reached there should be a countdown and an explosion in case of a meltdown.

I recently tried to get some information by scrolling through the dev forums for a tutorial-based about this topic any help or instruction would be appreciated.

PS: I should also add that I don’t know much about developing terms so please your answers fairly understandable thank you.

1 Like

bind the explosion to what is called a bindable event. From there I suppose you can have a button which makes the value going up and going down, checking if subtracting it will reach it past its minimium value. Or if adding it will cause an explosion. from there simply call the bindable event then reset the system by reseting its data.

1 Like

Thank you but do you have a tutorial for these kinds of stuff, I would really appricate it.

not everything can just be shown to you

Not sure what level you’re at for scripting, but:

  • You can update a NumberValue with
    NumberValue.Value = NUMBER
    if you plan on setting up your system to track by NumberValues, you need to be familiar with Object Hierarchy.
  • Your other option could be to store all values as variables inside a server script and alter/display them as necessary.
  • For a reactor that updates over time, you’ll have to repeatedly update it with a while wait() loop
1 Like