• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Question - Code skeleton_collision_draw_set() doesnt work!

ViceVersa

Member
were trying to use spine animations in our project. one of the built in functions that gamemaker has built in is the draw_skeleton_collision which is supposed to draw the bounding box from spine. HOWEVER, in the step event it does nothing, in the Draw event it just makes the character invisible. Is this a bug or am I doing it wrong?
 
Assuming you are not using the trial version (as the manual says the command is not available in that version), then all draw_* commands must be in the Draw Event. If you have it in the Draw Event, make sure you also have the command draw_self(), otherwise the object instance will not be drawn. Can you show what code you actually have in your Draw Event once you have added in the draw_skeleton_collision function?
 

ViceVersa

Member
I cant post the code unfortunately, but i shouldnt really have to as its just the draw_skeleton_collision() function that doesnt work. I know that the draw event will make the player invisible, but i dont need the player drawn, i just want to know where the collision box is, and the only way i can find out is with that function. but unfortunately, it doesnt appear when used in the draw event. I think this might be a bug with the engine...
 

Ricardo

Member
I cant post the code unfortunately, but i shouldnt really have to as its just the draw_skeleton_collision() function that doesnt work. I know that the draw event will make the player invisible, but i dont need the player drawn, i just want to know where the collision box is, and the only way i can find out is with that function. but unfortunately, it doesnt appear when used in the draw event. I think this might be a bug with the engine...
If you're totally sure is a bug then create an example project replicating the issue and submit it (Help -> Report a Bug).
 
I cant post the code unfortunately, but i shouldnt really have to as its just the draw_skeleton_collision() function that doesnt work.
But without you showing us your (super-secret?) code, we can't prove whether you are right or not. :)
Do as @Ricardo says, though, and raise a bug with a linked project as it looks like we are not going to be able to help you any further. :(
Looking at the bug tracker I can see a couple of other issues with skeleton commands, so perhaps this is just another one.
 

rIKmAN

Member
It might be bugged, as I reported this bug a while ago where skeleton_collision_draw_set() doesn't work and gives errors if it's used when the skeleton is drawn using a shader of any sort - possibly could be related in some way.

As the others have said, file a bug with a simple example project or post some code.
 

ViceVersa

Member
its not that the code is super secret, its that somebody hired me to work on their project, its not my code its theirs, and i shouldnt be throwing their code up on the internet. We were also using team viewer, so i dont have the code even if i wanted to, and there is no reason to post it. Its in the draw event, and the only line is skeleton_collision_draw_set(true).
Code:
skeleton_collision_draw_set(true);
are you satisfied?
 

rIKmAN

Member
Code:
skeleton_collision_draw_set(true);
That's not the function you posted in your thread title (which is one reason why people ask to see code), but see my post above regarding skeleton_collision_draw_set().
are you satisfied?
No need to be an ass about being asked questions, you're the one that's asked for help.
Since you've asked the question though, I'm actually indifferent on the matter - how about you?
 
its not that the code is super secret, its that somebody hired me to work on their project, its not my code its theirs, and i shouldnt be throwing their code up on the internet. We were also using team viewer, so i dont have the code even if i wanted to, and there is no reason to post it. Its in the draw event, and the only line is skeleton_collision_draw_set(true).
Code:
skeleton_collision_draw_set(true);
are you satisfied?
Even if that function is not bugged, I don't think you should be calling it every single Draw pass. From my understand of the function it is used to toggle on and off the setting, so only needs to be set initially when you want to switch it on (true) or off (false) and not repeatedly set as on in the Draw event every time that event runs (multiple times every step I believe).

its not that the code is super secret, its that somebody hired me to work on their project, its not my code its theirs, and i shouldnt be throwing their code up on the internet
If you can't/won't provide code then there will not be much that people will be able to help with. We will always try to help the best we can, but if we don't get given anything to work from (like the correct function name ;)), then we can't actually provide much more info than just telling you to go post a bug and hope that YYG support does not require code either to help them track down your issue.

But as has now been said, create a bug in the bug tracker and get YYG to confirm it - although you may be hard-pressed to get them to confirm anything if you cannot give them any code either as they will most likely want to see what is happening in the project in case it is something specific to the way things are being done in that project.

I would recommend that you change the title to be correct if it is the wrong function there - this will help other people searching in the future. :)
 

ViceVersa

Member
Even if that function is not bugged, I don't think you should be calling it every single Draw pass. From my understand of the function it is used to toggle on and off the setting, so only needs to be set initially when you want to switch it on (true) or off (false) and not repeatedly set as on in the Draw event every time that event runs (multiple times every step I believe).


If you can't/won't provide code then there will not be much that people will be able to help with. We will always try to help the best we can, but if we don't get given anything to work from (like the correct function name ;)), then we can't actually provide much more info than just telling you to go post a bug and hope that YYG support does not require code either to help them track down your issue.

But as has now been said, create a bug in the bug tracker and get YYG to confirm it - although you may be hard-pressed to get them to confirm anything if you cannot give them any code either as they will most likely want to see what is happening in the project in case it is something specific to the way things are being done in that project.

I would recommend that you change the title to be correct if it is the wrong function there - this will help other people searching in the future. :)
thanks for the reply. So youre saying just set it to true in the create event? interesting, ill let you know how that goes
 
Top