This line:
Code: Select all
spawn("fx",2,self.x,self.y,1,"effect")
I didn't know that.
Okay, next thing. Where can I get a list of effects that the game is capable of producing? I assume there are quite a few of them.
Code: Select all
spawn("fx",2,self.x,self.y,1,"effect")
You can place an "fx" object in the Dungeon Editor so you don't have to spawn it later.
Yes, I have downloaded the asset pack. I will start going through that part of it. Haven't gotten to it yet.Zo Kath Ra wrote: ↑Sun May 23, 2021 8:41 pmDownload the asset pack, if you haven't already.
assets/particles/
Code: Select all
defineParticleSystem{
name = "damage_screen",
emitters = {
{
spawnBurst = true,
emissionRate = 1,
emissionTime = 0,
maxParticles = 1,
boxMin = {0,0,1},
boxMax = {0,0,1},
sprayAngle = {0,30},
velocity = {0,0},
texture = "assets/textures/particles/damage_screen.tga",
lifetime = {0.4, 0.4},
colorAnimation = false,
color0 = {0.35, 0, 0},
opacity = 0.45,
fadeIn = 0.001,
fadeOut = 0.3,
size = {2.3, 2.3},
gravity = {0,0,0},
airResistance = 1,
rotationSpeed = 0,
blendMode = "Translucent",
objectSpace = true,
}
}
}
That is specific to the script you have that explicitly assigns the name 'effect' to every object it spawns—irrespective of any existing object that might already have that id; this causes a crash when it happens.
The link for this is in your quote, so that you could run the fx demo map that was shown.If you have a dungeon you can send me with the source code to test it here, I can then be certain beyond any doubt.
Thanks but if you check a few posts above, I figured out the problem. I had the wrong level.Isaac wrote: ↑Mon May 24, 2021 2:21 am There is a script in the asset pack named particle.lua you can use those named particle systems with the fx object; just by name—no need to re-define them. Example: "teleporter", "death_dust", "crystal"...
That is specific to the script you have that explicitly assigns the name 'effect' to every object it spawns—irrespective of any existing object that might already have that id; this causes a crash when it happens.
The link for this is in your quote, so that you could run the fx demo map that was shown.If you have a dungeon you can send me with the source code to test it here, I can then be certain beyond any doubt.![]()
https://www.dropbox.com/s/dp5yb052gotnq95/fx.zip?dl=1
It does actually. If you use self.level, the spawn occurs on the level of the script_entity—if self is not defined as an argument.wagtunes wrote: ↑Sun May 23, 2021 8:18 pm This line:
That "2" is the level number. I thought by using "self" if would figure the exact position on its own. But it only does for the square location and not for the level of the dungeon.Code: Select all
spawn("fx",2,self.x,self.y,1,"effect")