Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Neverwinter Nights: Enhanced Edition has been released! Visit nwn.beamdog.com to make an order. NWN:EE FAQ is available.
Soundtracks for BG:EE, SoD, BG2:EE, IWD:EE, PST:EE are now available in the Beamdog store.
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

Making a creature that can only be damaged by ranged attacks?

ABJECT_SELFABJECT_SELF Member Posts: 12
Hey, this one might be a bit out-there, but bear with me.

I'm working on implementing believable attack helicopters into my module. So far they look great; thanks to the new visual transform features I can get them to fly at any height. The problem is that in combat, there's nothing stopping creatures from running right up to the helicopter's ground location and smacking empty space with a hammer until the helicopter inexplicably explodes.

Ideally, I'm trying to make helicopters immune to all melee weapons so that only guns and magic can damage them. Does anybody know if some item properties and/or scripting that could make this possible?

Comments

  • JusticeDragonJusticeDragon Member Posts: 5
    It might be helpful looking into archery targets/combat dummies that can only be damaged with archery/melee. I'm thinking perhaps similar scripts could help in this manner? (I'd have to take a deeper look to have a concrete answer for you). Those would be nifty immunities that maybe could be added as item properties (*cough cough* Beamdog)

  • tfoxtfox Member Posts: 86
    edited July 12
    I'd probably just do something easy and make a change to the onspawn script that checks if the creature being spawned has a specific variable on it & if so apply an effect like below to them.

    EffectConcealment(100, MISS_CHANCE_TYPE_VS_MELEE)

    I've thought about doing it with visually transformed spiders that are upside down and hanging 2 meters in the air as though walking on a tunnel/caves roof.

    From the toolset's script editor for EffectConcealment (this is how the range only concealment from Entropic Shield is done)

    // Create a Concealment effect.
    // - nPercentage: 1-100 inclusive
    // - nMissChanceType: MISS_CHANCE_TYPE_*
    // * Returns an effect of type EFFECT_TYPE_INVALIDEFFECT if nPercentage < 1 or
    // nPercentage > 100.
    effect EffectConcealment(int nPercentage, int nMissType=MISS_CHANCE_TYPE_NORMAL)

    JusticeDragon
Sign In or Register to comment.