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!
Mysterious
Posts: 226 Joined: Wed Nov 06, 2013 8:31 am
Post
by Mysterious » Mon Dec 08, 2014 6:08 am
Hi guys in the old day you could a fx in log 1 like this:
Code: Select all
spawn("fx", party.level, party.x, party.y, party.facing, "red1")
red1:translate(0, 1.5, 0)
red1:setParticleSystem("fade_red_fast_2")
What I would like to know is how you do it for log 2? Thxs
petri
Posts: 1917 Joined: Thu Mar 01, 2012 4:58 pm
Location: Finland
Post
by petri » Tue Dec 09, 2014 2:34 pm
The FX thing was a terrible hack in LoG1. In LoG2 you build your objects from components.
But if you just need a particle system, an easy way would be to spawn a particle_system object and change the particle system it's using.
Something like this should work (haven't tested):
Code: Select all
local obj = spawn("particle_system", <insert coords here>)
obj.particle:setParticleSystem("fade_red_fast_2")
Mysterious
Posts: 226 Joined: Wed Nov 06, 2013 8:31 am
Post
by Mysterious » Wed Dec 10, 2014 9:23 am
Thxs Petri it works now I have a new weapon
Phitt
Posts: 442 Joined: Tue Aug 14, 2012 9:43 am
Post
by Phitt » Thu Dec 11, 2014 1:40 am
Works great, but is there any way to avoid the annoying 'Warning! no such particle system: xxx' console message?
minmay
Posts: 2790 Joined: Mon Sep 23, 2013 2:24 am
Post
by minmay » Thu Dec 11, 2014 1:45 am
spawn("particle_system",<coords>).particle:setParticleSystem("torch")