I've gotten started on this, using Transportato's ideas as inspiration. TESAlliance and Bethsoft forums seem rather unhelpful so far, I've asked this question on both places. Time to ask it here as well!
Scriptname ShipScript extends ObjectReference
{This ship will enable when the player comes close enough, sail its route, then disable.}
ObjectReference Property waypoint01 Auto
ObjectReference Property waypoint02 Auto
ObjectReference Property waypoint03 Auto
ObjectReference Property waypoint04 Auto
ObjectReference Property waypoint05 Auto
ObjectReference Property waypoint06 Auto
int currentwaypoint = 0
Int Property waypointnumbers Auto
GlobalVariable Property hasbeenspawned Auto
Event OnInit()
RegisterForSingleUpdate(0.5)
EndEvent
Event OnUpdate()
if(Game.GetPlayer().GetDistance(self) < 6000)
if(hasbeenspawned.getValue() == 0)
currentwaypoint = 1
hasbeenspawned.setValue(1)
enable(true)
MoveToMyEditorLocation()
endif
endif
if((hasbeenspawned.GetValue())== 1)
if(waypointnumbers >= 1)
if(currentwaypoint == 1)
TranslateToRef(waypoint01, 150.0, 50.0)
endif
endif
if(waypointnumbers >= 2)
if(currentwaypoint == 2)
TranslateToRef(waypoint02, 150.0, 50.0)
endif
endif
if(waypointnumbers >= 3)
if(currentwaypoint == 3)
TranslateToRef(waypoint03, 150.0, 50.0)
endif
endif
if(waypointnumbers >= 4)
if(currentwaypoint == 4)
TranslateToRef(waypoint04, 150.0, 50.0)
endif
endif
if(waypointnumbers >= 5)
if(currentwaypoint == 5)
TranslateToRef(waypoint05, 150.0, 50.0)
endif
endif
if(waypointnumbers >= 6)
if(currentwaypoint == 6)
TranslateToRef(waypoint06, 150.0, 50.0)
endif
endif
endif
RegisterForSingleUpdate(0.5)
EndEvent
Event OnTranslationComplete()
currentwaypoint += 1
EndEvent
Event OnUnload()
if((hasbeenspawned.GetValue())== 1)
MoveToMyEditorLocation()
hasbeenspawned.setValue(2)
currentwaypoint = 0
Disable(true)
endif
EndEvent
Why do my ships not move? I have set the waypoint properties correctly in the CK, and I've created an Activator with the model of a Ship so that it can be moved without fade. And yet, no movement occurs! Hopefully someone here knows why. And keep in mind, I'm a self-taught beginner at this :)