Paulquappe Posted April 1, 2020 Share Posted April 1, 2020 Hi, I'm implementing explosive mines, though I need custom explosions for that. Is there any kind of API for that? Like, with options for position, size, damage, damage type, shockwaves, etc.. I couldn't find anything like that. I also looked for ways to spawn torpedoes as a workaround, though the only thing I found is this post. Unfortunately, it only adds torpedoes to the ship but does not spawn them (or detonate them). At last I tried to implement explosions manually. Server: local explosiveMine = Entity() local explosionSphere = Sphere(explosiveMine.position.translation, explosionRadius) nearby = {sector:getEntitiesByLocation(explosionSphere)} for i, entity in pairs(nearby) do -- do damage calculation here end Client: Sector():createExplosion(position, radius, false) However, I can only guess how the damage calculation is done (with undocumented API-calls such as "Balancing_GetSectorWeaponDPS") and there is a lack of fancy effects like shockwaves and screenshake. Does anyone know more about that? Thanks in advance. Link to comment Share on other sites More sharing options...
FuryoftheStars Posted April 1, 2020 Share Posted April 1, 2020 I know in weapongenerator.lua, there is a property for assigning explosion radius. But I’m not sure if this would work for you? Link to comment Share on other sites More sharing options...
Paulquappe Posted April 1, 2020 Author Share Posted April 1, 2020 No, I don't think so. The weapongenerator.lua seems to generate the weapons as items, whereas I need a one-time explosion at the entity's position, Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now