[PYTHON TOONTOWN 3D] Making a Cog stop moving, then stand.

I’ve figured out this much.

Cog = Actor(‘phase_3.5/models/char/suitA-mod.bam’, {‘Walk’ : ‘phase_4/models/char/suitA-walk.bam’})
Cog.reparentTo(render)
Cog.loop(‘Walk’)
LBlazer = loader.loadTexture(‘phase_3.5/maps/l_blazer.jpg’)
Cog.find(’/torso’).setTexture(LBlazer, 1)
LArm = loader.loadTexture(‘phase_3.5/maps/l_sleeve.jpg’)
Cog.find(’
/arms’).setTexture(LArm, 1)
LLeg = loader.loadTexture(‘phase_3.5/maps/l_leg.jpg’)
Cog.find(’/legs’).setTexture(LLeg, 1)
Head = loader.loadModel(‘phase_4/models/char/suitA-heads.bam’).find(’
/legaleagle’)
Head.reparentTo(Cog.find(’**/joint_head’))

Cog.setZ(-68)
#x #y #z
Walk1 = Cog.posInterval(3.0, Point3(0, 20, -68))
Spin1 = Cog.hprInterval(2.0, Vec3(180, 0, 0))
Walk2 = Cog.posInterval(3.0, Point3(0,0,-68))
Spin2 = Cog.hprInterval(2.0, Vec3(0, 0, 0))
Pace = Sequence(Walk1, Spin1, Walk2, Spin2)
Pace.loop()

lb = loader.loadModel (‘phase_11/models/lawbotHQ/LawbotPlaza.bam’)
lb.reparentTo(render)

base.oobe()
run()

Now I’d like to know how to make the cog end its loop (idk how) and change into the suitA-neutral.bam after completeing the loop once or twice. Keep in mind I’m new to Python and Panda 3D in general so if this is an easy fix please don’t judge…

Sorry, but can you send the full code? or is this the full code?

Cog = Actor('phase_3.5/models/char/suitA-mod.bam', {'Walk' : 'phase_4/models/char/suitA-walk.bam'})
Cog.reparentTo(render)
Cog.loop('Walk')
LBlazer = loader.loadTexture('phase_3.5/maps/l_blazer.jpg')
Cog.find('**/torso').setTexture(LBlazer, 1)
LArm = loader.loadTexture('phase_3.5/maps/l_sleeve.jpg')
Cog.find('**/arms').setTexture(LArm, 1) 
LLeg = loader.loadTexture('phase_3.5/maps/l_leg.jpg')
Cog.find('**/legs').setTexture(LLeg, 1)
Head = loader.loadModel('phase_4/models/char/suitA-heads.bam').find('**/legaleagle')
Head.reparentTo(Cog.find('**/joint_head'))

Cog.setZ(-68)
#x #y #z
Walk1 = Cog.posInterval(3.0, Point3(0, 20, -68))
Spin1 = Cog.hprInterval(2.0, Vec3(180, 0, 0))
Walk2 = Cog.posInterval(3.0, Point3(0,0,-68))
Spin2 = Cog.hprInterval(2.0, Vec3(0, 0, 0))
Pace = Sequence(Walk1, Spin1, Walk2, Spin2)
Pace.loop()    # you can use Pace.start() so the sequence is executed only once. 

lb = loader.loadModel ('phase_11/models/lawbotHQ/LawbotPlaza.bam')
lb.reparentTo(render)

base.oobe()
run()

I’m not really sure, but try that in the comment after

Pace.loop()  # you can use Pace.start() so the sequence is executed only once. 

In addition, in your first line (when you construct your “Actor”), you will likely want to include the “standing” animation as you have the animation named “Walk”–that is, as another entry in the dictionary that you’re passing into “Actor”'s constructor.