Skip to content

How can I disable all Player's combat abilities?

DarkAliceDarkAlice Member Posts: 7
edited May 2023 in Builders - Scripting
Greetings.
I am developing a module where in many locations, for plot reasons, the player shouldn't be allowed to attack anything or cast spells. Of course I can set all NPCs and placeables to be indestructible but I think it would be much more elegant to disable directly via script the player's offensive capabilities.
Is there any way to do this? Thanks in advance.

Comments

  • ProlericProleric Member Posts: 1,316
    I don't think there's a simple alternative to making everything Plot - that's what it's for - but you can do that in a script, looping through all objects in the area.

    You can disable casting - see for example Lilac Soul's spell hooking tutorial in the Lexicon.
  • DarkAliceDarkAlice Member Posts: 7
    Proleric wrote: »
    You can disable casting - see for example Lilac Soul's spell hooking tutorial in the Lexicon.
    Yes, I was figuring out this. But thanks for the tut: it was useful.
    So there is no a simple way to prevent the PC's attack action...
    However the plot option works fine enough so I guess I have to settle for it.
  • DazDaz Member Posts: 127
    NWNEE's latest updated added `EffectPacified()` which when applied to a player, makes it so they can't attack
  • DarkAliceDarkAlice Member Posts: 7
    Thanks Daz!
    I will update the game, then I'll try! :)
Sign In or Register to comment.