Disabling specific Spells Help

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
OGDA
Posts: 115
Joined: Tue Oct 28, 2014 5:07 pm

Re: Disabling specific Spells Help

Post by OGDA »

Hi,

I just found out that I can make a character cast a spell by this code:

party.party:getChampion(4):castSpell(58)

58 is the number for the darkness spell (rune 5, then rune 8).
Light would be 25 (rune 2, then rune 5).

Kind regards,
Joerg
Echoplex
Posts: 63
Joined: Tue Nov 04, 2014 10:59 pm

Re: Disabling specific Spells Help

Post by Echoplex »

JKos wrote:Try

Code: Select all

      onCastSpell = function(party,champion,spellName)
         if spellName == "light" then
            return false
         end       
      end
IIRC this worked in LoG1.
Worked great thanks
Post Reply