- Mar 30, 2021
- 143
- 30
Say I want to create a vehicle with speeds and gears.
Speeds is represented by S. It has six values: 0, 25, 40, 55, 70, 85
Gears is represented by G. It has four values: 1, 1.41, 1.83, 2.25
If I want to output a value based on S multiplied by G, with both variables changing based on hitting triggers, how would I do it?
I already had a series of math_counters and logic_case set up to do this, but I don't know how to make S and G change independently without erasing the other value's input and affecting the result.
For instance, if I am on gear 2, and my speed changes from 40 to 25, how do I reflect that in another math counter (or another entity) without overwriting the multiplication of G? If I make the math_counter result fire an output to make G re-fire its output, won't that make an endless loop and crash the game?
S x G = V, but how?
Speeds is represented by S. It has six values: 0, 25, 40, 55, 70, 85
Gears is represented by G. It has four values: 1, 1.41, 1.83, 2.25
If I want to output a value based on S multiplied by G, with both variables changing based on hitting triggers, how would I do it?
I already had a series of math_counters and logic_case set up to do this, but I don't know how to make S and G change independently without erasing the other value's input and affecting the result.
For instance, if I am on gear 2, and my speed changes from 40 to 25, how do I reflect that in another math counter (or another entity) without overwriting the multiplication of G? If I make the math_counter result fire an output to make G re-fire its output, won't that make an endless loop and crash the game?
S x G = V, but how?