Jump to content

Zelda like game sword question


PeterC
 Share

Recommended Posts

Hi,

 

i was wondering if there are any examples on the internet that explains how to implement sword/slash action like zelda 1 on nes. Can't find any examples.

I've already implement a shoot options, that will kill the object when the item is outofbounds, For this one i need to say something like "when button down then show sword, but just for 0.5sec" .

Any ideas?

 

Thanks in advanced!

 

Grtz,

Peter

Link to comment
Share on other sites

show and hide isnt the problem.. just set visible to true and a timer to set it to false again. or use an animation with a blank frame at the beginning and it ends with that blank frame again.. so it will show,strike,and disappear again..

doesnt link always hold the sword straight up into the air while running? i thought its always visible..

the problem i see is how would you enable collision and disable it after the strike again... are you using arcade or p2?

Link to comment
Share on other sites

Thank you, i found an easy solution for it, i'll soon show a demonstration of the idea of my game. (Your game seems to be cool :) It will give me some new ideas)

 

        this.time.events.add(450, (function() {
           this.delayAttack = true;
        }), this);
        
        this.game.time.events.add(400, (function() {
           this.isAttack = false;
           //remove sprite sword here
           this.sw.kill();
        }), this);

 

 

It will show the sword for certain time and then it will hide again, you can hit again as soon when the time is over.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...