Jump to content

Teleport/Item Removal Script


Battenburga

Recommended Posts

Hey all, I have a slight hickup and I'm wondering if you guys can help me find the problem.
I want the player to activate a device that then teleports them to a new location, however they lose all their items in the process.
I know the script works as I recieve no errors, but the game crashes when it begins to load the new area. (It works normally without using the script)

Here is what I have:

scn 0RWDKnockoutScript


Begin OnActivate


Player.MoveToMarkerWithFade RWDKnockoutMarkerRef
Player.RemoveAllItems RWDYourItemsChestREF 1 1
Player.AddItem Pipboy 1 1
Player.AddItem PipboyGlove 1 1
Player.EquipItem Pipboy 1 1
Player.EquipItem PipboyGlove 1 1


End

Could it potentially just be a conflict with pipboy mods? If so, is there a way around said conflict? Many thanks.

 

Link to comment
Share on other sites

This is a problem discussed in ''TIP Block Types Multiple vs Single Frame processing" under the "Scripting" section of the wiki "Getting started creating mods using GECK" article. I believe you need at least one frame between the "AddItem" and "EquipItem" statements (and possibly the "RemoveAllItems" one as well; note the "bug" regarding Player on that page).

 

I would split the actions up and use flag variables to determine which occurs during the "game block". You may want to see how the developers handled a similar situation in "Dead Money". (Probably better examples not occurring to me at the moment.)

 

-Dubious-

Link to comment
Share on other sites

  • Recently Browsing   0 members

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