Attributes Question
Hi,
Currently working on a game and I'm stuck on the following, hope, someone can help....I have a Rule as follows:
When All Conditions are Valid
Attribute gamekidscore >=5
Next Scene
Works fine, now, the problem comes in when I set the following:
When All Conditions are Valid
Attribute gamekidscore < 5
Go to Scene GameOver
Since I set kidscore attribute as 0, everytime I play the Scene it goes to Game Over Scene. How can I fix this....Thanks and God Bless....
Sincerely,
Sunday
Currently working on a game and I'm stuck on the following, hope, someone can help....I have a Rule as follows:
When All Conditions are Valid
Attribute gamekidscore >=5
Next Scene
Works fine, now, the problem comes in when I set the following:
When All Conditions are Valid
Attribute gamekidscore < 5
Go to Scene GameOver
Since I set kidscore attribute as 0, everytime I play the Scene it goes to Game Over Scene. How can I fix this....Thanks and God Bless....
Sincerely,
Sunday
Best Answer
-
tatiang Posts: 11,949
Glad to hear, and you're welcome.New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Answers
When all conditions are valid
Attribute Game.kidscore < 5
and Attribute Game.kidscore > 0
Thanks for the quick response and help, really appreciated it....I've tried the second condition, and it still goes to the game over screen, right from the start. Any other suggestions? Thanks and God Bless....
Sincerely,
Sunday
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Ok, I have set-up an attribute called kidscore ( interger ) = 0. Now, I have an Actor which I called Kidbubble, and on this actor I have the below set-up:
Rotate : Direction * Clockwise Speed = 90
Rule: When All conditions are valid: Actor receives event : overlaps or collides with Actor Type: starkid
Change Attribute : game.kidscore To game.kidscore+1
Change Attribute: game.totalkidssaved To game.totalkidssaved +1
Destroy this Actor
Rule: When All conditions are valid:
Attribute : gamekidscore >= 5
Change Scene: Next Scene
The totalkidssaved is an overall score of the kidscore, I'm using the kidscore to pass to next level. In other words, on next level, the kidscore > =10, then the player passes to next scene ( next level ). Then, 10 gets added to totalkidssaved. I hope it's not confusing.....Thanks again and God Bless...
Sincerely,
Sunday
When All Conditions are Valid
Attribute gamekidscore < 5
Go to Scene GameOver
Doesn't make sense. It seems like you need another condition, such as when scene.time > 30 or something along those lines. When do you want the game to be over?
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Thanks for the insight and help, I added another condition for the game ending, to the Alienship which is being spawned by a spawn actor:
Rule: All conditions are valid:
Attribute - self.Position.X < = 0
Attribute - game.kidscore > = 0
Attribute - game.kidscore < 5
Change Scene
Goto Scene gameover
So far it's working........Thanks again for the help, really appreciated it....God Bless...
Sincerely,
Sunday