Data Realms Fan Forums http://45.55.195.193/ |
|
Multi-frame attachables? http://45.55.195.193/viewtopic.php?f=1&t=14221 |
Page 1 of 1 |
Author: | Miles_T3hR4t [ Thu Apr 09, 2009 6:53 pm ] |
Post subject: | Multi-frame attachables? |
At first this was gonna be a statement, but is now more of a question, first requiring a statement. Code: WalkLimbPath = LimbPath PresetName = Soldier Walk Path StartOffset = Vector X = 10 Y = -2 StartSegCount = 3 AddSegment = Vector X = 0 Y = 2 AddSegment = Vector X = 0 Y = 2 AddSegment = Vector X = 0 Y = 5 AddSegment = Vector X = 0 Y = 5 AddSegment = Vector X = -6 Y = 4 AddSegment = Vector X = -4 Y = 0 AddSegment = Vector X = -4 Y = 0 AddSegment = Vector X = -4 Y = 1 AddSegment = Vector X = -3 Y = 1 AddSegment = Vector X = 0 Y = -2 SlowTravelSpeed = 1.5 Addsegment = vector, This is a repeated line, allowing for multiple vectors, for the same MosR. Is it possible to do a similar process, to an attachable, so that you could attach an object, to a leg, or an arm, on an actor, and give it a new position (relative to the offsets on the parent) for each parent frame, so that as the sprites change (such as an arm moving) the attachable moves to match, such as, say, an elbow-pad, that has offsets, to match the elbow, on the sprite, even though the 'elbow' moves? At first I thought you could, then looked and found that I had simply remembered something wrong. For some reason I was under the impression that a foot, was an attachable to the leg, rather than the body. this caused me a great deal of confusion, and is exactly why I don't do actors. However if it turns out this can be done, please explain. and if it can't I feel it should be suggested to be added to later builds (sure, lua would probably let us do it, but we don't all know lua) |
Author: | Areku [ Thu Apr 09, 2009 11:26 pm ] |
Post subject: | Re: Multi-frame attachables? |
It is possible to do so, but only to a certain extent. For example, I am coding a mutant coalition soldier, and I wanted him to have a weird jaw that kept opening and closing. For this, in theory, the jaw would have to be an attachable and move relatively to the head, as you cannot give a head an animation. So, I sprited the jaw separately, with four frames, one with the jaw in the uppermost position, the second with it one pixel lower, the third one a bit lower than that and the fourth one a little bit up again ( to make the animation more fluid). Then, I made an AEmitter with those four frames as the SpriteFile, attached it to the head using the AddEmitter line, and done: we have a moving jaw! The problem is, with that technic, the animation will ALWAYS be running, so you can't make, for example, a shoulder pad that varies its position according to the arm's position. I guess you'll have to wait until build 23 comes out, it is possible that Data might implement some new feature to allow vector changing for attachables. |
Author: | Geti [ Fri Apr 10, 2009 1:37 am ] |
Post subject: | Re: Multi-frame attachables? |
no, you cant. limpaths move the atomgroup at the end (if positioned correctly, lol) of a limb, and you have to position the foot (which is attached to the leg, not the body. where the hell you "remembered" that from i have no idea) over this atomgroup. the vectors are movement vectors, and are only relevant to limbpaths. you can animate attachables however, and also attachables stuck on legs move like they should in most circumstances. if thats all you wanted to do, go have a look at the SCRAPs. |
Author: | Miles_T3hR4t [ Fri Apr 10, 2009 3:18 am ] |
Post subject: | Re: Multi-frame attachables? |
Geti wrote: no, you cant. limpaths move the atomgroup at the end (if positioned correctly, lol) of a limb, and you have to position the foot (which is attached to the leg, not the body. where the hell you "remembered" that from i have no idea) over this atomgroup. the vectors are movement vectors, and are only relevant to limbpaths. you can animate attachables however, and also attachables stuck on legs move like they should in most circumstances. if thats all you wanted to do, go have a look at the SCRAPs. so wait, let me see if I understand this right, If I create a leg, with 4 frames, and an attachment for the leg, with 4 frames, they would animate at the same time, EI the attachment would only change frames, when the leg changes frames. Is this what your saying? because if so, fantastic, it does exactly what I needed it to. |
Author: | numgun [ Fri Apr 10, 2009 2:52 pm ] |
Post subject: | Re: Multi-frame attachables? |
Doesnt really sound like it would work, since its basically hardcoded(?) for the limb movement and collision only. However it has not been tested so I dont really know and I dont know what would you use it for anyways. So test it out if you're feeling lucky. As for normal attachment animation I thought SpriteAnimMode and SpriteAnimDuration would work simply. Maybe you could try using those too. |
Author: | 411570N3 [ Fri Apr 10, 2009 3:03 pm ] |
Post subject: | Re: Multi-frame attachables? |
He means attachable armour. What I want to know is how the offsets are calculated... |
Author: | Geti [ Sat Apr 11, 2009 8:18 am ] |
Post subject: | Re: Multi-frame attachables? |
no, miles, it wont work if you try to animate it that way, as its not what i said. look at the SCRAPs, they have simple 1 frame metal plate attachables on their legs. and they animate pretty much correctly, yes? the offsets for attachables move [i]sort of[i] correctly for legs while moving automatically, as long as you place the attachable in the right place. try to have the jointoffset and parentoffset as perfect as you can the parentoffset in the middle of the shin or thigh (depending on where you want the plate) and then jointoffset placed so that the armour is where you want it. all you have to do is attach stuff properly and it'll work for legs, no stupid animation needed. doesnt work for arms though. stupid arms <_< |
Author: | 411570N3 [ Sat Apr 11, 2009 8:25 am ] |
Post subject: | Re: Multi-frame attachables? |
Yes, but which frame do you judge the offsets off? is it the first frame? The maximum length frame? Explain please... |
Author: | Geti [ Sat Apr 11, 2009 8:32 am ] |
Post subject: | Re: Multi-frame attachables? |
maximum length frame. and it works pretty well if you have your extended/contracted offsets done right. |
Author: | 411570N3 [ Sat Apr 11, 2009 8:40 am ] |
Post subject: | Re: Multi-frame attachables? |
Ah, I see how I stuffed up looking at the Oyster now, I wasn't paying attention to the spriteoffsets of the individual armour pieces... anyway, this ought to be useful... |
Page 1 of 1 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |