How do I change pose of my character

  • So I have character with 2 poses and when "Q" pressed he needs to change his pose. I hope i will get solution soon.

  • on q pressed set animation to pose2?

  • Maybe I could use that but each of poses has own animation. I was thinking (if it is even possible) to do it with 2 seperate sprites.

  • Add multiple animations to one sprite and call them accordingly.

  • Okay. Thanks for fast answer. But is thre anyway to do it with 2 sprites?

  • yes

    Set animation speed to 0

    instead of set animation, use set frame.

  • on pressed q destroy sprite 1 and create sprite 2?

  • Okay thanks <img src="smileys/smiley4.gif" border="0" align="middle" /> !

  • If I destroy Sprite1 how would code go to create Sprite2 on exact same location? (I was thinking doing like that but posted here question to see is there any other way)

  • create sprite 2 at sprite1.x,sprite1.y and destroy sprite1 in the same event, next action.

    but why anyone would use this instead of using animations is quite a mystery to me.

  • creating and destroying a sprite from the same char seems a bit too much if you ask me.

    Simply add more frames to your sprite. Right click in your frames bar and import second frame/sprite.

    now you have 1 sprite, 1 animation, with 2 sprites from the same character.

    yes

    Set animation speed to 0

    instead of set animation, use set frame.

  • I understand that destroying and creating a sprite may be too complicated but I prefer code more than animations. Anyway thanks both of you for helping, I'll try both solutions and use one that looks better.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You are creating double work you know need to code both sprites to respond to input an collisions. Better is as was mentioned place all animations in the single sprite call them as needed.

    The double sprite method will make you need to track instance variables manually things like life will need to be shared between the objects. carrying objects as well. Making sure the new object is set at correct speed direction etc. theses will become tedious as you continue to build the game. Rethink your strategy and then discipline yourself to smart coding vs hard coding....

    Best luck to ya.

  • I see your point, but thing is that life is shared between sprites. Both of sprites have car behavior, but Sprite1 has drift recover 150 and max speed 300, while Sprite2 has drift recover 200 and max speed 250. I don't know if I can do that with animations, change speed and drift recover.

  • Car if animation1 is playing

    -set max speed

    -set drift recover

    Car if animation2 is playing

    -set max speed

    -set drift recover

    should be easy enough, right?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)