View unanswered posts | View active topics It is currently Thu Jan 09, 2025 3:03 am



Reply to topic  [ 10 posts ] 
 Multi-frame attachables? 
Author Message
User avatar

Joined: Mon Jun 04, 2007 5:55 am
Posts: 1627
Location: Ohio
Reply with quote
Post 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)


Thu Apr 09, 2009 6:53 pm
Profile YIM WWW
User avatar

Joined: Fri Oct 17, 2008 9:46 pm
Posts: 5212
Location: The Grills Locker.
Reply with quote
Post 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 :cchappy: might implement some new feature to allow vector changing for attachables.


Thu Apr 09, 2009 11:26 pm
Profile WWW
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post 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.


Fri Apr 10, 2009 1:37 am
Profile WWW
User avatar

Joined: Mon Jun 04, 2007 5:55 am
Posts: 1627
Location: Ohio
Reply with quote
Post 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.


Fri Apr 10, 2009 3:18 am
Profile YIM WWW

Joined: Sat Jan 13, 2007 11:04 pm
Posts: 2932
Reply with quote
Post 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.


Fri Apr 10, 2009 2:52 pm
Profile
User avatar

Joined: Wed Jan 07, 2009 10:26 am
Posts: 4074
Location: That quaint little British colony down south
Reply with quote
Post Re: Multi-frame attachables?
He means attachable armour. What I want to know is how the offsets are calculated...


Fri Apr 10, 2009 3:03 pm
Profile WWW
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post 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 <_<


Sat Apr 11, 2009 8:18 am
Profile WWW
User avatar

Joined: Wed Jan 07, 2009 10:26 am
Posts: 4074
Location: That quaint little British colony down south
Reply with quote
Post 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...


Sat Apr 11, 2009 8:25 am
Profile WWW
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post Re: Multi-frame attachables?
maximum length frame. and it works pretty well if you have your extended/contracted offsets done right.


Sat Apr 11, 2009 8:32 am
Profile WWW
User avatar

Joined: Wed Jan 07, 2009 10:26 am
Posts: 4074
Location: That quaint little British colony down south
Reply with quote
Post 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...


Sat Apr 11, 2009 8:40 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 10 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.182s | 13 Queries | GZIP : Off ]