Issue
I have this animated character that changes every time when I press navigation keys.
This character can jump, but if i try with spaceBar+rightKey. Nothing happens as I expected.
Character jumps normally and don't take right jump.
I want-
I tried to add a box in window, so that this character shouldn't go across this box, they can only jump/walk over it. I want to bind keys for making a directional jump.
Code-
if(spaceBar)
{
box.stop(true,false).animate({top:xPos-50},10, function(){
box.animate({top:xPos},100);
})
I tried
if(spaceBar,rightKey)
{
box.stop(true,false).animate({top:xPos-50},10, function(){
box.animate({top:xPos},100);
})
But that didn't do trick.
For more information-
Solution
@da_re was right in his comment, he should have posted an answer.
if(spacebar && rightKey)
Answered By - Bill
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.