Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
vidarfreyr
Posts: 71 Joined: Sat Oct 20, 2012 4:40 am
Post
by vidarfreyr » Sun Jan 13, 2013 7:40 pm
I'm having some trouble getting this to work. I want the party to become invisible when a button is pressed or maybe make an item with charges. Only I'm not sure how to use the 'setConditions' command. This does not work:
Code: Select all
function invisigive()
Party:setCondition(invisible)
end
Komag
Posts: 3659 Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA
Post
by Komag » Sun Jan 13, 2013 11:48 pm
you have to do each champion individually, and put the condition in quotes
vidarfreyr
Posts: 71 Joined: Sat Oct 20, 2012 4:40 am
Post
by vidarfreyr » Mon Jan 14, 2013 1:16 am
Thanks! Also turns out the condition name is "invisibility" not "invisible". So my completed script for a button that gives invisibility is like so.
Code: Select all
function invisigive()
for i = 1,4 do
hasInvisi = party:getChampion(i)
hasInvisi:setCondition("invisibility",120)
end
end
Now I just need to figure out how to make some magical flash or other effect appear at the same time to indicate the change.
Komag
Posts: 3659 Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA
Post
by Komag » Mon Jan 14, 2013 1:35 am
glad you got figured out! you can put it all on one line
for i=1,4 do party:getChampion(i):setCondition("invisibility",120) end
or
for i=1,4 do
party:getChampion(i):setCondition("invisibility",120)
end
for the light you'll want a short-lived fx spawned in. You could also play a magic sound.