Last question for my game. (Please read)
DanielAvni
Member Posts: 114
Ok well i need to make it so once you beat the level you unlock the next level and a character. This is possible for it to save the progress right? I was thinking to do is make a boolean and once you get to the top of the level you change the boolean to true.
Make it so:
level icon:
Rule: attribute = true: change resolution or spawn icon.
Otherwise set resolution to 0 or not be there.
and kinda the same thing with the character..
Make it so:
level icon:
Rule: attribute = true: change resolution or spawn icon.
Otherwise set resolution to 0 or not be there.
and kinda the same thing with the character..
Comments
Check the support reference about save and load attributes.
I made 2 attributes (real) y and x
Monkey actor: constrain : y/x to position.x/y
banana : constrain: position.x/y to x/y but theres something wrong when it moves the banana moves down instead of staying constrained PLEASE HELP
So...if your next position value has the potential to be a decimal value...
use this expression:
floor(self.position.y/self.position.x) or whatever equation goes in the middle.
Read up on expression in the support for more info about what is available.
Also...handle the X and Y positions separately...do not try to handle them at the same time.
Hope this helps you.
Also...
If you are looking to force the banana to only move in the +/- X direction and lock the Y direction...
then do this...
create an integer attribute: self.AChangingXValue
create another integer attribute: self.AFixedYValue
Constrain self.AChangingXValue to [ floor(whatever expression you want or need goes here) ]
Constrain self.position.X to self.AChangingXValue
Constrain self.position.Y to self.AFixedYValue
TIP:
Make your attribute names descriptive...they will help you in thinking through the logic. Don't use space when naming the attributes...just use CAPS to start each word...as shown above.
create an integer attribute: self.AChangingXValue
create another integer attribute: self.AFixedYValue
Constrain self.AChangingXValue to [ floor(whatever expression you want or need goes here) ]
Constrain self.position.X to self.AChangingXValue
Constrain self.position.Y to self.AFixedYValue
eg.
floor(3.14125678467855) = 3
floor(5673.583476589) = 5673
ceil(456.45566734) = 457
ceil(123.67533578) = 124
http://gamesalad.com/wiki/interface_reference:expression_editor
in general...
it sounds like you really need to do some reading in the forums or in the reference section/tutorials. this is basic stuff and I think a little boot camp training is necessary before going into battle