rIKmAN
Member
I have a simple Spine animation which basically scales a bone from 1.0 to 1.1 on both axis a few times over the course of 20ish frames of animation.
The bone being scaled is called "centre", and is directly under the default "root" bone, and the animation plays fine in both Spine and inside GM when using "skeleton_animation_set".
The problem is that I simply cannot seem to get any data from the Spine skeleton.
Here is my code, all placed within the object which the Spine sprite is attached to:
Create Event
Animation Update Event (have also tried this in Step Event)
Draw GUI Event (in case the standard Draw Event was causing problems somehow)
As I said the animation plays fine, I can see it scaling on screen and playing the animation, but the problem is that the values don't seem to get updated past the first frame of the animation.
Here is a pic of what I'm seeing - imagine the square pulsating bigger/smaller between scale values 1.0-1.1, and the text doesn't change at all from that shown in the picture.
I've checked Spine and the scale hits 1.01 on the second frame of the animation, so it does update at least once to get past frame 1 (which is scale 1.0), but then doesn't seem to update any further even though the animation is playing, and I'm continuously reading the data into a map (skeleton_bone_state_get) and updating the variables I 'draw_text' every frame in the Animation Update event.
Has anyone got any idea what's going on or what I'm doing wrong?
I'm using GM v1.4.1763.
EDIT:
Just rolled back to v1.4.1757 and it's the same, so I'm thinking I'm doing something wrong because something this basic in ther Spine support being broken would have surely been reported and fixed....wouldn't it?
The bone being scaled is called "centre", and is directly under the default "root" bone, and the animation plays fine in both Spine and inside GM when using "skeleton_animation_set".
The problem is that I simply cannot seem to get any data from the Spine skeleton.
Here is my code, all placed within the object which the Spine sprite is attached to:
Create Event
Code:
// setup map
centreMap = ds_map_create()
// set start animation to 'selected' which scales from 'centre' bone from 1.0 to 1.1 repeatedly
skeleton_animation_set("selected")
Code:
// get current bone data
skeleton_bone_state_get("centre", centreMap)
// assign values from map
centreWX = ds_map_find_value(centreMap,"worldX")
centreWY = ds_map_find_value(centreMap,"worldY")
centreSX = ds_map_find_value(centreMap,"xscale")
centreSY = ds_map_find_value(centreMap,"yscale")
centreWSX = ds_map_find_value(centreMap,"worldScaleX")
centreWSY = ds_map_find_value(centreMap,"worldScaleY")
Code:
// draw names
draw_set_halign(fa_right)
draw_text(x, y + 100, "spr_x: ")
draw_text(x, y + 120, "spr_y: ")
draw_text(x, y + 140, "centreWX: ")
draw_text(x, y + 160, "centreWX: ")
draw_text(x, y + 180, "centreSX: ")
draw_text(x, y + 200, "centreSX: ")
draw_text(x, y + 220, "centreWSX: ")
draw_text(x, y + 240, "centreWSX: ")
// draw values
draw_set_halign(fa_left)
draw_text(x + 10, y + 100, string(x))
draw_text(x + 10, y + 120, string(y))
draw_text(x + 10, y + 140, string(centreWX))
draw_text(x + 10, y + 160, string(centreWY))
draw_text(x + 10, y + 180, string(centreSX))
draw_text(x + 10, y + 200, string(centreSY))
draw_text(x + 10, y + 220, string(centreWSX))
draw_text(x + 10, y + 240, string(centreWSY))
Here is a pic of what I'm seeing - imagine the square pulsating bigger/smaller between scale values 1.0-1.1, and the text doesn't change at all from that shown in the picture.
I've checked Spine and the scale hits 1.01 on the second frame of the animation, so it does update at least once to get past frame 1 (which is scale 1.0), but then doesn't seem to update any further even though the animation is playing, and I'm continuously reading the data into a map (skeleton_bone_state_get) and updating the variables I 'draw_text' every frame in the Animation Update event.
Has anyone got any idea what's going on or what I'm doing wrong?
I'm using GM v1.4.1763.
EDIT:
Just rolled back to v1.4.1757 and it's the same, so I'm thinking I'm doing something wrong because something this basic in ther Spine support being broken would have surely been reported and fixed....wouldn't it?
Last edited: