Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Morgana retro Dungeon Crawler (uses Tilengine)
#16
Thank you very much, it works! Biggrin

Code:
if(companion2==madwitch){
     carregar_portrait("madwitch_anim",x_slot_portrait1,y_slot_portrait2,2); 

     TLN_SequenceFrame frames[3];
     frames[0].index=0;
     frames[0].delay=400;

     frames[1].index=1;
     frames[1].delay=30;

     frames[2].index=2;
     frames[2].delay=16;

     TLN_Sequence sequence=TLN_CreateSequence("madwitch_anim",0,3,frames); 
     TLN_SetSpriteAnimation(id_anima_madwitch,id_portrait_companion2,sequence,0); // 0 == loop infinite times
}

Only thing that puzzles me is the delay time magnitude. It would be better to be stated it the documentation of TLN_SequenceFrame. I assumed it was miliseconds, but it doesn't seem to match the miliseconds of Aseprite that the artist gave me.

Nevertheless I played with the values until I found something nice, and it works as stated, a long duration for the first still frame, and a short duration for the two blinking frames.

Thanks!
Reply


Messages In This Thread
WOW!!! - by PerspexSphinx - 11-19-2019, 07:39 AM
Morgana game (uses Tilengine) - by JaumeAlcazo - 01-02-2020, 04:23 AM
RE: First video of Morgana game (uses Tilengine) - by JaumeAlcazo - 02-06-2020, 07:41 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)