Faulty game logic
sladak
Member Posts: 119
in Tech Support
Hello
I was wondering if anyone can help. I have a very simple rule:
If game.score>39 Do winning stuff
Otherwise
Do losing stuff
In my game, there are occassions when both winning and losing stuff occur simultaneously. This seems to happen when i score exactly 40.
This should obviously not occur. I am running 0.10.2.
Any ideas???
I was wondering if anyone can help. I have a very simple rule:
If game.score>39 Do winning stuff
Otherwise
Do losing stuff
In my game, there are occassions when both winning and losing stuff occur simultaneously. This seems to happen when i score exactly 40.
This should obviously not occur. I am running 0.10.2.
Any ideas???
Comments
Doing a final test on my game before submission and i hjave noticed something very odd. I have two rules which decide if the player wins or loses
1: game.score>39 .........do the winning stuff
2: game.score<40 ..........do losing stuff
When i get 40 points, i get both winning and game over screens!!! There is no other logic in there so its down to these statements. Any ideas????
rupas30@hotmail.com
@RUPA The project literally has the rules above
I am running 0.10.2 which i know is slightly older. Was there any problems with logic in this version?
Was waiting to get this submitted before upgrading to avoid any issues
if game.score<=39, do your loosing stuff
otherwise
do your winning stuff
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
https://www.dropbox.com/s/vpwrgjdxc2781bc/Screen Shot 2013-06-11 at 22.21.21.png
@sladak -- the first screen-shot shows your logic to be:
when gameScore > 39
There is faulty logic... but it is not because of GameSalad!
change it to:
when gameScore < 39
@RThurman
Ok the order is different to what i stated above but the problem is the same. The point is both sides of the condition are carried out which should be impossible.
When i get 40 I get both winning and losing screens appear, where, since game.score is greater than 39, i should only get the top half of the condition......or am i going nuts??
This always occurs in my adhoc build when my score is equal to the conditioning criteria. However, it does not occur in the gamesalad viewer when i get same score.
At least now i known when it occurs
Both conditions execute. This is driving me mad. Surely this has been noticed before?????
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
I have now created two rules:
Rule 1
If >39 : Do winning stuff
No otherwise statement
Rule 2
If <40: Do losing stuff
This works and i no longer get simultaneous win/game over overlays.
There is obviously still a problem with the way Gamesalads logic is transferred over to the build........
@codewizard Could this please be investigated?