One question about door companion teleportation scripts.

Post » Sun Aug 08, 2010 10:06 pm

So I'm making a customized building mod (a large extension of the Nova hotel connecting to a pretty big basemant which has an underground passage to a giant tree with sniping perches on the higher levels of the tree. The cause of it is several teleporting doors within the same cells. When there's multiple teleporting doors in the same cell npc companions can't seem to register to use them. Though interestingly if it goes to another cell the NPC uses them fine on their own (generally).

Anyways... I have one little problem. I have done several google searches, and several searches on these forums. Geck+Door+companion, Geck+Gomorrah (yeah I know about the Gomorrah elevator script). And if I can just get that script to work my mod will be beyond halfway done. It's frustrating because just typing the companions ID through the console followed by moveto player in just a few key locations, and it works fine otherwise. I could make it feel a lot more natural/realistic/etc via companion teleporting doors, but problem is I don't know how to start with that, and I've been searching around quite a while on how to make door scripts work.

I altered the script several times, deleting out various bits here and there for DAYS now I've been trying to figure out how to make a copy of the Gomorrah elevator script that retains the teleporting upon door use, minus the message. And I guess I'm just too inept at scripting to figure it out. Believe me when I say I did several internet searches, and several failures in the GECK before asking this as a last resort.

I think the answer is residing somewhere in the Gomorrah elevator script, but I'm just not script clever enough to figure out how to remove everything but the companion teleporting feature from it. So anyways all I need is: A script that upon activating a door teleports all the vanilla companions to the player character. (Or you know whatever companions are following the player at the time). I'm pretty positive such a script can be made, just I can't figure out how to make it on my own. And if it helps... Here's the script in question that I haven't been able to alter properly. (I think).

scn GomorrahElevatorDoorScript

int Button

begin OnActivate
ref reffer
set reffer to GetActionRef
if GetActionRef == player
showmessage GomorraElevatorMessage
else
if reffer.GetPlayerTeammate == 1
reffer.moveto player
endif
endif
end

begin GameMode
set Button to GetButtonPressed
ref rMarker
if Button == 1
player.MoveTo GomorrahLLMarker
set rMarker to GomorrahLLMarker
Autosave
elseif Button == 2
player.MoveTo Gomorrah1stMarker
set rMarker to Gomorrah1stMarker
Autosave
elseif Button == 3
player.MoveTo Gomorrah3rdMarker
set rMarker to Gomorrah3rdMarker
Autosave
elseif Button == 4
player.MoveTo GomorrahTopMarker
set rMarker to GomorrahTopMarker
Autosave
endif
if (Button == 1 || Button == 2 || Button == 3 || Button == 4)
if (VNPCFollowers.bBooneHired) && (CraigBooneREF.Waiting != 1)
CraigBooneREF.MoveTo rMarker;
endif
if (VNPCFollowers.bCassHired) && (RoseofSharonCassidyREF.Waiting != 1)
RoseofSharonCassidyREF.MoveTo rMarker;
endif
if (VNPCFollowers.bVeronicaHired) && (VeronicaREF.Waiting != 1)
VeronicaREF.MoveTo rMarker;
endif
if (VNPCFollowers.bLilyHired) && (LilyREF.Waiting != 1)
LilyREF.MoveTo rMarker;
endif
if (VNPCFollowers.RaulHired) && (RaulREF.Waiting != 1)
RaulREF.MoveTo rMarker;
endif
if (VNPCFollowers.ArcadeHired) && (ArcadeREF.Waiting != 1)
ArcadeREF.MoveTo rMarker;
endif
if (VNPCFollowers.bEDEHired) && (EDE1REF.Waiting != 1)
if EDE1Ref.GetDisabled == 0
EDE1Ref.MoveTo rMarker
elseif EDE2Ref.GetDisabled == 0
EDE2Ref.MoveTo rMarker
elseif EDE3Ref.GetDisabled == 0
EDE3Ref.MoveTo rMarker
endif
endif
if (VNPCFollowers.RexHired) && (RexREF.Waiting != 1)
RexREF.MoveTo rMarker;
endif
endif
end
User avatar
Bryanna Vacchiano
 
Posts: 3425
Joined: Wed Jan 31, 2007 9:54 pm

Post » Sun Aug 08, 2010 10:11 pm

This script assumes that you have two door objects back-to-back in the cell, so they can have their own script, which simplifies it.

scn MYInternalDoorScript1int iActivated;This script moves the player and companions to MyCellMarker1 on the other side of the door;The door on the other side of this one has a script named MYInternalDoorScript2 and moves everyone to MyCellMarker2begin OnActivate	if IsActionREF player == 1		set iActivated to 1	endifendbegin GameMode	if (iActivated == 0)		return	else		set iActivated to 0				Player.MoveTo MyCellMarker1		if (VNPCFollowers.bBooneHired) && (CraigBooneREF.Waiting != 1)			CraigBooneREF.MoveTo MyCellMarker1;		endif		if (VNPCFollowers.bCassHired) && (RoseofSharonCassidyREF.Waiting != 1)			RoseofSharonCassidyREF.MoveTo MyCellMarker1;		endif 		if (VNPCFollowers.bVeronicaHired) && (VeronicaREF.Waiting != 1)			VeronicaREF.MoveTo MyCellMarker1;		endif		if (VNPCFollowers.bLilyHired) && (LilyREF.Waiting != 1)			LilyREF.MoveTo MyCellMarker1;		endif		if (VNPCFollowers.RaulHired) && (RaulREF.Waiting != 1)			RaulREF.MoveTo MyCellMarker1;		endif		if (VNPCFollowers.ArcadeHired) && (ArcadeREF.Waiting != 1)			ArcadeREF.MoveTo MyCellMarker1;		endif		if (VNPCFollowers.bEDEHired) && (EDE1REF.Waiting != 1)			if EDE1Ref.GetDisabled == 0				EDE1Ref.MoveTo MyCellMarker1			elseif EDE2Ref.GetDisabled == 0				EDE2Ref.MoveTo MyCellMarker1			elseif EDE3Ref.GetDisabled == 0				EDE3Ref.MoveTo MyCellMarker1			endif		endif		if (VNPCFollowers.RexHired) && (RexREF.Waiting != 1)			RexREF.MoveTo MyCellMarker1;		endif 	endifend 

User avatar
MatthewJontully
 
Posts: 3517
Joined: Thu Mar 08, 2007 9:33 am

Post » Sun Aug 08, 2010 9:48 pm

This script assumes that you have two door objects back-to-back in the cell, so they can have their own script, which simplifies it.


Thanks that was just the script I needed.
User avatar
Ymani Hood
 
Posts: 3514
Joined: Fri Oct 26, 2007 3:22 am


Return to Fallout: New Vegas