Stumped...
Hi Everyone,
I have been stumped on this simple attribute for a few hours no. ( I am a newbie)
Here is What I am doing.... I have a main actor that climbs a ladder when pressing the up arrow. It also displays an animation the my character climbing.
But, I also want to add in a collision with the ladder prior to pressing the up button. I wand to display a static image of the character prior to the climb.
So what I did was set up a attribute called touch the ladder. So I created a rule called touch the ladder. When the actor collides with the ladder (an actor) then I added in a line.. attribute self.touch ladder is true..... then I added in a change image behavior.
Finally I added in a otherwise change attribute to self.touch ladder to false.
Can someone tell me what I am doing wrong....
Comments
Can you post a screenshot of your rules (you'll need to upload it to a file-sharing site first and then post the link here)? Even though you described it, the exact order and layering of the conditions and behaviors is crucial and it's hard to determine what you've done from your description. When typing out rules, I generally indent using option+space, like this:
When attribute game.start is true
When attribute game.lives > 0
Change attribute game.level to 1
Otherwise
Display Text "you lost"
In that example, the second rule is inside of the first and the otherwise section is part of the second rule.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Thanks for the response tatiang! the link is below. Thanks for your helphttps://dropbox.com/s/p6bd25gu2p89dkf/Screen%20Shot%202015-09-30%20at%206.51.26%20AM.png?dl=0
Okay, that rule changes the value of self.touch ladder when you collide with the ladder and changes the actor's image. It seems like that's what you wanted... what's not working?
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
when he touches the ladder the image will not change...the character should be facing the ladder see screen shot https://dropbox.com/s/plix3zl0mnrn7iw/Screen%20Shot%202015-09-30%20at%201.01.41%20PM.png?dl=0
The rule you posted is a really simple rule so if it's not working it's due to one of quite a few possible causes. Put a Log Debugging Statement at the top of that rule and watch the Debugger window to see if the collision is triggering that rule. If not, that's where you need to start troubleshooting (e.g. are the two actors on the same layer, do you have any unlocked "instances" of either actor in the scene, etc.).
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User