viernes, 20 de septiembre de 2013

Matriz de acciones. Action array

Tutorial 4: Action Array What is an Action Array? An action array is an array of actions, that will execute when they are called, they are currently one of the best methods of organizing commands in thyme, and also one of the best ways to sequence in thyme How would I go about making an action array? 1.Bring down the console by pressing F11 2.Create a name for a new array, like, Actions, type it 3.Type an equal sign (=) 4.Start a square bracket ([) 5.Add your first action, you can either put it in like: "{Ji2}", and call Ji2 to do the work, or add the action directly into the array like: "{John = 2}" 6.Type a comma (,) 7.Add your second action, it can be added just like the first, you can add more commands separating each one by a comma if you want. 8.End your square brackets (]) 9.Check that you haven't made any mistakes, it should look something like: Actions = [{John = 2},{John = 3}] 10.Press Enter NOTE: If you are including an action array in a code, it is advisable to include a semi-colon at the end (;). I can put commands in my normal array, whats different about using this kind of array? Using an non-action style array means that the entire array will be accessed, and it will only show you the array you requested, but every action will have been activated. When you use an action-style array, you wont have all of your actions run at the same time, whereas if you use a non-action style array all your commands will run at the same time

No hay comentarios:

Publicar un comentario