• Modificato
Related Discussions
...

Dear Friends,
I am a user of spine.
Now I am disheartened by difficulties when I use spine,So I need help,maybe someone can figure it out?
Please check the detials below:
1.Does spine contain the function"goto and play(something like flash)"? How can I use it?
Example:
I try to play an action when another is playing,but I can not find which frame to disturb.

2.Can I import a Spine artwork and export to DragonBones data format? If spine support it ,how?

Waiting for your reply.

Best regards.

My information :
Name: Mory
From: Shanghai
Occupation: Game Desginer
E-mail: <removed>
Fax: 8621-63868977

You can play an animation, then set the animation time. Spine uses 30 fps, so if you want from 8 then use 8 / 30 = 0.266 for the time. Eg:

AnimationState state = ...
TrackEntry entry = state.setAnimation(0, "walk", false); // track 0, don't loop
entry.setTime(8 / 30f); // jump to frame 8

Spine isn't compatible with DragonBones, sorry.

5 giorni dopo

Thank you for your reply.But I met a new difficulty :I need put different part on one model,just as the picture shows.But when the model makes an action,the avatar will turn to the original model(I want to put different single part of different suit on a character and make it do some action) .How can I do with it?

You would be able to do it by skins. But if you aim to combine a lot of variations that would mean, that you would have to create each possible combination as a new skin..wich sounds like a loooot of work if you have just a bunch of armor peaces.

I think the prefered solution would be to attach the armor images to the appropriate bones by code . (I can`t really tell you how this needs to be done exactly because I'm not a coder, sorry)

I think that I have found a way to fix it. please check it out as following pic I have not put the date out , I don't know if it will work
or not.

The simplest way to switch outfits is to have two atlases that have regions in the same position. At runtime you just choose which atlas to use. Most Spine users don't use this mechanism, as it is difficult to have atlas regions in exactly the same position and Spine provides other ways of doing it.

Different outfits are just different attachments on the skeleton. Configure the images in Spine, then at runtime you can set any of them to visible. Eg, if you have a red outfit that is many attachments, you could just attach those at runtime. Alternatively, you can use skins for organization. Eg, you can create a red outfit skin to easily switch to that outfit. Watch this video:
http://esotericsoftware.com/spine-videos/#Skins

If you have too many possible combinations to create as skins in Spine, you can just set the attachments at runtime. Eg, if you have a red shirt (which could be made of multiple attachments, eg left sleeve, torso, right sleeve) and green pants, you can just set those attachments at runtime. Even with this approach, you can use skins in Spine to group attachments, then at runtime create a skin for the player and add attachments from all the skins you want to combine. Eg, in Spine you could have a red shirt skin and a green pants skin. At runtime you'd create a new skin, add all the attachments from the red shirt and green pants skins to the new skin, and set the new skin on your skeleton.

Which atlas the regions are stored in is completely separate from the above. You can pack your images to a single atlas with one or more pages. Read this (same texture packer Spine uses):
https://code.google.com/p/libgdx/wiki/TexturePacker

I'm currently having the same issue too. Switching attachments is not possible because there are keys for attachments. I was wondering if there is a possibility of switching or toggling slots during run time? I am just the artist and don't know any coding.

Skins allow you to use different attachments while still keying the attachments. In animations, you hide and show skin placeholders instead of attachments. The actual attachments hidden and shown comes from the skeleton's skin, which you can configure as described above, either in Spine or at runtime or both.

Hi Nate. My game will have more than 100 heros and about 100 suits. 1 suit has 5 equipments. so 1 hero will change 5 equipment form the 100 suits.
so if I change attachments like you say by change skin. will I create one hero bone that has 100 skin or 1 slot has many attachments? and I will only use most 5 skins, and set another unuseful equipments unvisiable. is this the best way?
And the coder must think the memory of the game. if one bone has too many skins and attachments whether impact the game memory? I'm confused which way is best for my game. the coder think the way I used before is more save the memory. thx

But switching skin means the whole costume will change. I just want only one part of the costume to change. If I use skins I'll have to setup skins for each possible combination of the different parts of the costume.I have a set of eyes and mouths for the character right now. During animation I switch the images not the slots. If they change the attachment in runtime does it override the keys I set for the images? Just changing the attachment is also not an option because the image sizes are different. If we just change the attachment the position of the images will be a little off from the previous image. There is no option to key the toggling of slots right? Or am I doing it wrong.

Immagine rimossa a causa della mancanza di supporto per HTTPS. | Mostra Comunque

herespraveen ha scritto

But switching skin means the whole costume will change. I just want only one part of the costume to change. If I use skins I'll have to setup skins for each possible combination of the different parts of the costume.

Read my paragraph above that starts with, "If you have too many possible combinations to create as skins in Spine...".

I have a set of eyes and mouths for the character right now. During animation I switch the images not the slots. If they change the attachment in runtime does it override the keys I set for the images?

Your animations should key skin placeholder visibility. What image is used for each skin placeholder comes from the skeleton's skin. At runtime you can programmatically construct a skin by combining other skins or just putting in the attachments you want your skin to have.

ice1988 ha scritto

will I create one hero bone that has 100 skin or 1 slot has many attachments?

Bones don't have skins. Please be careful with the terms so everyone can understand what you mean. If you have a skeleton and you want to use skins to change how it looks, you create a skin placeholder for each customizable attachment. Next you create a skin and put attachments under each skin placeholder. Eg, create skin placeholders: head, torso, arms, legs. Next for skin red skin the skin placeholders will have red head, red torso, red arms, red legs. Do this 99 more times if you want 100 skins. At runtime your only worry is to not load textures for attachments you don't use. But please create a new thread to discuss your specific setup, it is a bit off topic for this thread. 🙂

You need to put all the images in skins.

You have 6 head images. Create 6 skin and name it head1, head2, head3.

Then in your slot create a skin placeholder called "head".

You key this skin placeholder and at runtime you swap the skins.

If you want to do a combination like head1, body 2, arms 5, legs 3 and shoes 10. You just repeat this process and at runtime you create a new skin and add the skins that you want to it.

If you want to animate images like eyes blink, eyes open, etc. Is the same. You create 2 skin placeholder one "eyes open" and the other "eyes blink" in your slot "eyes". Then you create a skin, call it "eyes1", and put the images (eyes open1, eyes blink1) in their skin placeholders. Repeat the same process creating more skins.

I use this method for my game, the only downside right now is that you can't visualize more than one skin at the same time in Spine editor. So its a shot in the dark animating like this.

The only way I found is keeping a copy of the images under the slots, animate them, and after that replace the keys with the corresponding skin placeholder. Its tedious, but until Spine handle multiple skins at the same time, there is no more choices I think.

Aye, I really want to have multiple skins active in the editor soon.

Thank you Nate.I am looking forward to the new version. :beer:

8 giorni dopo

I just make the slot color modifiable, and set it to invisible. That way if they change something on their character, I just active the slot (they have 10 different hairs, swords, clothes, and like 500 different items they can hold).
So each item type runs through at the beginning, finds it's own slot, and keeps reference to it, so I can just activate the slot from the item. It works, just sucks every time I update.

But maybe creating dynamic skins for every item in the game would at least make it so I don't have to spend time modifying spine everytime I update 😉