Laser turrets firing actual lasers.

Place to get help with not working mods / modding interface.
Post Reply
The_Hunted_One
Burner Inserter
Burner Inserter
Posts: 13
Joined: Wed Nov 12, 2014 11:44 pm
Contact:

Laser turrets firing actual lasers.

Post by The_Hunted_One »

I'm just working on something small, modifying existing entities to suit my wants.

Basically, I want the laser turrets to fire a constant laser at their target, instead of the separated blasts that come in the base game.

I started with changing the sprite for the bullet from 7x14px to 14x100px, and upping the firing speed and initial speed of the projectile to make the laser appear instant to the target. I also lowered the damage for balancing, though I need to refine this.

Where my problem comes in, is the laser projectile sprite is created at the laser tower, with the center of the sprite starting at the center of the turret. Since I lengthened the laser sprite, it appears to come from behind the turret.

Is there a way to fix this?

*Edit: I will also be changing the sound played for the firing of the laser to a more constant laser beam sound, but that's just a matter of finding one. Increasing the firing speed caused the regular sound to be played over and over very quickly while the turret is firing

LordFedora
Filter Inserter
Filter Inserter
Posts: 310
Joined: Fri Nov 07, 2014 3:46 am
Contact:

Re: Laser turrets firing actual lasers.

Post by LordFedora »

Have you tried keeping the particle the same as current, but changing the attack period and damage, so it has a ton of particles that are short, and together they look like a continuous beam? (also RIP graphics card)

The_Hunted_One
Burner Inserter
Burner Inserter
Posts: 13
Joined: Wed Nov 12, 2014 11:44 pm
Contact:

Re: Laser turrets firing actual lasers.

Post by The_Hunted_One »

LordFedora wrote:Have you tried keeping the particle the same as current, but changing the attack period and damage, so it has a ton of particles that are short, and together they look like a continuous beam? (also RIP graphics card)
Just tried it, with the speed I want the initial laser to hit the target (near instant; like an actual laser) there are spaces between each projectile.

I have the current stats of the turret at:
cooldown = 0.000001
starting_speed = 5

I also increased the range for testing purposes


As a note, it appears the images are slightly cut off, must have happened in the upload somewhere. I put the imgur link below the image
Here is a view of the original modified files, close to what I want, except for the overextended lasers.
Image
http://i.imgur.com/l2jhAkM.jpg

This is a view of the original sprite with the same fire rate settings
Image
http://i.imgur.com/LCSG0jW.jpg

Post Reply

Return to “Modding help”