scripting problem

my code:

import direct.directbase.DirectStart
from pandac.PandaModules import *

from direct.task import Task
from direct.actor import Actor
from direct.interval.IntervalGlobal import *
import math

scenemap = loader.loadModel(“models/map.egg”)
scenemap.reparentTo(render)
scenemap.setScale(50,50,50)
scenemap.setPos(0,-20,0)

guard1 = Actor.Actor(“models/ralph”, {“stand”:“models/ralph”,“walk”:“models/ralph-walk”})
guard1.reparentTo(render)
guard1.setScale(.2,.2,.2)
#guard1.setPos(11,13,0)
guard1.loop(“run”)

guard1PosInt1 = guard1.posInterval(16,Point3(11,13,0), startPos=Point3(11,13,0))
guard1PosInt2 = guard1.posInterval(3,Point3(11,9,0), startPos=Point3(11,13,0))
guard1PosInt3 = guard1.posInterval(8,Point3(11,9,0), startPos=Point3(11,9,0))
guard1PosInt4 = guard1.posInterval(4,Point3(11,13,0), startPos=Point3(11,9,0))
guard1HprInt1 = guard1.hprInterval(0.025,Point3(-90,0,0), startHpr=Point3(0,0,0))
guard1HprInt2 = guard1.hprInterval(0.025,Point3(-180,0,0), startHpr=Point3(-90,0,0))
guard1HprInt3 = guard1.hprInterval(0.025,Point3(0,0,0), startHpr=Point3(-180,0,0))

guard1Pace = Sequence(guard1PosInt1,guard1PosInt2,guard1HprInt1,guard1PosInt3,guard1HprInt2,guard1PosInt4,guard1HprInt3, name=“guard1Pace”)

guard1Pace.start()

run()

**This is my code

the problem is when the time it is executed i want in the certain of time when the guard is walking he will perform the walk-animation, and when the time that the guard will be on his position the animation he will be performing of is the stand-animation…

or can you give me example of performing different kinds o animation of a character but with time interval for that

example in time 0-5 the character will perform the stand:
in time 5-10 the character will perform the walk:
in time 10-15 the character will perform the run:
in time 15-20 the character will perform the attack:

------------- your reply with my problem will be a big help: thank you

Read the manual on animations and, iirc, 'actorInterval’s.
Long story short, when you set a model to animate, it will play the animation specified. You can set animation at any point in your code, including within wrapper intervals. If the animations you created for the model aren’t the length you need, either loop them and start/stop manually or fool around with their play rate.