Seriously what's up with this forum? I had to use Firebug just to get the textarea to show...
Anyway, it's been a while since I've done any modding, but this should be perfectly doable.
if ( getDistance player < 100 ) if ( globalFlag != 1 ) set globalFlag to 1 endifelse if ( globalFlag == 1 ) set globalFlag to 0 endifendif
Applying a script like this to those walls of ice would set a global variable (globalFlag), then you could run either a startscript or a local script applied to an object in each cell you want this to work for. Something like this.
if ( globalFlag != 1 ) returnendifif ( getInterior == 1 ) if ( player->getPosition Z > getWaterLevel ) return endifelse if ( player->getPosition Z > 0 ) ;water level, outside... not sure if getWaterLevel works outside return endifendifplayer->modCurrentHealth -5 ;or whatever
You can even take into account a player's frost resistance. Here's a script I wrote two years ago that makes fire resistance work for lava damage:
begin lavashort DamageRatefloat timerif ( menumode == 1 ) returnendifif ( CellChanged == 0 ) if ( GetSoundPlaying "lava layer" == 0 ) PlayLoopSound3DVP "lava layer", 1.0, 1.0 endifendifif ( player->GetResistFire > 99 ) set DamageRate to 0elseif ( player->GetResistFire < 100 ) if ( PCRace == 3 ) if ( player->GetResistFire < 80 ) ;Dunmer damage balances out with normal when they get 80% or more Set DamageRate to ( ( -100 + player->GetResistFire - 40 ) / 4 ) else Set DamageRate to ( ( -100 + player->GetResistFire ) / 4 ) endif else Set DamageRate to ( ( -100 + player->GetResistFire ) / 4 ) endifendifset timer to ( timer + GetSecondsPassed )if ( GetStandingPC == 1 ) if ( timer >= 1 ) ;hurt/heal player once every second not frame! player->ModCurrentHealth DamageRate ;X pts of damage a sec (By Default most races get 25, Dunmers get 16.25) player->ModCurrentHealth 20 ;heal PC so no double damage is inflicted set timer to 0 endifendifHurtStandingActor 20 ;for NPC's/creatures (they get 20 pts per second by default)end lava