Jump to content

Scripting help


Recommended Posts

I'm having a bit of trouble trying to figure out a good way of doing this. I've basically got a helmet (nightvision that automatically switches itself on and off at predetermined times of day while the helmet itself remains equipped) which outside is fine, the nightvision effect works as I want, as do the other features I've added. Trouble is, interior cells are lit and often have fog/smoke and similar effects, and the imagespace modifier looks HORRIBLE in those conditions, so I wanted to make the helmet switch off the nightvision effect when I enter an interior cell (it's not really meant for indoor use anyway, so regardless of imagespace problems I want it turned off).

 

I had the idea of using Player.GetInCell.... until I realised that this would require a specific reference to every single cell I wanted to affect the helmet. This doesn't seem like the best way to me, so I was hoping there was a simpler way to determine if the player has entered an interior cell. Thanks in advance :)

 

edit: been looking at the TES construction set wiki and it mentions something about using a dummy cell for a set of related cells. Would this be a good place to start?

 

edit2: I just found GetInWorldspace. Since the interiors world space is what I want to affect my helmet, I'm hoping this is what I'm after. Fiddling now...

 

edit3: ok, so GetInWorldSpace works like a charm, just tested unequipping the helmet on entering the Megaton Worldspace, worked without issue. Unfortunately, when I try and use Interiors instead, I get an error saying the script can't find the Worldspace. I notice that Interiors seems to have a space before it, I'm wondering if that's the problem (tried adding a space in the script but that didn't work). So I'm a little stuck again heh.

 

edit4: after checking the World Spaces menu, apparently Interiors isn't actually a world space at all, so seemingly I'm back to square one.

 

edit5: ahaha, figured out a way of doing what I want :D Used GetInSameCell to return the same cell the player is in, then used GetInWorldSpace in an if statement to turn the imagespace modifier off if the player enters any world space except the wasteland. So yeah, problem solved :)

Link to comment
Share on other sites

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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