G0DsDestroyer

Members
  • Content Count

    7
  • Joined

  • Last visited

About G0DsDestroyer

  • Rank
    Newbie

Profile Information

  • Gender
    Male
  1. Well I tried switching to mp3 format and that didn't change the problem, so I went with your workaround deniz. Thanks for that solution. I'm still wondering why it doesn't work with 2.2.2, since I know someone else using that version of phaser and they don't seem to have a problem. Either way, it work now! Thanks again.
  2. For the game I am making the level audio is approximately 40 seconds and is set to looping when added in the create method of my game, after it is done playing, it doesn't seem to loop or start playing again, although I haven't waited for an over a minute waiting for it to start again. Also it's a wav file, which I've been told works. I had thought maybe it was some of my other pausing and resuming of the music, but with all those lines taken out and just the below ones, the problem persists. I also printed out level_music.isPlaying and level_music.loop and both are true, but there is no sound playing.. Any help is appreciated, thanks. create: function()...//add musiclevel_music = this.add.audio('level_one');level_music.play('', 0, 0.1, true);//also tried this to see if it made a difference//add musiclevel_music = this.add.audio('level_one');level_music.play();level_music.volume = .1;level_music.loop = true;...}
  3. I'm using button.input.useHandCursor = true; to change the cursor when it's over buttons, and I need to reset the cursor to the default at some point. I know I can set this to false but it doesn't work unless the cursor is moved off of the button. I've seen game.stage.canvas.style.cursor = "default"; being used, but that doesn't work, as it gives me an error saying canvas is not defined, even though I've made the game using Phaser.CANVAS. So what I'm asking is there a way to quickly reset the cursor to it's default image?
  4. So I'm still having the problem with my player stopping the wrong animation with the animation manager, if I'm using the correct syntax and all that. I have a player sprite which is loaded with a walking right spritesheet and an animation added with the key 'walk'. At the press of a certain Keyboard key I would like to add & play other animations after the key press. This will work as long as I don't stop the walk animation in my player movement function. Calling player.animations.stop('walk') seems to stop all animations even though I give it the specific key for the walk animations. I have the walk being stopped in a player movement function when no movement key is pressed, and this function is called in update() to allow the player to walk left and right at a key press. So does anyone know why is this stopping all of my animations? One thing I could think of was since it's constantly being called when no keys are up in goes through and stops the walk animation and then just ignores the key i have given since walk is gone and deletes the next animation in the list.
  5. A problem I had was in my player movement function, I had player.animations.stop('walk'); when no movement keys were pressed and this was apparently stopping all animations for the player, even though I used the key for the walking animation. I solved this by only stopping the walk animation when the player is not burrowing, which is set in the burrow and the function to check the burrow which is run in the update. So lingering questions: Can I load in different textures for one character that are different dimensions w/o having them be made in different locations? and Any idea why stopping the walk animation stopped the dust animation?
  6. I was afraid that was the solution, I guess I'll move on to something 'simpler' at this time, thanks for the answer. So in my next question would about loading different textures instead of having separate sprites. From the tinkering I have done with phaser, it appears that any texture loaded with loadTexture() must be the same size as the previous sprite? Is this the case or ...? Also, now that I have sprites the same size, and when i load the new one in, how do I get the animation to play? I add the new animation after I load the new texture, then I play the new animation, but it doesn't play as far as I can tell, or it's playing really fast, so my question is what am I doing wrong there? Some code: ...create:function(){...// player animation walk cycle, played when left or right arrow is pressedplayer.animations.add('walk');...},...//This function allows player to burrow from above ground to below ground or vice versa (y axis movement). Called when B key is pressed, takes a few seconds to move up or downburrow:function(){player.animations.stop('walk');player.loadTexture('dust_cloud');player.animations.add('dust');player.animations.play('dust');...},...
  7. When a parent sprite is modified, it appears to also change the values of its children, Is there a way to get around this easily? I have a player and then I have a sprite that I want to place over it, and making it a child seems like the simplest way, and it works fine until I try to set the parent(player) visible = false. This results in making both the player and child disappear. However the child sprite still says its visible property is set to true. The player is moving is moving along the Y axis and needs to have the child sprite follow it, and I want only the child sprite to be visible during the movement. And the child sprite is being animated as it moves as well. Any help would be appreciated, just let me know if you need more information.