Skip to content

Casting a "real" spells from a placeable ?


I'm trying to get a placeable to cast a real spell at a player at a *specific* caster levels.


The placeable can cast with ActionCastSpellAtObject using 'bCheat' flag to TRUE, but it defaults to level 10 caster levels, even if nDomainLevel is set higher.

NWNX_Creature_DoItemCastSpell also doesn't work with placeables, but works with creatures and has correct level.

I tried making a fake "invisible" creature and having them cast it. It casts the spell properly, but the problems with this approach:

1) I can see the fake caster. I've tried using both `EffectEthereal` and `EffectSanctuary`, and VFX_DUR_CUTSCENE_INVISIBILITY, but effects are removed once invisible creature casts fake spell (even if I reapply). AOE spells can also "reveal" the invisible caster.

2) The location from were the spell is launched is off. Since even with `EffectCutsceneGhost` a creature can't occupy same place as the placeable.


Lastly, I've tried re-writing the spell to mimic the same effect. This sort of works since I can customize the caster level; but then the function `MyResistSpell(oCaster, oTarget, 1.0f)` doesn't work from my fake spell code. Presumably, because oCaster doesn't have real caster levels or stats since it's a placeable ? Or because it doesn't have a spell id? I'm not sure how to troubleshoot MyResistSpell.


--

Basically I want a chair to cast a level N fireball. Were N is level 1 - 40. I want that fireball spell to respect spell resistances (SR, mantles, spell immunity, etc).



Suggestions ?












Comments

  • ForSeriousForSerious Member Posts: 446
    You are in luck. Make a creature and change the appearance to chair. Make its movement rate immobile. Basically copy the Combat Dummy from the prelude. It has the scripts to make it not attack back, if that's something you need.
  • ReachPWReachPW Member Posts: 27
    I looked into that, but not all placeables have creature models. The chair was just an example. What if I want to use 'Stones' or 'Pedestal' ?
  • ForSeriousForSerious Member Posts: 446
    Correct. There are only a few placeable looking appearances to choose from: I think chair, combat dummy and like candelabra.
    Sorry, I've heard people request similar things and it came to the conclusion that there's not the appearance they want. I got excited because you mentioned one of the few that does exist:
    ReachPW wrote: »
    Basically I want a chair to cast a level N fireball.

Sign In or Register to comment.