1. Hey Guest, is it this your first time on the forums?

    Visit the Beginner's Box

    Introduce yourself, read some of the ins and outs of the community, access to useful links and information.

    Dismiss Notice

Sprite on Sprite

Discussion in 'Modding Help' started by nkChehov, May 19, 2013.

  1. nkChehov

    nkChehov Ballista Bolt Thrower
    1. PumpkinStars - [Pk#] - Inactive

    Messages:
    172
    Question to codders:
    "I have some building animation, but in some time I need to show other sprites over first one"
    Solutions?
     
  2. Asu

    Asu THD Team THD Team Forum Moderator

    Messages:
    1,580
    Hmm place the second draw script after the first one
     
  3. nkChehov

    nkChehov Ballista Bolt Thrower
    1. PumpkinStars - [Pk#] - Inactive

    Messages:
    172
    Get it, tomorrow will describe.

    --------------------------------------

    Well, if someone will need this info, call me here, not right mood for now((
     
  4. You can use CSpriteLayers if you haven't found a better way.

    Code:
        this.RemoveSpriteLayer("blood");
        CSpriteLayer@ blood = this.addSpriteLayer( "blood", "Entities/Effects/Sprites/KnightSplatter.png",
            8,8);
        if (blood !is null)
        {
            Animation@ anim = blood.addAnimation( "default", 0, true );
            anim.AddFrame(35);
            anim.AddFrame(43);
            blood.SetAnimation( anim );
            blood.SetVisible(false);
        }

    ^That adds a layer of blood that isn't visible yet.
     
    nkChehov and JacKD like this.
  5. FlamingDragon96

    FlamingDragon96 Shark Slayer

    Messages:
    407
    So you really are going through with the bloody mod? Sweet.
     
  6. I had a prototype done with the blood upon getting hit and hitting people for knights and stuff, as well as modified gibs and stuff, but it's all changed so much by now that I need to scrap it. That's just remnants. Once I'm done with exams I'll probably get going on it again. Probably shouldn't talk about it too much here so you can PM if you want.
     
    FlamingDragon96 likes this.
  7. VanHuek

    VanHuek KAG Guard Tester

    Messages:
    751
    Yeah I have this problem too will ask Verra about it.
     
  8. nkChehov

    nkChehov Ballista Bolt Thrower
    1. PumpkinStars - [Pk#] - Inactive

    Messages:
    172
    jerloch makes exactly right solution. Also, you can open (Kag Beta\Manual\interface\Objects) and find there many other useful stuff for CSpriteLayer@, and not only for it.
     
    Froghead48, rocker2 and jerloch like this.