[Help] Projectile With Beam Effects

Everything about mods can be found here.

Moderator: Morax

[Help] Projectile With Beam Effects

Postby Killzone » 22 Jul 2018, 11:15

Not sure how active these forums are these days, but I've hit a wall and cannot figure it out.

First, a quick description of what I'm trying to do. I want a cannon that utilizes both mass and energy as fuel and fires incredibly fast line of sight projectiles leaving a streak of light in its wake. Think, a giant railgun firing superheated slugs at a fraction of the speed of light. A secondary effect that would be nice, but not exactly necessary, would be bypassing shields. I can live without this, but I do feel that it would just...be logical. For those interested the inspiration came from the MAC cannons from the Halo universe

Now, the problem. As far as I can tell, the game doesn't actually allow projectiles to move that fast, and I achieved a half decent effect by using a beam instead. The problem with that, though, is that there is no way (that I know) for beams to drain mass. The only way I know to achieve the effect would be to create a silo and use nukes/tactical missiles, yet this does not give the visual effect I want or the impact of instantaneous destruction I am going for. .

Things I've tried:

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. You can either fire a nuke or a beam, not both. Unless I've missed something.

Next, I tried taking a regular projectile (in this case the T1 Torpedo Launcher's TANAgularTorpedo02) and giving it a buildcost. Again, no dice. The torpedo just fires like normal.

The only other way I can think it might work is by creating a custom nuke that teleports to the target, while simultaneously creating an effect similar to a beam. However, I have NO idea about how to do any of that.

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.
Killzone
 
Posts: 7
Joined: 10 Apr 2017, 10:48
Has liked: 0 time
Been liked: 0 time
FAF User Name: Killzone

Re: [Help] Projectile With Beam Effects

Postby Franck83 » 22 Jul 2018, 14:44

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.

Image

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: Select all
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.
Alliance of Heroes Mod is out ! Try it ! It's in the Mod Vault !
User avatar
Franck83
Evaluator
 
Posts: 538
Joined: 30 Dec 2016, 11:59
Location: France
Has liked: 114 times
Been liked: 122 times
FAF User Name: Franck83

Re: [Help] Projectile With Beam Effects

Postby Uveso » 22 Jul 2018, 22:16

Killzone wrote:Not sure how active these forums are these days


Well we have actual great MOD makers like Franck83 :)
Check out his newest mod "Alliance of Heroes Mod":
http://forums.faforever.com/viewtopic.php?f=41&t=14919

I have also a list with mods i updated, like Total Mayhem or Experimental Wars:
http://forums.faforever.com/viewtopic.php?f=41&t=12416

And we are also actual developing new AI's for the game:
http://forums.faforever.com/viewtopic.php?f=88&t=16381

So yes, the forum is quite active :)
User avatar
Uveso
Supreme Commander
 
Posts: 1788
Joined: 11 Dec 2015, 20:56
Location: Germany
Has liked: 70 times
Been liked: 291 times
FAF User Name: Uveso


Return to Mods & Tools

Who is online

Users browsing this forum: No registered users and 1 guest