Jump to content

Scripting Question


AbsoluteAnarchy

Recommended Posts

I'm not sure what i did wrong with this script so maybe someone can help me out. I'm trying to have this script fire through the result script in a terminal and teleport the player to a different cell, but nothing ends up happening and the terminal becomes unusable when i escape out of it. Here's the script

 

short daysPassed

 

begin OnActivate

 

PlaySound OBJOutcastVertibirdTakeoff

 

PlayBink "DCTakeoff.bik" 1 0 1 1

 

; === PlayBink filename.bik [interruptable] (optional(default=0)) [mute audio] (optional(default=1)) [pause music] (optional(default=1)) [letterboxed] (optional(default=1))

; === Script to set days passes and to make sure nothing is out of bounds ===

 

set daysPassed to ( GetRandomPercent + 1 ) / 50

Set GameDay to ( GameDay + daysPassed + 3 )

 

if ( GameMonth == 2 && GameDay > 28 )

Set GameMonth to 3

Set GameDay to ( GameDay - 28 )

elseif ( GameMonth == 4 || GameMonth == 6 || GameMonth == 9 || GameMonth == 11 )

if ( GameDay > 30 )

Set GameMonth to ( GameMonth + 1 )

Set GameDay to ( GameDay - 30 )

endif

elseif ( GameDay > 31 )

Set GameMonth to ( GameMonth + 1 )

Set GameDay to ( GameDay - 31 )

If ( GameMonth > 12 )

Set GameMonth to 1

endif

endif

PlayBink "DC2NV.bik" 1 1 1 1

 

Player.MoveTo RFCWVertibirdInteriorNV

 

end

 

Not sure if i did something horribly wrong or what, any help would be appreciated.

Edited by AbsoluteAnarchy
Link to comment
Share on other sites

Thank you, that seemed to work as far as getting the script to play but the game seems to be freezing when it tries to teleport the player into the next cell. I've placed an xmarkerheading and given it the referenceid RFCWVertibirdInteriorNV in the cell i wanted the player to teleport to. Should i try a regular xmarker or is there a better method to teleport the player?

 

Edit: The cell loads fine if i use coc and only seems to be freezing when i use the script to teleport there.

Edited by AbsoluteAnarchy
Link to comment
Share on other sites

Edit: The cell loads fine if i use coc and only seems to be freezing when i use the script to teleport there.

 

Never did that kind of terminal before and I can't think of one to look at in New Vegas, but assuming there is only one menu screen in your terminal and no submenus try putting ForceTerminalBack at the end of the script block. See if the game wants a proper exit out of the terminal.

Link to comment
Share on other sites

Just tested it a bit, and seems to be crashing even if i use forceterminalback. It actually is in a submenu, but I've tried adding forceterminalback twice, and making a test option in the first terminal screen to see if that was the issue but it still seems to be crashing no matter what. player.moveto RFCWOutcastVertibirdDC is saying that it's not a recognized reference when i test it in console as well, but i'm not sure if that's normal or not.
Link to comment
Share on other sites

As long as you have taken out the "Begin OnActive", the "End" and added a couple of ForceTerminalBack at the start, the Script works fine as far as teleporting.

Make sure you are using a red XMarkerHeading and not any other color. Also, make sure there are no other unused Markers in the cell. If there are any then get rid of them.

If it still locks up then there is something in the cell or more likely something the script is doing in the cell that is locking it up. COC would not give you the same affect as the Player.moveto command.

Try only putting what is needed in the script to move the player to get that working first.

ForceTerminalBack
ForceTerminalBack
         Player.moveto RFCWVertibirdInteriorNV 

If you get that working then you know it is another part of your code doing something. You can even try activating some of this code in the cell you are moving to with an Primitive Activator.

 

Oh and Player.moveto will not work in the console for Markers. It is only for NPC's, Items and Creatures I think. Even then you need the RefID for the those to work.

You can't say in console. Player.moveto LucasSimms for example. You would have to say Player.moveto 00003b46 which is his RefID.

Link to comment
Share on other sites

Sorry i didn't get back to this sooner, geck stopped working and i ended up having to reinstall my game. I've just tried testing what you suggested and it's still crashing for some reason. I may try scripting in a different method where it just disables the original door to the vertibird and enables the one to the destination, going to test that out in a little bit since this still isn't working.
Link to comment
Share on other sites

Having a problem saving two scripts i need to attach to two seperate doors going into the vertibird.

 

scn RFCWOutcastVertibirdHatchEnablerDCSCRIPT

Begin OnActivate

RFCWVertibirdHatchDC1.Disable 0

RFCWVertibirdHatchNV.Disable 0

RFCWVertibirdTerminalNV.Disable 0

RFCWVertibirdHatchDC.Enable 0

RFCWVertibirdTerminalDC.Enable 0

End

 

and

scn RFCWOutcastVertibirdHatchEnablerNVSCRIPT

Begin OnActivate

RFCWVertibirdHatchDC1.Disable 0

RFCWVertibirdHatchNV.Enable 0

RFCWVertibirdTerminalNV.Enable 0

RFCWVertibirdHatchDC.Disable 0

RFCWVertibirdTerminalDC.Disable 0

End

 

I've run them through cipcis' script validator and they seem to check out, but i can't save them in geck for some reason. I've checked all the ref ID's and they seem to be correct, yet it's not letting me save them.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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