Jump to content

Welcome to the Forum!

The best place to exchange builds and ideas! Vote for the best ideas and suggestions here.

Join the Avorion Discord!

Connect with other passionate players and talk about the latest news.
Discord

DLC Avorion Into the Rift Out Now!

Now available on Steam!
Steam

Explosion API


Paulquappe
 Share

Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...