gkri
Member
I tried to access the struct of a premade sequence from asset browser. I wanted to change the keyframe of a specific channel of a track. To be more specific I wanted to change the mouth of a character from neutral to smile.
After some looping and show_debug_message in create event, I found the value that refering to image_index of the mouth sprite:
But changing that value only have effect if I change it in create event. If I try to change it into step event, the change is ignored...
Can you help me and tell me what I am doing wrong?
My goal is eventually to dynamically create idle animations like smile, eyes blinking, for all my characters, without tediously overflowing the asset browsing with numerous sequences with very simple animations...
After some looping and show_debug_message in create event, I found the value that refering to image_index of the mouth sprite:
seq_.tracks[2].tracks[4].keyframes[0].channels[0].value
But changing that value only have effect if I change it in create event. If I try to change it into step event, the change is ignored...
GML:
//create event
seq = layer_sequence_create(INSTANCES, xx, yy, seq_character);
seq_ = (layer_sequence_get_sequence(seq));
//If I put the next line of code in create event the change applies
//but if I put the next line of code in step event the change is ignored
seq_.tracks[2].tracks[4].keyframes[0].channels[0].value = 14;
// 0 is neutral mouth, 14 is smile
Can you help me and tell me what I am doing wrong?
My goal is eventually to dynamically create idle animations like smile, eyes blinking, for all my characters, without tediously overflowing the asset browsing with numerous sequences with very simple animations...