Skip to content

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

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: 87
    edited July 2019
    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)
Sign In or Register to comment.