Rule to apply to many attributes!!! HELP!
JagonApps
Member Posts: 241
Ok, so this may have already been mentioned, but I don't really know what to search for to check
-So what I want to do is make a general rule which can apply to many attributes (100 in total).
-An example of one of the 100 attributes is: 'game.timer-best 102' (102 refers to the world (1) and the level (2)
-I need a formula so that I have the general wording (game.timer-best ) and then adding on the specific level (of which I already have a working attribute for to determine this)
Is there a formula to do something like this?
Thanks for any help in advance
-So what I want to do is make a general rule which can apply to many attributes (100 in total).
-An example of one of the 100 attributes is: 'game.timer-best 102' (102 refers to the world (1) and the level (2)
-I need a formula so that I have the general wording (game.timer-best ) and then adding on the specific level (of which I already have a working attribute for to determine this)
Is there a formula to do something like this?
Thanks for any help in advance
Answers
Hi @JagonApps Just make another global integer attribute for the World and you'll have all the building blocks for what you want. So in the display Text Behaviour:
"Best Time "..game.timer-best.." "..game.World.."0"..game.Level
For the spaces in the expression editor, use alt-space.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
The current statement I have (which works) is: floor(( game.timer-best %60)/10)..".png"
BUT I want to replace 'game.timer-best' with a formula which could apply to any level, so something like:
game.timer-best (game.currentworld * 100)+(game.current scene)
This would then correctly refer to the relevant attribute for that scene.
Is this possible?
Thanks
Sure, you can have any equation you like, and change a single attribute from it; or a name of an image even, as your prev. example.
So your example works fine - without any text for display - to change an integer attribute to give a number:
game.timer-best = (game.currentworld * 100)+(game.current scene) is good that you've done, providing current world and current scene attributes are integers or real types. :-)
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
What I want to do is get gamesalad to refer to a specific attribute depending on another attribute, without writing out the different variations for the rule 100 times over.
So in this example, I want an image (the number relating to timer-best) to be constrained to the attribute timer-best, like this: floor(( game.timer-best %60)/10)..".png"
BUT I have many timer-best attributes for each level, so I want the constrain rule to say that game.timer.best(game.currentworld * 100)+(game.current scene)
So gamesalad goes to the attribute which relates to the particular level.
Does that explain it any better??
Thanks
floor(( ((game.currentworld * 100)+(game.current scene)) %60)/10)..".png"
Does that work out for you?
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Can this be done?
I'm certain it can...it's just I'm still getting confused as to what you want.... sorry, it's me, not you.... I still don't understand your explanation....
I hope another member is more awake than I am today/tonight who can help.....
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
bump?