Heyo again, just got stuck with scripting as I want to make a blocked hallway with steam and therefore you will need to turn it off from a far away valve, is it possible to make the particle asset disabled through commands?
Thanks for your time =]
[HELP] how to enable/disable particles
Re: [HELP] how to enable/disable particles
Define object emiting particles e.g.:
define your steam particle (add parameters you want - this is just example":
to add steam use spawn(object, level, x, y, facing, [id]), to remove it use object:destroy().
[/color]
Code: Select all
defineObject{
name = "my_valve_emi",
class = "LightSource",
lightPosition = vec(1, 1, 1),
lightRange = 0.01,
lightColor = vec(0, 0, 0),
brightness = 0,
castShadow = false,
particleSystem = "my_steam",
placement = "wall",
editorIcon = 88,
}Code: Select all
defineParticleSystem{
name = "my_steam",
emitters = {
-- smoke
{
emissionRate = 5,
emissionTime = 0,
maxParticles = 50,
boxMin = {-0.03, 0.1, -0.03},
boxMax = { 6, 5, 5},
sprayAngle = {0,30},
velocity = {0.1,0.5},
texture = "assets/textures/particles/smoke_01.tga",
lifetime = {1,1.75},
color0 = {0.15, 0.15, 0.15},
opacity = 1,
fadeIn = 0.5,
fadeOut = 0.5,
size = {3, 5},
gravity = {0,0,0},
airResistance = 0.1,
rotationSpeed = 0.6,
blendMode = "Translucent",
}
}[/color]
I'm the Gate I'm the Key.
Dawn of Lore
Dawn of Lore
- hecktickxx
- Posts: 20
- Joined: Mon Apr 21, 2014 7:36 pm
Re: [HELP] how to enable/disable particles
Thanks a bunch I got it working fine >:D and managed to use he "destroy" command to make a invisible blocker as well.
Your the best
Your the best