Jump to content

Need Actor (NPC) to walk from one point to another


flyddon

Recommended Posts

I have a script that works (almost)

Scriptname greet extends ObjectReference

ObjectReference Property Point1 Auto
ObjectReference Property Point2 Auto
ObjectReference Property Point3 Auto
ObjectReference Property ActorREF Auto
Actor Property PlayerREF Auto
 
Event OnTriggerEnter(ObjectReference akActionRef)
	If akActionRef == PlayerREF 
		PlayerREF.SetAlpha(0.0)
		PlayerREF.SetGhost(True)
		Game.DisablePlayerControls(True, True, True, False, True, False, True)
		Utility.Wait(0.2)
		PlayerREF.TranslateToRef(Point1, 100.0)
		Utility.Wait(2.0) 
		ActorREF.MoveTo(Point2, 50.0)
		Utility.Wait(5.0) 
		ActorREF.MoveTo(Point3, 200.0)
		Utility.Wait(5.0) 
		PlayerREF.SetAlpha(1.0)
		PlayerREF.SetGhost(False)
		Game.EnablePlayerControls()
			GoToState("Done")
	EndIf			
EndEvent 

State Done
Event OnTriggerEnter(ObjectReference akActionRef)
EndEvent
EndState 

Problem: The "MoveTo" moves the actor to the position, the actor does not walk there he is placed there, I tried "TranslateToRef " and the actor is slid there. This action is seen by the player so I need it to look like the actor is walking to the table then towards them (player).

 

I am not sure how to use " patrol " and not sure it would be what I want, I need this to kick off with the script.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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