Numgun requested a walkpath tutorial:
Things you'll need:Calculator - Optional
MSPaint - or any other program that shows offsets
NotePad - Obviously
Registered version of CC - You'll need the actor veiwer
Lets take a look at the walkpath code:Code:
StartOffset = Vector
Defines the 0,0 point for future offsets, its start offset is the actor's hip joint.
Causes the game to skip the first N AddSegment lines when not needed, (N being any number larger than zero) so actors can climb steep hills without having to raise their foot all the time. (Only when climbing)
Adds a segment in the walk "animation", will be explained in the next sections.
Code:
SlowTravelSpeed =
NormalTravelSpeed =
FastTravelSpeed =
Not sure what slow and fast do, but NormalTravelSpeed is the speed the actor moves his legs. (The others can be ignored, they're a feature Data wanted to add to CC)
Don't know...
How do we start:Start by copying the coalition light's torso code into a new a .ini, scroll down to the walkpath area and delete all the AddSegment lines.
Do not erase the StartSegCount and StartOffset lines!Change StartSegCount to 0. (We won't be using this for this tutorial, I might add a section about this var in the future)
Open the actor veiwer and start working, reload actor data whenever you make a change:
Now we begin by adding one add segment like so:
Code:
AddSegment = Vector
X = 0
Y = 5 //You don't normally have to use five, I will in this tut
This is the first part of the walking animation, our actor will his foot by 5 pixels.
Now, press the move right key and have him raise his foot and take a pic:
Now we want out actor to move his foot backwards and take it forward again so we draw a dotted "line" following the path like so:
(The first dot should be in the center of the foot)
Now here comes the part where I think most people fail:
Look at the offset of the 1st dot: 50,50
And now the 2nd: 48,55
So the X drops by 2 and the Y gets added 5 so your next segment should look like this:
Code:
AddSegment = Vector
X = -2
Y = 5
Now for the next segment:
2nd offset: 48,55
3rd offset: 44,56
So now:
Code:
AddSegment = Vector
X = -4
Y = 1
And the one after that:
3rd offset: 44,56
4th offset: 37,57
So:
Code:
AddSegment = Vector
X = -7
Y = 1
And finally:
4th offset: 37,57
5th offset: 28,58
Code:
AddSegment = Vector
X = -9
Y = 1
And you're done, that wasn't as hard you thought it was right? Play around with these variables and make your own awesome walkpaths!
If you find any spelling/math errors/know what other vars do, please tell me.
Sorry if my bad grammar is confusing and hope I was able to help.
(Note: The walkpath in this tut is very basic and probably looks bad, don't expect to much)
Edit: Fixed image links
Edit: Added info about the other variables
Thanks to No_0ne and comment for explaining the StartSegCount.
Thanks to Capnbubs for explaining the travel speed variables.