I’m testing out a concept for a beam weapon that constantly stays “on”, meaning it doesn’t have a visually detactable firing interval. In my attempts, I set it so that the beam duration is longer than the firing interval. No dice though, since there’s still gaps between firing. Oh well.
However, I found something really weird. If a target is inside minimum distance, it shouldn’t be fired upon, right? Here is a section of the salient code:
When testing the weapon out, though, I noticed something weird. Despite clearing the (extremely high) minimum distance, targets will still getting slammed by the beams. youtube.com/watch?v=TCL1K30Zce4
(Big thanks to Darkstar’s Uni-T for being my test dummies again)
I’m completely puzzled by this behavior. The ships are way inside the minimum distance, yet they’re still getting hammered.
And yes, I know the weapon is ridiculous. Just a proof of concept test for right now.
Your welcome, but they aren’t dummies, the AI is just not as evolved as i would like . . .
Had a look at the vid (thanks to my new phone :P) and i mas admit it was rather strange and has me intrigued. Therefore could you please try this:
Remove all engines and other weapons from the ship.
Feel free to load it out with more sheilds and armor (and maybe one or 2 more of these new PoC weapons) to increase survivability.
Deploy the ship in the Point Blank Survival Mission. <-[Most important]
Set the max and min range for the PoC weapon to 1500 and 1000 <-[see if the behaviour disapears]
Watch the results.
See when the ship stops firing at the drones which are on approach.
My current guess is that there is a minimum number between max_range & min_range for it to work properly.
I’ll give it a shot, but I don’t think it’ll do much. I’ll let you know in a bit.
Star, like I said before, behavior is similar, but not as pronounced. The beams still clearly take swings at your little demolition surprises even when they’re inside the minimum distance, but not nearly as many as in the video.
Max Range
yet it appears that one of them is getting a few more hits in.
This would mean that the Min/Max/Optimal range is not causing the problems with the new weapon
In other words its possible to have a beam with the following parameters
max_range = 1400
min_range = 1350
optimum_range = 1375
And not have it get extra hits in.
It also means that there is a problem somewhere else in your code.
Fix that and you fix the beam
Post the Entire code for this weapon,
Gives the members of the forum something more to work with and pinpoint the problem.
The beam would disengage when the target was terminated in theory, problem being that no matter how long the beam lasted you only get the initial damage hit…
We have two fundamental issues, long beam duration only dictates how long we see the pretty beam, no affect on damage/fire. Therefore you are left with only the damage from the initial blast, and tying up a turret for how ever long.
Short fire intervals with slightly longer beam durations (beam duration = 1100, fireinterval = 1000) the problem is the beam often times chooses another target, but does produce a near constant beam.
What you really are looking for I think is a continual damage effect from a beam weapon. IF on windows with the latest version you MAY be able to code a bullet weapon with a beam texture to achieve your desired effect? I hope that makes sense.
Abandoned the idea of using constant-damage beam–since it wouldn’t look like a constant damage beam–and went with the idea of rapid bullets instead.
It seems that the firing beyong minimum distance is gone now, but it’s hard to tell since a bullet can be fired just as the ship enters minimum range and it looks like the ship is being hit.
Well fear not, it wasn’t all for naught. I did discover a technique of coding weapons that will be vital to me very soon while experimenting on your problem.
I can’t explain this odd beam behavior but I MIGHT be able to assist you in your quest to find a beam that “stays on”
I have 2 such weapons that I’ve had some sucess with, The first is the Genesis Cutting Laser, it’s on a salvo function where the fire interval is equal to the beam duration. With a tracking speed of 1.4 the weapon APPEARS to “flicker” for just a moment when the fire interval kicks in as though.
The second weapon is one I’m developing for Union’s “R&D package” as I’m calling it right now. Essentially its a 1-damage beam with an extremely short beam duration and fire interval on something like a 60 shot salvo. It’s fast enough that the beam appears continuous, except for the fact that it’s jumping all over the target randomly.
Just some info to think about. But as for your question about your beam acting unusual…I’ve got nothing.