Hi all,
I want to open a door when a spell (light spell) is cast, i looked for in all threads but haven't found the right script,
any tip for me?
want to open a door when a spell is cast
Re: want to open a door when a spell is cast
You would add an onCastSpell hook to the party (or possibly onCast to the spell itself)
Finished Dungeons - complete mods to play
Re: want to open a door when a spell is cast
Or implement the zo spell from the Exsp framework (it is not a light spell however, and you need the exsp framework [and hence the JKos framework] to use it properly I think)
Re: want to open a door when a spell is cast
Thx for your answer even if i don't understand anything :p
hidden treasure plate connected to a script,
script :
function open()
if party:getChampion(1): onCast :"firebusrt"
then
temple_door_1 : open()
else
temple_door_1 : close()
end
I don't know how to do hook.
i tried that but it does not work, i don't know what is wrong:You would add an onCastSpell hook to the party (or possibly onCast to the spell itself)
hidden treasure plate connected to a script,
script :
function open()
if party:getChampion(1): onCast :"firebusrt"
then
temple_door_1 : open()
else
temple_door_1 : close()
end
I don't know how to do hook.
Re: want to open a door when a spell is cast
onCastSpell is a hook only for party, not in script_entity
http://www.grimrock.net/modding/asset-d ... reference/
You must open the init.lua
and add
http://www.grimrock.net/modding/asset-d ... reference/
You must open the init.lua
and add
Code: Select all
cloneObject{
name = "party",
baseObject = "party",
onCastSpell = function( self , spell )
if spell.name == "fireburst" then
your_script_entity.your_function()
end
end,
}Orwak - MOD - Beta version 1.0
Re: want to open a door when a spell is cast
As an alternative, you could change the spell to fireball, and place a hidden receptor over the door. Damonya's hook will work perfect tho.
Currently conspiring with many modders on the "Legends of the Northern Realms"project.
"You have been captured by a psychopathic diety who needs a new plaything to torture."
Hotel Hades
"You have been captured by a psychopathic diety who needs a new plaything to torture."
Hotel Hades
Re: want to open a door when a spell is cast
I think receptor on door doesn't work. Receptors works only against wall.msyblade wrote:As an alternative, you could change the spell to fireball, and place a hidden receptor over the door. Damonya's hook will work perfect tho.
Otherwise, you have to change the model of the receptor
Orwak - MOD - Beta version 1.0
