Hello Playmaker community,
Recently I have decided to develop a little racing game, so I started on creating a controller for the car itself.
So far, I got the entire controller setup but I get this error
Car : Speeding : Loop count exceeded maximum: 1000 Default is 1000. Override in Fsm Inspector.
I understand that the problem can be resolved by editing some value in the Inspector; however, my question is that recommended? It sounds that I am doing something wrong. I went through the 4 FSMs I had and none of them had "Every Frame" or "Every Second" checked. Yet, I do have multiple loops active in each FSM (created on the same object).
Another question I had 4 FSMs on the car model I am using:
1- Movement (simply a state to with "Get Axis Vector" saving the Vector output and another state with Character Simple Move to get it to move forward and backwards).
2- Rotate (It has 1 state with "Get Axis" and saving the axis info in a float variable and the second state with "Rotate" which gets it to rotate left and right).
Now where the problems arise...
3- Speeding
One state with Get Key Down (checking if "W" is pressed and storing the info in global var "keyPressed") flowing to a Float Compare (to check if the speed isn't more than 10 -- speed here is the multiplier used in the previously mentioned Movement FSM) which would either flow to a state with Float Add (to increase speed if the speed isn't more than 10) or to a state with a Send Event (to send an event to Stopping FSM to stop the car and reset the speed to 0).
If the speed is less than 10 as mentioned above and it flows to the Float Add state (to increase the speed) another check is done on "keyPressed" to see if "W" is still pressed, if it is then it flows back to the previously mention Get Key Down and goes through the cycle again. If not, however, it flows directly to the Send Event state to stop the car.
4- Stopping:
Another FSM setup with similar to number 3 except I am checking if the "W" is released. If it is, then the car speed is set to 0 and if not then an event is sent back to the previous FSM to get the car to accelerate.
When I play the game, I find that the car accelerates at a constant speed of 1 (though W is pressed and never released) once I release the "W" key I get the speed set to 0 (as intended when stopping) but once I press "W" again to restart my acceleration I see that the speed is set directly to 10 without any scaling up and the message stated above (Car : Speeding : Loop count exceeded maximum: 1000 Default is 1000. Override in Fsm Inspector.) is displayed and the game is paused.
Any idea what am I doing wrong? Or do you have any pointers/tutorials on how to create a car controller with Playmaker?
Thank you very much in advance.
Best Regards,
Vallar.
=