L
lukbebalduke
Guest
Hey Folks! There is a strange issue in my game right now: There are two OBJ_PLAYER in a room, each of them has it own local variable M, that points to the direction where the player is looking at.
At the OBJ_PLAYER animation update the angle of a certain bone is set to M. Both OBJ_PLAYER has the same sprite.
The issue: the first player looks to where the second player's M points, and vice-versa.
At the OBJ_PLAYER animation update the angle of a certain bone is set to M. Both OBJ_PLAYER has the same sprite.
Code:
var head_dsmap = ds_map_create();
skeleton_bone_data_get("Bone_head", head_dsmap);
ds_map_replace(head_dsmap, "angle", M);
skeleton_bone_data_set("Bone_head", head_dsmap);
ds_map_destroy(head_dsmap);