
 Accessing an actor's Head in a script
 
					
						Hi guys,
sorry to bother you with such a rookie question but I couldn't find the answer anywhere.
I'm trying to dynamically set the SpriteAnimMode of my actor to 1 if he's walking, I supposed I could do this:
Code:
function Create(self)
   --Nothing here
end
function Update(self)
    if self.IsAtRest then
      self.Head.SpriteAnimMode = 1
   else
      self.Head.SpriteAnimMode = 0
    end
end
Bu the game says that Head is a nil value. How can I access the head to change its SpriteAnimMode parameter?
Thanks for any reply.