Not triggering from script

For some reason, the game is triggering based on the fields in Unity but not from my script

I’m tweaking numbers and made boostSpeed 100, but it only goes to 30. I’ve been staring at the code and can’t see any issues with it

Once you changed a value in the inspector, that’s the value you’re going to get, no matter how much you change the value in the code. The inspector is the boss.

This is because the values in the inspector gets serialised and they are the values that are used by the script. It was designed this way. Imagine having 2 different drivers and each has its own boostSpeed. How would you define this if the values in the script gets used? You don’t. You set the value for each in the inspector. That’s why the inspector’s values are the values that will get used, not the values in the script

thanks! someone explained in the discord as well. that makes sense

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms