If either one of the 2 conditions are valid, otherwise doesn't work?
justinodunn
Member, PRO Posts: 226
in Tech Support
i have a rule in which if any of the two conditions valid, if highscore is x or if total coins is x, it will cause the actor to change opacity to 1, but otherwise, remain 0. But how come it doesn't work? If either one of those conditions were valid it didn't work.
Comments
Does the actor start with opacity set to zero?
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
No it doesn't
Start the actor with the opacity of zero. Otherwise only works after the rule fires the first time.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Okay let me give it a try after dinner
What if it was a change attribute behavior?
We're you using a constrain? If so that won't work, you need to be using a change attribute.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
@justinodunn Also to add:
So to summarise what the other guys said, your Rules should look like this (assuming "x" is just a substitute to show an actual number, not an attribute holding a number):
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
I would suspect you don't have your rule set to any condition instead of all conditions.
Okay here is my full rule, at first when it was just one condition (high score) it worked perfect. But it stopped working when I added a second condition (total score).
When "highscore x < 250" or when "total score < 12000", change attribute self blue/red/ green to 0. change attribute "scene lock" to false.
Otherwise
change attribute self blue/red/green to 1 and change attribute "scene lock" to true
Hi @justinodunn Reading your fist post in your thread, you said you wanted the opacity toggled yet in your example above, your choice involves either black or white...
But if you still want to toggle the opacity, try this:
but if you still want black or white, as this:
But if you've already got either of those, best to make a screen grab of the Rules for us to take a look see what else is going on...
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Yes I put those and it still didn't work. THe scene lock attribute is meant to trigger this other scene lock attribute. That other scene lock attribute will then change the opacity of the "locked" actor to 1 when it is true. The deal is that this is a character selection screen, and that the user must reach that score or total score in order to unlock the character.
Here's the part that triggers that other scene lock.
Basically I want it so if user doesn't get enough either high score/ total score, the character will appear black and the scene lock (2) will trigger scene lock to become true, therefore when it is true, it will cause another actor "locked" opacity to become 1. OTherwise, if the user reaches either one of those scores, it will cause the actor to their normal colors, and will cause the scene lock (2) to become false. Therefore, the other scene lock would be false, therefore the "locked" actor opacity would be 0, making that the user unlocked that character.
@justinodunn I'd like to make a suggestion - Decide on which part of your programming you want to report a problem on and stick to it in the one thread... I know your different explanations of problems all revolve around a similar theme but it get slightly tiring and difficult to grasp with what you actually want help with, when these things change all the time... (gotta be said...)
From your post above:
So jumping from highscore & total coins... to highscore & total score.... from = "x" to highscore x =... to RGB changing to 1 or 0, earlier on it was an Alpha change.... then suddenly we're talking about lock and counter....
All I'll say now is the screenshot rules you posted above look OK to me.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Apologies for that, I wanted to keep things simple at the beginning. well it's not working fully , like the character's color changes yes, but it doesn't seem to trigger scenelock.
Are there any other ways to do this?
We need to see all the code trees related to what you're trying to do. You are all over the place with your explanations. I images this mirrors your thinking on this and your code is wrong. Logic is a string of events and need orderly thought across it all. Write out your code on paper in a logic tree in the order of events and you will find the offending code. You're not thinking in a linear fashion.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Sorry for the trouble guys, I decided to just redo that part again, now it works. Thanks for the help though!