countdown, show how many moves u got left?
boxy
Member Posts: 7
Hi there,
So my game has for every level a X number of moves u can use to complete that level. I got those moves in a table for every level and now i want to show in each level how many moves the player got left. I tryed it but i cant get it to work.
I got a actor called movescounter and put a "display text" in it to display the moves. So far i only got him to show how many moves u get, but no countdown on a move.
i used in the display text: tablecellvalue(game.movetable, game.whatlevel, 1) that 1 is for the row where the moves are in.
any ideas?
Comments
The 1 is actually for the column, but I knew what you meant. You need to do a Change Table Value behavior to decrease the value of that cell each time a move is made. In the value field, you would enter tableCellValue(game.movetable, game.whatlevel, 1)-1
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
ok, almost got it.
got now the display text with: tableCellValue(game.movetable, game.whatlevel, 1)
than rule, when mouse is down: display text: tableCellValue(game.movetable, game.whatlevel, 1)-1
but than it swaps back to original state, like: 5,4,5,4....
how can i keep it so it keeps counting down?
DisplayText will always display the current value of an attribute. There is (almost never) a need to place DisplayTest inside of a mouse is down rule.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
A i misread the: change table value behavior... Gonna try that one