• Content Count

  • Joined

  • Last visited

About lilsheep

  • Rank

Contact Methods

  • Twitter
  1. lilsheep

    Animations not ending at the same time

    It appears to be solved or my eyes are just tired of seeing so many frames so closely. lol. the issue was the characters animation was not on loop but the dagger and helmet were.
  2. I have three animations playing simulatenously a player a helmet a dagger It seems like the player ends last (you can see the flicker in the gif I posted) if (this.equipped.weapon) { this.weaponAnimation.attacking.gotoAndPlay(0); } if (this.equipped.helmet) { this.helmetAnimation.attacking.gotoAndPlay(0); } this.baseAnimation.attacking.gotoAndPlay(0); my code for making the animation visible is currently extremely naive but shouldn't be an issue every update call it checks the state and depending on the state it will display the animation (so they should all stop at the same time): if (this.unitState.currentState === 'attacking') { this.baseAnimation.attacking.visible = true; this.weaponAnimation.attacking.visible = true; this.helmetAnimation.attacking.visible = true; } each animation is the same amount of frames with the same animationSpeed. Why is there this flicker! Also the sprite sheet is tiny and I use scaling. Help!
  3. Is this possible? I have been messing around with Pixi for a few minutes as well as googling and haven't been able to figure that out. (For the sake of collision detection btdubs)
  4. lilsheep

    How on earth do I change the color of text?

    I tried that! name_text.tint = "0xaabbcc" name_text.tint = 0xaabbcc name_text.tint = [oxaabbcc] I can't get it to work. ) :
  5. var name_text = new PIXI.Text(name); = "bold 10px arial"; = "center"; this.imageContainer.addChild(name_text); How do I change the color ! aaa
  6. lilsheep

    TilingSprite no longer visible after resize

    It was an issue with the spritesheet. For some reason, when I set trim mode to trim, it didn't work. When I set it to works.
  7. I resized the cobblestone_ground sprite from a height of 100 to a height of 16. And now it is no longer visible. The call to TilingSprite was changed from, texture, 4000 + Math.abs(768/2), 100); to what is there now. Any idea why this might be happening? I have been racking my head trying to figure out why. function Background() { var texture = PIXI.Texture.fromImage("cobblestone_ground.png");, texture, 4000 + Math.abs(768/2), 16); this.position.x = 1000-Math.abs(768/2); this.position.y = 370; this.tilePosition.x = 50; this.tilePosition.y = 0 ; ...more code};..later on background = new Background(); MAIN.stage.addChild(background)
  8. I have a game with two teams. Before I was using PIXI I would make one team glow red and the other glow blue. Is there any easy way to do this? Or should I make another set of sprites that are colored slightly differently? Thank you!
  9. lilsheep

    addChild in constructor doesn't seem to work

    Ok I see. The tutorial I read that explained the parameters for drawRect was off. I thought the first two parameters didn't matter, I thought the last two parameters were dependant to that. I was wrong.
  10. lilsheep

    addChild in constructor doesn't seem to work

    Ok this problem is bizzare because it works for one of the objects. Namely what appear to be the first object that is created with hte constructor. It is like that rectangle can only exist once.
  11. lilsheep

    Object not added to container when players tab out

    I suppose that one solution is to remove every display object and re add it every game loop. This fixes the problem. But there has to be something more performant. This solution freaks me the eff out. : (
  12. I have a multiplayer game When somebody is tabbed out and another enters the game, their MovieClip is not added to the game. How do I get past this ? One way is to constantly add the movie clip in the game loop -- or alternatively to check if it exists and if not add it. However that seems problematic. And that doesn't help with deleting clips (that delete after an elapsed time) when the character tabs out -- and the time runs out. (Deleting is not executed)
  13. lilsheep

    Why isn't this filter working?

    I GOT IT TO WORK! var filter = new PIXI.filters.BlurFilter(); filter.blur = 32; filter.passes = 11; this.stage.filters = [filter];
  14. lilsheep

    Why isn't this filter working?

    I just updated to the newest version and it still is saying that stage.filters is undefined!
  15. So each player object has a different playername.text_x number. The correct one! But only one is rendered! : ( Why? The constructor is below! var player = function () { var health = new PIXI.Graphics(); health.beginFill(0x00FF00); health.drawRect(0, drawAtY-50, 100/2.2, 6); health.endFill() //console.log("MAN STAGE "+MAIN.stage); MAIN.stage.addChild(health); var text_x; this.drawText = function(){ text_x = Math.abs(768/2) - localPlayer.localX() + drawAtX; this.text_x = text_x; health_shadow.position.x = text_x-25; health_shadow.position.y = drawAtY-100;}