Spawning a particle effect in an alcove

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
Kasarul
Posts: 9
Joined: Tue Oct 09, 2012 1:54 am

Spawning a particle effect in an alcove

Post by Kasarul »

Hello!
I am currently trying to play a particle effect within an alcove after placement of an item.
Here is my current code:

end
SpoilerShow
function gemaCheck()
local itemFound = false
for i in alcovegema:containedItems() do
if i.name == "blue_gem" then
itemFound = true
end
end

if itemFound then
spawn("fx", 1, 29, 10, 3, "smoke")
smoke:setParticleSystem("smoke_1")
smoke:translate(2, 1, 0)
blue_gem_2:destroy()
gemdoora:open()
gemdoorc:open()
hudPrint("A second secret door opens nearby...")
playSound("secret")
party:getChampion(1):gainExp(60)
party:getChampion(2):gainExp(60)
party:getChampion(3):gainExp(60)
party:getChampion(4):gainExp(60)
else
gemdoora:close()
end
end
Everything works but the particle will not spawn. Do I have to attach the particle to an item?
Any and all help is appreciated!
User avatar
Lark
Posts: 178
Joined: Wed Sep 19, 2012 4:23 pm
Location: Springfield, MO USA

Re: Spawning a particle effect in an alcove

Post by Lark »

I've not tried this yet, but I will - this is a cool idea. But shouldn't spawn("fx", 1, 29, 10, 3, "smoke") be smoke = spawn("fx", 1, 29, 10, 3, "smoke") to match the statements following? I really don't know LUA very well and it does some strange things, but the above is how I reference all objects I spawn in scripts. (Also, if you'll use "Code" tags when you post, your indents will be preserved.)

Good Luck! -Lark
Post Reply