[Help required] Excluding City's Exteriors from being flagge

Post » Mon Nov 19, 2012 12:36 am

Hi guys,

I ran in another problem due to my scripting skills -.-

So I got a script for a magic effect that supposed to be disabled in interiors. I would like it to be active in the exteriors of towns though. So that the effect doesn't deactivate when I walk through a city gate, but once I enter a house within the city walls the effect turns off. So I am trying to exclude the "exterior" cells from the city world space from my condition.

I'm currently testing the script on Windhlem, so this is what I got:

target.IsInInterior() && !(target.GetParentCell() == WindhelmOrigin)

Unfortunately it doesn't work, the magic effect still stops everytime I enter the Windhelm gate. I guess it is because I got the wrong cells selected. (really just guessing heree though)

I tried the following cells ass assigned to the "WindhelmOrigin" property so far:
- WindhelmOrigin (thought that should have been it :/ )
- WindhelmExterior01
- WindhelmExterior02
- WindhelmMarketplaceExterior

Some help would be nice, I have not experiences with WorldSpaces so far...
User avatar
Zach Hunter
 
Posts: 3444
Joined: Wed Aug 08, 2007 3:26 pm

Post » Sun Nov 18, 2012 6:18 pm

You could I THINK use a FORM-LIST.

(at least I think you can add Cells to a Formlist???)

Add each of the Cell-IDs you do not want to be an Interior to a list, then cycle through that list OnCellLoad ...


(I never tried the parenting thing ... locations are very odd ... from what you wrote it does seem as though your script should work ... but obviosuly it isn't ... I'm not sure why :()
User avatar
quinnnn
 
Posts: 3503
Joined: Sat Mar 03, 2007 1:11 pm

Post » Sun Nov 18, 2012 9:27 pm

Form Lists can have cells or anything else with a FormID.

If CellFLST.HasForm(Target.GetParentCell())ElseIf Target.IsInInterior()	; Do stuffEndIf
User avatar
Jake Easom
 
Posts: 3424
Joined: Sun Jul 29, 2007 4:33 am


Return to V - Skyrim