Moving Ship and Crew by enable disable

Post » Thu Jun 21, 2012 8:43 am

Ok as Asked I decided to make a more detailed and precise Thread where I ask questions about this argument :


What I want to achieve :


The player reaches a certain Ship in a certain position on the shores of skyrim , talks to the captain and starts a quest , the captain ask the player to go to sleep and that will trigger the start of the travel ....

the player goes down to the cabins in the ship ( the ship is set to the crew faction and I left one single bed for the faction all the others are for each single crew member )

Then the player slips and this should create the simulation of time passed and the ship movement ...

The crew is all present inside the ship but had some idle patrols outside the ship in former location A ( the start of the quest )

So the player gets to the ship entrance door and goes for the outside and finds himself in a new location because the ship has moved from the harbor and reached a position B

in this position B all the crea has to be moved , the ship and all objects moved and the stuff in location A needs to be disabled or moved ...

Now the player performs some other further actions of the quest then the quest brings him to a new condition that will ask him to sleep again or push some other button trigger or a dialogue option that will make progress again the quest and the ship shoudl be then in position C and so on ...

So now how I do all that?

I created an Xmarker and linked ref all the objects of the Ship in location A


So let's say there are four locations A B C D

The quest starts in A and ends in D , passing for stages B and C , Each letter so correspond a new location of the ship travel ... each has it's own worldspace and cell

The Interior should stay the same

How should I manage the AI packages of the crew?

what script I need to add?

what conditions?

What other stuff I need to consider?

Thanks a lot for anll answers , please be detailed ...
User avatar
Nikki Morse
 
Posts: 3494
Joined: Fri Aug 25, 2006 12:08 pm

Post » Thu Jun 21, 2012 9:55 am

If I understand you....

What if you did something like a MoveTo function on the player and create 4 different cells, one for each stage?
User avatar
Matt Gammond
 
Posts: 3410
Joined: Mon Jul 02, 2007 2:38 pm

Post » Thu Jun 21, 2012 6:09 am

This is all without using aliases... aliases allow you to do more with moving things (and such actions); but I'm not familiar with them yet. I know that if you want to move almost ANYTHING, Player must be in the same area (ie: the object needs to have 3D loaded/have a parent cell). This means that you have to move ALL your stuff BEFORE moving Player. If you move Player FIRST, all the other stuff will give you errors and stay right where it is (even break the scripting in many cases).

If you want to move stuff from an area nowhere near Player (such as an interior or another worldSpace): I found that the only way to do it is to move Player to that area, move the stuff, insert a wait() long enough to ensure everything is actually moved, then move Player back (or wherever). The wait depends on how many things you're trying to do before sending Player 'back'... experiment with this, checking your papyrus log for 'cannot move' errors (if present, add more wait time).

All said and done though, I'd have a trigger box to detect when Player enters the 'slip zone' (onTriggerEntered fires the 'slip' sequence). You'll also want xMarkers at each location, unless you know the exact coords... which may be better as the actors may appear to 'stack' on top of each other if they all use the same marker.

You may only need the one interior if that's all your scenes require, you could then have different copies of the same ship within the cell; each one having the appropriate props. You could break this up into different interiors altogether, but that would trigger the load screens when moving between them. Alternatively, your quest fragments could just enable/disable all the objects in ONE area as needed (at different stages). If there isn't MUCH, I'd say this would be the easiest, fastest, and best way to do it.

To get the interior door to teleport you to different areas at different times: you can approach this a couple different ways. You could have more than one door in the same physical spot; all but one being InitDisabled... then scripted to enable (while disabling the previous) during certain events. I think this may be the easiest; especially if your quest fragments are what enable/disable the doors (so you won't need to have clever onCellAttach code, or some such mechanism). Alternatively, I think you can disable the normal usage of the door (blockActivation I think it would work); then script the onActivate event to do your bidding.

AI of the crew would depend entirely upon what functionality you want them to possess. A simple sandbox should be fine... that works anywhere you send them (which has valid navMesh).

[EDIT: type-o]
User avatar
rebecca moody
 
Posts: 3430
Joined: Mon Mar 05, 2007 3:01 pm

Post » Thu Jun 21, 2012 6:59 pm


To get the interior door to teleport you to different areas at different times: you can approach this a couple different ways. You could have more than one door in the same physical spot; all but one being InitDisabled... then scripted to enable (while disabling the previous) during certain events. I think this may be the easiest; especially if your quest fragments are what enable/disable the doors (so you won't need to have clever onCellAttach code, or some such mechanism). Alternatively, I think you can disable the normal usage of the door (blockActivation I think it would work); then script the onActivate event to do your bidding.

Wow...that just answered a question I was going to ask here on the forums later lol

Thanks!
User avatar
Javier Borjas
 
Posts: 3392
Joined: Tue Nov 13, 2007 6:34 pm

Post » Thu Jun 21, 2012 8:59 am

I have the general ideas on how to do , what I ammissing are the scripts and codes stuff needed to be implemented :/ ....
User avatar
Breanna Van Dijk
 
Posts: 3384
Joined: Mon Mar 12, 2007 2:18 pm

Post » Thu Jun 21, 2012 3:48 am

If you are willing to 'translate' Oblivion scripts, I did something like this.

Check the file "QQuix Conceptual - Ship Travel" in http://www.tesnexus.com/downloads/file.php?id=20878

It does the job by pre-positioning 3 ships: one at each port and one at high sea (so the player may leave the cabin and walk around the deck during the travel.
Only one ship is enabled at any given time and there is only one cabin with 3 superimposed doors, one to each ship. The doors are disabled/enabled along with the corresponding ship.

This is a 2-port scenario. You could easily add other ports according to your needs.
User avatar
Marquis deVille
 
Posts: 3409
Joined: Thu Jul 26, 2007 8:24 am

Post » Thu Jun 21, 2012 12:18 pm

Sorry I do n't have OB installed ...
But the principle is what I wanted to do already tough I need to make this work throught quest stages , I am not sure if I should use aliases or not ...

to make it simplier for the moment I have switched to a test set of objects that will have to start disabled at quest start , enabled at quest stage 10 and disabled at quest stage 30 ( end of quest )

SO I created a Xmarker named IssgardErliarquestenablemarker

at quest stage 10 in the papyrus frigment of the quest stage 10 I placed IssgardErliarquestenablemarker.enable()

but I get error ....
variable IssgardErliarquestenablemarker is undefined

where I am supposed to define it?
what I am missing?
User avatar
Francesca
 
Posts: 3485
Joined: Thu Jun 22, 2006 5:26 pm

Post » Thu Jun 21, 2012 7:06 pm

Ok I made it work somehow creating a new property object reference etc etc .... now I need to test if the quest works ....
User avatar
Oceavision
 
Posts: 3414
Joined: Thu May 03, 2007 10:52 am


Return to V - Skyrim