I know this is obvious but my mind is not working. Simple 3 settings button?
StormyStudio
United KingdomMember Posts: 3,989
Ok, its either cause I've got carried away with too many rules, not enough sleep or its actually due to gameSalad being too fast... but here's my problem.
I have a locked switch button, which changes state depending on an attribute.
If the attribute = 0, then the locked switch is off with no key in it.
If the attribute = 1, then the locked switch is off with a key in it.
If the attribute = 2, then the locked switch is on with a key in it.
If the attribute = 3, then the locked switch is off with a key in it. (this is needed along with attribute 1 for other reasons).
The problem I'm having is when the lock is touched (with the key), it cycles through the switch being on and off, and playing the short animation sequence turning the key on and back off.
I've tried putting timers in, putting each attribute rule in a separate if touched rule....
But for the life of me I can't get it working..
If its plainly obvious can someone please point it out to me...
Thankyou...from a tired GameSalad addict watching Die Hard 2.0 whilst working on my game...nearly ready for an early first beta launch...
I have a locked switch button, which changes state depending on an attribute.
If the attribute = 0, then the locked switch is off with no key in it.
If the attribute = 1, then the locked switch is off with a key in it.
If the attribute = 2, then the locked switch is on with a key in it.
If the attribute = 3, then the locked switch is off with a key in it. (this is needed along with attribute 1 for other reasons).
The problem I'm having is when the lock is touched (with the key), it cycles through the switch being on and off, and playing the short animation sequence turning the key on and back off.
I've tried putting timers in, putting each attribute rule in a separate if touched rule....
But for the life of me I can't get it working..
If its plainly obvious can someone please point it out to me...
Thankyou...from a tired GameSalad addict watching Die Hard 2.0 whilst working on my game...nearly ready for an early first beta launch...
Comments
Be a fair bit of work trimming the project down to send over.
Thanks for the offer though...
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Well I think it will work...my mind is really too fried to work out how to do what I'm sure is a simple function..
ended up doing the normal thing of making a display text actor, to show what the attribute was doing.
Turned out it was working, but the animation and the image change was/is not playing ball.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
when event happens change index
on your place holder for the lock:
[Rule]
when imageIndex = 0
--changeImage To: 0 (no key)
[Rule]
when imageIndex = 1
--changeImage To: 1 (off with key)
[Rule]
when imageIndex = 2
--changeImage To: 2
and so on for each state
===
then when key overlaps/collides with lock changeAttribute game.index To: 1
===
back to Lock
[Rule]
when touch is pressed
--changeAttribute index To: 2
--[Rule]
---when index = 2
----do this (play animation... and think the lock and key image should be one image)
----changeAttribute index = 3
MH
PS since I drink wine ... all the beer goes to you!