Trouble with costum particles

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
User avatar
Skuggasveinn
Posts: 562
Joined: Wed Sep 26, 2012 5:28 pm

Trouble with costum particles

Post by Skuggasveinn »

Hi

I'm having trouble with costum particles.

First I clone an existing light source and define my own particle.

Code: Select all

cloneObject{
   name = "temple_ceiling_lamp_red",
   baseObject = "temple_ceiling_lamp",
   particleSystem = "temple_ceiling_lamp_red",
   lightColor = vec(1,0,0), -- RGB value
}
The object shows up in the editor and is creating red light, put my costum temple_ceiling_lamp_red particle is not showing up.

looking at the mod_assets\scripts folder I saw that there is no particles.lua script, so I went ahead and created one.
the mod_assets\scripts\particles.lua script has only the following line.

Code: Select all

import "mod_assets/particles/temple_ceiling_lamp_red.lua"
again there is no particles folder directly under mod_assets like there is under the orginal assets folder, so again I went ahead and created it, and dropped my temple_ceiling_lamp_red.lua script under it.

Code: Select all

defineParticleSystem{
	name = "temple_ceiling_lamp_red",
	emitters = {
		-- glow
		{
			spawnBurst = true,
			emissionRate = 1,
			emissionTime = 0,
			maxParticles = 1,
			boxMin = {0,0,-0.1},
			boxMax = {0,0,-0.1},
			sprayAngle = {0,30},
			velocity = {0,0},
			texture = "mod_assets/textures/particles/red_glow.tga",
			lifetime = {1000000, 1000000},
			color0 = {0.8, 0.11, 0.05},
			opacity = 1,
			fadeIn = 0.1,
			fadeOut = 0.1,
			size = {3, 3},
			gravity = {0,0,0},
			airResistance = 1,
			rotationSpeed = 0,
			blendMode = "Additive",
		}
	}
}
the red_glow.tga is in the correct place under mod_assets (and yes its a DDS file) I even copied the glow.dds and renamed it red_glow.dds to see if I get the orginal blue particle if there was something wrong with my dds export, but no, the particle simply doesn't show up ingame.

Running the preview I get the following error msg:
warning! no such particle system: mod_assets/particles/temple_ceiling_lamp_red

Has anyone had a succsessfull costum particle show up ingame ?, can you see what I'm doing wrong here ?
Giving that there is no particle.lua and no particles folder undir the mod_assets I'm getting the wipe that this is not supported , can anyone confirm that ??

best regards.
Skuggasveinn.
Link to all my LoG 2 assets on Nexus.
Link to all my LoG 1 assets on Nexus.
User avatar
petri
Posts: 1917
Joined: Thu Mar 01, 2012 4:58 pm
Location: Finland

Re: Trouble with costum particles

Post by petri »

You're probably missing an import in init.lua.
User avatar
Skuggasveinn
Posts: 562
Joined: Wed Sep 26, 2012 5:28 pm

Re: Trouble with costum particles

Post by Skuggasveinn »

ahh yes :D
Everything is working now (makes perfect sense that since particles.lua was missing under the mod_assets its ofcourse not being imported be default in the init.lua)

thanks Petri for your continued amazing support for this community..
Link to all my LoG 2 assets on Nexus.
Link to all my LoG 1 assets on Nexus.
User avatar
petri
Posts: 1917
Joined: Thu Mar 01, 2012 4:58 pm
Location: Finland

Re: Trouble with costum particles

Post by petri »

You're welcome. Glad it works!
SpacialKatana
Posts: 163
Joined: Fri Sep 14, 2012 6:20 pm

Re: Trouble with costum particles

Post by SpacialKatana »

I've been having fun with particles too....unlike this unlucky SOaB in my dungeon :twisted:

Image
Post Reply