View unanswered posts | View active topics It is currently Mon Oct 14, 2019 4:39 am

 Page 1 of 2 [ 21 posts ] Go to page 1, 2  Next
 Print view Previous topic | Next topic
Walkpath Tutorial
Author Message

Joined: Sun May 11, 2008 12:50 pm
Posts: 899
Walkpath Tutorial
Numgun requested a walkpath tutorial:

Things you'll need:

Calculator - Optional
MSPaint - or any other program that shows offsets
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.

Code:
StartSegCount = N

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)

Code:

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)

Code:
PushForce =

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:

Code:
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:
X = -2
Y = 5

Now for the next segment:
2nd offset: 48,55
3rd offset: 44,56
So now:
Code:
X = -4
Y = 1

And the one after that:
3rd offset: 44,56
4th offset: 37,57
So:
Code:
X = -7
Y = 1

And finally:
4th offset: 37,57
5th offset: 28,58
Code:
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)

Thanks to No_0ne and comment for explaining the StartSegCount.
Thanks to Capnbubs for explaining the travel speed variables.

Last edited by Roon3 on Fri Nov 27, 2009 12:49 pm, edited 6 times in total.

Thu Jan 15, 2009 9:50 pm

Joined: Sat Jul 12, 2008 12:17 am
Posts: 49
Re: Walkpath Tutorial
This seems oddly useful.

Kudos dude.

Gonna go muck with it now.

Thu Jan 15, 2009 10:33 pm

Joined: Tue Oct 14, 2008 11:07 pm
Posts: 112
Re: Walkpath Tutorial
Roon3 wrote:
Code:
StartOffset = Vector

Defines the 0,0 point for future offsets, don't know where it starts.

Code:
StartSegCount = N

Causes the game to skip the first N AddSegment lines. (N being any number larger than zero)

Code:
PushForce =

Don't know...

My knowledge of walkpaths is very basic, but I think I can help with these.

I think that the 0,0 point for StartOffset is the join of the leg. I know that increasing the Y value of the offset will make the leg's foot start out further down. I didn't count the pixels, but it did appear to be the hip-to-foot offset.

StartSegCount, according to some other source whose name I've forgotten, skips the first N segments when the walkpath loops. I guess it's there to allow the leg to get out of standing position before the walkpath proper starts.

PushForce has something to do with either the force that the actor exerts on the ground when walking, or the force that the leg applies up on the actor in order to keep it upright.

Thu Jan 15, 2009 11:47 pm

Joined: Wed Feb 14, 2007 5:37 am
Posts: 350
Re: Walkpath Tutorial
Roon3 wrote:
Code:
StartOffset = Vector

Defines the 0,0 point for future offsets, don't know where it starts.

It starts at where the leg's jointoffset, or where the leg rotates on the body.
Comment wrote:
StartSegCount, according to some other source whose name I've forgotten, skips the first N segments when the walkpath loops. I guess it's there to allow the leg to get out of standing position before the walkpath proper starts.

StartSegCount is the number of the first movements that are skipped when they are not needed, so they can walk up steep hill and flat terrain with equal efficiency, without looking like stomping morons.

Fri Jan 16, 2009 12:23 am

Joined: Sun May 11, 2008 12:50 pm
Posts: 899
Re: Walkpath Tutorial
Thanks you two, added this info to the OP.

Fri Jan 16, 2009 8:27 am

Joined: Sat Feb 03, 2007 7:11 pm
Posts: 1494
Re: Walkpath Tutorial
That's a lot better than what I would've wrote.

I usually just fudge with it until I get something really cool.

Fri Jan 16, 2009 5:05 pm

Joined: Sun May 11, 2008 12:50 pm
Posts: 899
Re: Walkpath Tutorial
Wow, thanks Zalo.
Has anyone tried making the walkpath used in this tutorial? If so, how does it look? (Good, bad, etc...)

Fri Jan 16, 2009 9:27 pm

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Re: Walkpath Tutorial
this helped making a huge tank, i was wondering why it was floating

Sun Jan 18, 2009 6:21 am
DRL Developer

Joined: Wed Dec 13, 2006 5:27 am
Posts: 3135
Location: A little south and a lot west of Moscow
Re: Walkpath Tutorial
Just an addition to the tutorial, the pushforce (as far as I can tell) is how much impulse force the walk path applies. It determines how much it eats away at terrain and how much force it puts onto actors.

Sun Jan 18, 2009 10:35 pm

Joined: Fri Dec 12, 2008 12:45 pm
Posts: 48
Re: Walkpath Tutorial
from testing i know that push force is the force applied to the movement between
the vector points if you put 999999999999999999999 push force it will send your
actor/s leg flying to the direction it was supposed to move to
Comment wrote:
Push Force has something to do with either the force that the actor exerts on the
ground when walking,
or the force that the leg applies up on the actor in order
to keep it upright.

the bold line is sort of right
its the force exerted by the foot on the direction it was set to move to.
dosent have to be the ground..

short version

low = looks like anemic kid trying to run a marathon
high = looks like strongest man on earth to hug a kid without causing to die

Fri Jan 23, 2009 10:29 pm

Joined: Mon Mar 26, 2007 1:15 am
Posts: 593
Location: UK
Re: Walkpath Tutorial
Roon3 wrote:
Code:
SlowTravelSpeed =
NormalTravelSpeed =
FastTravelSpeed =

Not sure what slow and fast do, but NormalTravelSpeed is the speed the actor moves his legs. (The others must have to do with special conditions)

Data says that the slow and fast variables were intended for different movement speeds he was planning on adding into the game, but they are currently not used and so can be ignored.

Sat Feb 28, 2009 4:18 pm

Joined: Sun May 11, 2008 12:50 pm
Posts: 899
Re: Walkpath Tutorial
Thanks again bubs, edited the OP to reflect this.

Sat Feb 28, 2009 4:35 pm

Joined: Tue Mar 20, 2007 6:57 pm
Posts: 34
Location: Dan's old Country :)
Re: Walkpath Tutorial
Hey, thanks Roon!
I've always understood the basic mechanic of Walkpaths but have never bothered to actually try editing one until now, as everything feels a lot easier from just knowing that there is a tutorial in that browser window.

A bit off topic, do you think one could make a item that (using lua) would make a character switch to use his FastTravelSpeed/SlowTravelSpeed? I know the performance-boosting energy drink is overdone, but there could be some other interesting uses for, like a gun that slows enemy characters.

Mon May 18, 2009 3:22 pm

Joined: Sun May 24, 2009 1:06 pm
Posts: 7
Location: GB
Re: Walkpath Tutorial
In theory I should be able to make my actors duck walk, no?

Tue May 26, 2009 1:34 pm

Joined: Sun May 11, 2008 12:50 pm
Posts: 899
Re: Walkpath Tutorial
Yeah, I guess, lemme try...

Edit:

Yep, works

Tue May 26, 2009 2:59 pm
Display posts from previous:  Sort by
 Page 1 of 2 [ 21 posts ] Go to page 1, 2  Next

#### Who is online

Users browsing this forum: Google [Bot]

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

Search for:
 Jump to:  Select a forum ------------------ Cortex Command    Dev Log    Wiki    Game Discussion    Game and Licensing Support    Mod Making       Lua Scripting       Requests    Mod Releases       Older Mods    Scene Releases       Scene Making Planetoid Pioneers    Game Discussion    Pioneer Program Lounge Data Realms Off-Topic    Off Topic Chat       Gaming       Forum Games    Site Support & Feedback