I'm intending to create a small immersion mod that has ships moving through the sea of ghosts along preset routes. They would be enabled when the player comes within a reasonable distance, then start on their journey.
ventually I'd look into having light sources on these ships during the night, as well as having ships with rolled down sails.
he mod that gave me ''the courage'' to start trying this is Transportato by Trainwiz, but what that mod does is actually beyond what I want to achieve.
I am a complete beginner when it comes to Papyrus(learned quite a bit the past week or so.) Mostly by looking carefully at other scripts(Transportato's mostly) have I been able to come to the current concept.
I've placed 6 waypoints in the map, along with a ship(set to initially disabled) that has this script attached to it:
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
If anyone knows how to help me get this to actually DO anything in-game, I'd be forever in their debt. The ship doesnt spawn at all when I come near its spawn position.
Eventually I'd want to be able to add a random aspect to this, that randomizes when the boats spawn (after 3-4-5 in-game hours for example.) This, however, I can't figure out either with my current level of skill. I'd have a few routes, some longer than the other, which would make it seem that theres a random element to each ship passing(some might overtake eachother etc.)
Again, any and all help appreciated enormously!