Notifications
Clear all

[Closed] Creating biped and footsteps

I’m trying to create a biped and footsteps completely within Maxscript. Unfortunately I can’t seem to find a way to enter Footstep Mode with Maxscript so that I can being placing the footsteps.

--Create a biped
myBiped = biped.createNew (6*12) -90 [0,0,(6*12)] fingers:5 fingerLinks:3 toes:5 toeLinks:1
myBipedCtrl = myBiped.controller

--Define our dummy
myDummy = $Dummy01

--Follow the dummy an place a footstep every 15 frames
timeStart = animationRange.start
timeStop = animationRange.end
timeStep = 15

sliderTime = timeStart

while sliderTime < timeStop do
(
	myTransform = myDummy.transform
	biped.addFootprint myBipedCtrl myTransform append:false
	sliderTime += timeStep
	
)

biped.addFootprint myBipedCtrl myTransform append:false

returns the following error:

-- Error occurred in anonymous codeblock; filename:footstepDummyFollow.ms; position: 1470
--  Frame:
--   myTransform: (matrix3 [1,0,0] [0,1,0] [0,0,1] [22.1802,-37.4243,0])
-- Runtime error: Cannot run the operation in this mode
2 Replies

I should add that I’m using MAX 2009 Design 64 bit.
I’ve tried to run the demo script in the Biped Footprints reference:

-- create a Biped
bipObj = biped.createNew 100 100 [0,0,0]

-- get the transform controller for the Biped
bip = bipObj.transform.controller 

-- get the multiple footstep parameters interface
mfsp=biped.getMultipleFSParams #walk 

-- set the number of footsteps to 10
mfsp.numFootsteps=10 

-- create the inactive footsteps 
biped.addMultipleFootprints bip mfsp 

-- create the Biped keys for inactive footsteps
biped.newFootprintKeys bip

And it returns similar errors. I’m guessing it’s just a part of Maxscript that’s been left behind in the 12 month release cycle. :banghead:

UPDATE: Just tested the sample code in MAX 8 and it works like a charm. So, is there a way to get MAX 09 to go into footstep mode so these commands actually work?

As usual, if I’m pounding my head against a wall for 2 days, I should post here then I’ll figure out my problem immediately

Before 09 you didn’t need to enter footstep mode, but now you have to. here’s the code:

myBipedCtrl.footstepMode = true