I have created a code to attempt to simulate the effects of sweating by a person. I have a variable that keeps track of the temperature of a person’s arm and is only supposed to change upon certain events. The only time the variable is modified is when a specific function is called (ArmHeat), but the variable continues to change even when there are no triggering conditions. What am I doing wrong?
Here is my code:
You have some complex code there, not including the functions. This makes it difficult for anyone to comprehend what you are wanting to achieve, without further detail.
I suggest that you watch your code in action by clicking the Debug Code icon in the top right corner when playing your CoSpace, so that you can see where and when your ArmHeat function is being called.
The next step is to think about which information might be causing the ArmHeat function to be called (e.g. the variable being checked in the loop condition) and how you can display that information (e.g. display on a text panel).
Best of luck,
Geoff @ TechLeap
I figured it out. I didn’t realize there were some elements that were triggering the condition that I wasn’t aware of (one of them surrounded the element I was using and I hadn’t included it at all in the Code, but it still registered as a collision.
If you want to see the code, it’s working now.
So excited. This program is really, really cool.