Deleted1084753User Posted April 5, 2009 Share Posted April 5, 2009 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 More sharing options...
TGBlank Posted April 5, 2009 Share Posted April 5, 2009 player.IsInInterior Link to comment Share on other sites More sharing options...
Deleted1084753User Posted April 5, 2009 Author Share Posted April 5, 2009 Ah, neat, didn't know about that one. Would you recommend using that over the way I just mentioned in my 5th edit in the first post? Thanks for the tip, kudos incoming :) Link to comment Share on other sites More sharing options...
Cipscis Posted April 5, 2009 Share Posted April 5, 2009 You'll want to use IsInInterior for this. Just out of curiosity, how are you turning the ImageSpace Modifier on and off? If you're using an object script with , OnUnequip and GameMode blocks, then there's a much simpler way. If you use a scripted Object Effect (effect script -> Base Effect -> Object Effect) that applies and removes the ImageSpace Modifier via ScriptEffectStart and ScriptEffectFinish blocks, then you can simply apply conditions to the appropriate effect item so that the ImageSpace Modifier is only applied during certain times of the day while the player is not in an interior cell. Just use an effect script like this:Begin ScriptEffectStart if GetIsReference player ApplyImageSpaceModifier NightVisionISM endif End Begin ScriptEffectFinish if GetIsReference player RemoveImageSpaceModifier NightVisionISM endif EndCipscis EDIT: Ninja'd by TGBlank Cipscis Link to comment Share on other sites More sharing options...
Deleted1084753User Posted April 5, 2009 Author Share Posted April 5, 2009 Ah, so IsInInterior is the way to go? And thanks for the tips there, I was indeed using OnUnequip and GameMode. I'll have a play around with what you mentioned there, thanks. Kudos inbound :) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.