Now works in 3.1 and later.
reply to Hitting Walls
By danpost - 20 minutes ago
A field is a variable that is declared within a class, but outside of any code blocks. A variable declared within a code block only exists during the execution of the block. Once an execution block terminates, variables declared within the block no longer exist. Example 1: <Code Omitted> Example 2: <Code Omitted> Example 3: <Code Omitted>In example 3, each actor will have its own speed value. That is, line 6 will only increase the speed of one actor (the actor that the method was called on) -- not all actors of its type. Notice that the variable is declared in the block of the class -- not in an executable code block (constructor or method). Example 4: <Code Omitted>In example 4, all actors of the class' type will move at whatever value the speed variable is set to when acted on. The value is initially set when the project is compiled and does change when the project is reset. Therefore, it must be initially set (or reset) by code in the world constructor: <Code Omitted>
CosmicCaleb wrote...I'm pretty new to this, so that sounded like Spanish. Could I have some code to see what you mean?