Jump to content


  • Content Count

  • Joined

  • Last visited

About vernonr

  • Rank
  • Birthday 07/26/1985

Profile Information

  • Gender
  • Location
    Buenos Aires
  • Interests
    Music, literature and video games!
  1. Hello again. New problems arise everyday! I have a character who has an animation called "hit". Here's the strip of frames. So in my code I have this little something that makes the character "hit" when the btnGolpe is down: btnGolpe = game.input.keyboard.addKey(Phaser.Keyboard.M); in function update (): else if (btnGolpe.isDown) { player.animations.play('golpe'); } The problems? 1) The animation keeps looping if btnGolpe is down. It should only play once per button pressing. 2) I need that the character actually "hits" it's opponent with his fist. Is there a way to do this? The collis
  2. My friend, you are saving my days! Will try this right away!
  3. Hi, good people! I encountered a new problem while coding my first game. First, let me explain what I have so far. It's a fighting game. I have my two characters on screen: player1 and player2. They move alright. They both have some movements in common (like moving around, jumping and ducking) and some movements of their own (a combination of keys will trigger a special move of some sort). Among other things, I have this in my code: var player; var player1; In function create() : player = game.add.sprite(18, 200, 'ciro'); player2 = game.add.sprite(618, 200, 'damian'); Finally, in func
  4. Thanks a lot! Your code has been really helpful but I finally ended up using a JS library called mousetrap. It allows combinations of keys to be used. It works for now so I'll think I'll stick in my code. I still have to solve my problem number two, though
  5. Ok, so I was checking the forum and I found this idea about how to get a double tap action. Think that I could use it with a combination of keys for what I need to do. Here's the idea: You could do 2 things: 1. Always have a short delay on keyup. e.g. keyup -> check if timer active, if yes -> cancel timer and emit charge forward, if no -> timer = setTimeout(normaltap, 100); <- or whatever delay 2. check last tap time keyup -> check if difference between time and last time you pressed the key is less than 100 ms (or whatever delay you prefer) if yes, set the time to 0 and
  6. Many thanks! I'm looking but there's nothing phaser oriented. I know that to many of you it would be easy to translate an idea from one code to another but for me is very difficult. I'll keep looking but if someone around here could give me a hint as from where to begin the resolution of these issues, that would be the greatest
  7. Hi guys, I'm really new to Phaser and programing in general so I'm getting stuck really often with my first game. What I'm trying to do is some sort of a two players fighting game (this is a game for gamepads and keyboards, no mobile here). I kinda have the basics going, I mean, my characters move! But i have a list of things to do that keeps growing! Here I have my first two problems for you, kind people: Problem number 1: The thing I'm trying to do is to have my character perform a special move with a combination of buttons. I'm guessing there should be a timer involved somehow. The id
  • Create New...