2. Basics
• table
• matrix shaped 2D data
• can be accessed with row and column indices
• all items in a column should be of an identical type
• you can create as many tables as you want
• tables are treated as attributes of game
3. Table creation
• Home > Tables
• click “+” to create as many table as you want
• rename them
4. Edit your tables
• determine the # of rows and columns
• determine the type of each column
• you can easily increase the number of columns or rows
• you can rearrange the order of the columns and rows
10. Create a table
• Prepare a table to be displayed and manipulated
11. Actor to show items
• create an actor named “item viewer”
• double click and add behaviors as follows
nothing specified here
12. common behavior
• make the actor display table item (common)
• the item is accessed by attributes of the actor (different attributes for each actor instance)
16. Table manipulation
• Table items should be accessed with structured
looping method
• loop behavior
• only in ‘pro’ version which costs $299!
• alternative
• inventing your loop with available behaviors
17. Single for loop
• for(int i=1;i<=4;i++) {
• TB_State[i][1] = TB_State[i][1]+1;
• }
!
• add attributes
• idxI
• idxJ
• use those indices for our for loop
• here, a single for loop is presented
• idxI is used
21. Problem of Timers
• Rule+Timer for looping
• when the condition for the rule is no more valid, the timer is immediately
released
• loop can be stopped with unfinished tasks left
• Clever condition manipulation is needed
add an attribute
MoveDirection (text)
to Game
!
add an attribute
bKeyPressed (boolean)
to background actor
22. Condition management
• when key is pressed
• game.MoveDirection is set
• the loop will not be stopped while game.MoveDirection is not none
23. Condition management
• when key is released
• prevent loop from being performed again when the key is pressed
26. Images for table items
• If you want display items with matching images
• import images to your library
• add an attribute “TB data” to the actor “itemViewer”