Jump to content

PathToReference is not a function or does not exist


PoorLeno

Recommended Posts

I'm attempting to make an actor (In this case, a cow) move to me after the room is loaded. To do this, I thought this would be a valid script:

 

Scriptname CowMove extends ObjectReference  
{Moving the cow}

ObjectReference property MyRef auto


Event onLoad()
MyRef.PathToReference(Game.GetPlayer(), 0.5)
endEvent

 

This results in a "PathToReference is not a function or does not exist" error.

 

This is what I'm trying to use, as I believe it will do what I want. Is this a valid use of this function, or is there a better way to do this?

Link to comment
Share on other sites

It compiles, but my cow just sits there and doesn't follow me.

 

I've rewritten it slightly, and threw in a messagebox so I know it at least starts the event, but is there something I'm missing to make this cow move to me?

 

Scriptname CowMove extends ObjectReference  
{Moving the cow}

Actor property MyRef auto

Event OnCellAttach()
Debug.MessageBox("Activated")
MyRef.PathToReference(Game.GetPlayer(), 0.5)
endEvent

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...