Magic Dead Zone
Re: Magic Dead Zone
Oooh, thank you so much!
Re: Magic Dead Zone
hello ,
dont understand where i m suposed to put this
-- Add the onCastSpell hook and have it run a script called antimagic inside a Lua script entity called checkAntiMagic
cloneObject{
name = "party",
baseObject = "party",
onCastSpell = function(self, spell)
local returnValue = checkAntiMagic.antimagic()
return returnValue
end,
}
i made a party.lua to add it with an entry on init.lua who load it , create the antimagic zone object and add the script lua in game , but game crash when i cast a spell (
dont understand where i m suposed to put this
-- Add the onCastSpell hook and have it run a script called antimagic inside a Lua script entity called checkAntiMagic
cloneObject{
name = "party",
baseObject = "party",
onCastSpell = function(self, spell)
local returnValue = checkAntiMagic.antimagic()
return returnValue
end,
}
i made a party.lua to add it with an entry on init.lua who load it , create the antimagic zone object and add the script lua in game , but game crash when i cast a spell (
Re: Magic Dead Zone
You can just add the cloneObject of the party in your objects.lua
Then in the editor you make a script entity called checkAntiMagic with a function called antimagic() and add whatever code in there you want to check for, such as the party being on a certain level, the party holding a certain item or not, etc, and have it return false whenever you want the party to not cast magic
Then in the editor you make a script entity called checkAntiMagic with a function called antimagic() and add whatever code in there you want to check for, such as the party being on a certain level, the party holding a certain item or not, etc, and have it return false whenever you want the party to not cast magic
Finished Dungeons - complete mods to play
Re: Magic Dead Zone
thx komag this work if i put
cloneObject{
name = "party",
baseObject = "party",
onCastSpell = function(self, spell)
local returnValue = checkAntiMagic.antimagic()
return returnValue
end,
}
in the object.lua and remove what i have done in a party.lua
cloneObject{
name = "party",
baseObject = "party",
onCastSpell = function(self, spell)
local returnValue = checkAntiMagic.antimagic()
return returnValue
end,
}
in the object.lua and remove what i have done in a party.lua