Think, a giant railgun firing superheated slugs at a fraction of the speed of light.
You can define projectile speed on bp.
A secondary effect that would be nice, but not exactly necessary, would be bypassing shields.
Should be possible to desactive collision on shield (take a look at shield.lua or unit.lua). I already did it on unit on my mod for passive dodge.
is that there is no way (that I know) for beams to drain mass.
You can do it.
Here i drain weapon capacitor (stamina) from my cold beam when the beam fire. You can drain mass, energy or any kind of other data.
I've tried firing a nuke/tactical and firing a beam at the same time, using the nuke as a dummy whose only real purpose is to drain mass. This.... just doesn't work.
Wrong method. You need to create a new weapon. Use an existent weapon that close your need, then add some properties on function. Take a look at creating method on the forum. You ll find ressources to do it. You need to edit the unit individual script and its bp. You can derive your weapon class from an existent one. Proceed step by step, from an existing work.
Unless I am wrong, the ONLY way to drain mass in the game is to build something, and you can't build beams and projectiles aren't fast (or flashy) enough.
You can do near everything on FA modding. You can drain mass on fire, you can drain mass on hiting units, on shield take fire... just take a look at unit events on unit.lua, shield.lua...
On your unit script, you can use my coldbeam code, you will need this to remplace GetProperty and IncProperty fonctions with theses
- Code:
local Aibrain = self.unit:GetAIBrain()
if Aibrain:GetEconomyStoredRatio('MASS') > 10 then
Aibrain:GetAIBrain():TakeResource('Mass', 10)
end
Don't forget the thread that enable or disable your weapon depending of your ressource amount.
Good coding, ask if you need help.Statistics: Posted by Franck83 — 22 Jul 2018, 14:44
]]>