Jump to content

GECK Script Help


Xedric

Recommended Posts

Make your terminal invisible by removing the mesh data from it, and then change your object script to the following, renaming things as necessary:

 

scn NameOfObjectScript

short switch

begin onequip player

set switch to 1

end

begin gamemode

if(switch == 1)
	set switch to 2
	if(NameOfTerminalReference.getinsamecell player == 0)
		NameOfTerminalReference.moveto player
	endif
endif

if(switch == 2)
	NameOfTerminalReference.activate player
endif

end

begin menumode 1057
if(switch == 2)
	set switch to 0
	player.unequipitem NameOfEquipableObject 0 1
endif
end

 

That should work like you want it to, but I haven't tested it.

 

It sets a variable when you equip the item, waits until you leave the Pip-Boy, summons the (invisible) terminal to the player, and activates it. When the terminal activates, it unequips the item and resets the variable.

Link to comment
Share on other sites

Well it's not that. I'm in college for computer programming. I've learned VB. I'm currently learning C#, Ruby, HTML and CSS. Next quarter I'll be taking Rails, C++ and more .NET. So I've got a dozen different kinds of code in my head and GECK doesn't follow the sensible rules of any of them.
Link to comment
Share on other sites

The idea that the terminal needed to be in the same cell as the player was messing with me, so I tested some more and found that it is not absolutely necessary (although it may still be needed for some other reason in Xedric's case). The test setup was a terminal (in this case IrvingChengTerminal since it's in FalloutNV.esm and unused) placed in cell VendorChestsCell. The test process was trying to activate the terminal from gamemode and different menumodes.

 

The results were that 1) the function call must be "terminalRef.activate player" and not just "terminalRef.activate", and 2) the function should be called from only gamemode. Calling the function from the console (which is considered menumode) worked, calling with the Pipboy menu open didn't work, calling during dialogue or the companion wheel did work but was very awkward. So going back to Xedric's original problem, here is an alternative possible solution:

 

scn agcTardisRemoteControlScript

short controlStage

Begin OnEquip
Set controlStage to 1
Player.UnequipItem agcTardisRemoteControl 1
End

Begin GameMode
If (controlStage == 1)
	Set controlStage to 2
	agcTARDISdestinationTERMINALREF.Activate Player
ElseIf (controlStage == 2)
	Set controlStage to 0
	agcTARDISdematSwitchREF.Activate Player 1
EndIf
End

Link to comment
Share on other sites

  • Recently Browsing   0 members

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