I didn’t quite understand the last minute in this lecture-
Why doesn’t the ball move precisely on the paddle? I understand that the ball and the paddle are on different scripts, but why does it affect the way they move relative to each other?
What are exactly the values Rick changes in the “Script Execution Order” tab?
Why do the changes Rick makes in the “Script Execution Order” solve the problem?
Thank you for your time!
BTW sorry if my English isn’t perfect
What do you mean by “Why doesn’t the ball move precisely on the paddle?”?
According to the manual, the values in the “Script Execution Order” list are just values. They determine the order in which the scripts are executed. I assume we use such high values to be able to put another script between two scripts without having to give every item in the list a new number.
Because he wants to have one script always be executed before the other script.
That’s a good question. Actually, the order should not matter because there is no relevant dependency. The order would matter if the Ball instance generated values which the Paddle instance needs, so the Paddle instance does not access the Ball instance too early. That’s not the case here, though.
I assume that Rick wanted to show the script execution order, and he probably changed the values to have more “room” in case he wants to add more scripts. It makes sense to start with lower numbers closer to 0 than with high numbers.
Feel free to create a new thread here in the “Ask” subforum as we do not have a general GameDev.tv subforum.