I'm hopeful that there's a good answer for this :)
I'm trying to make a beam weapon with the following characteristics:
- Charge Phase: lasts 1.5 seconds; accompanied by "charge" sound; effect is a flare on the appropriate weapon hardpoint, but no visible shot at target. - Firing Phase: starts after charge phase; lasts 4 seconds; standard weapon setup with sound, flare, visible beam, and damage
My initial thought was to create two seperate weapons, one for each phase. The difficulty I'm running into is preventing the main weapon from firing during the charge phase (wait 1.5 seconds). Here are the methods I can see to do this:
- Use a timer delay type command: no commands I tried seem to work to actually delay the main weapon - Use Biopulse weapon class (maindelay, chargedelay): this keeps the main weapon from firing during the charge, but it never actually ever fires at all. I'm not sure if I'm missing something here. Can this weapon class work without using multiple ships? How? - Play with alternating shotdelay: this does work, but not for the first shot (which has both the charge sound and firing sound playing at the same time). I would prefer this as my last resort :)
Edit: note that there are multiple weapons of different types on each ship, with multiple charge beams of varying strength. Any solution must work without affecting the ship's ability to fire any other weapons.
thanks in advance for the brainstorming! All these years and I'm still trying to do new things with Armada ;)
ya know i just got into work....and i just had a thought as soon as i sat down at my computer...it may take some working..but how about modifiying the texture of the phaser beam itself to get the effect you want??? i know this sounds crazy...but what if you make the phaser beam that has say six steps to the animation... i.e. a 1x6 phaser and black out the first step in the animation on the texture...so its still a 1x6 but only 5 are showing....im not sure how it will affect the rest of the animation...but you could modify the lifespan so that it has a shorter lifespan...so in a sense...the weapon would fire....the flare would show up first...and then the beam immediately after....not sure if you this will work...but it was just a thought i had as soon as i walked into work..mind you i sell verizon cell phones in PA lololol but i logged right into A2files and had to type this response...now im going to go eat LOLOLOL TTYL
Great thought! Thanks!
So, this is the direction I'm going now:
Weapon Flare This is 16 frame 512x512 TGA. I'm still trying to work out the animation kinks (I had an epiphany about them after I left for work this morning), but the idea is that the flare will start off small, then scale up gradually till the weapon fires (Charge up phase). After the weapon fires, the flare will scale down. Currently I'm doing this by actually scaling up/down the flare size within the TGA. I'm also customizing each keyframe, which has to be done for each beam weapon (as they all have different charge cycles). Is there an animation method I can use to control the scale via keyframes?
Beam Not actually messing with the TGA on this one. I'm actually going to combine the standard firing animation with a draw animation. The basic idea will be that the draw animation will control visibility to ensure the beam is invisible during the chargeup and chargedown phases. The only downside of this is that fighters (which are the only ships with shields) will look like they are being hit before the actual beam "fires". This shouldn't be too much of a problem, though, since if a fighter is being shot at by a beam (only on capital ships), it will most likely be shot at by a bunch of other weapons as well.
Sound I'm going to merge the chargeup, firing, and chargedown sounds into one sound.
The end result of these efforts should be a beam that charges up, fires, and then charges down in a believable way. Alot of work, but worth it if the effect looks right.
Ok, encountering some issues getting the animations to work right.
No matter how many tweaks I make to the animation, I cannot seem to get the beam animation to stay in one place (black) for 1.5 seconds, then be visible for 2.5 seconds, then go black for 1.2 seconds after that. The animation seems to animate at a set speed for phasers... no matter how much tweaking I do to the animation length, it goes just as fast (one animation cycle per second, or nearly so). This also seems to be an issue with beam weapon flares as well... no amount of tweaking seems to slow down the animation significantly.
I'm using a 512x512 TGA with 8 rows (64 pixels high each)
Here's an example... I thought the first number for the keyframes would define the length of that part of the animation (the 2nd and 3rd number seem to define the offset from the left center of the sprite the animation is applied to). I've made notes next to each section (bolded)... can someone help me get fixed here? :)
@animation AAAbeamANI offset [SIZE="1"](I think this drives the need for the offset numbers below, but not sure what else? Tried draw and color, but they didn't move from the first frame.)[/SIZE] 8 [SIZE="1"](This should be how many frames the animation uses)[/SIZE] 8.0 [SIZE="1"](This is supposedly the animation length [in seconds?]... is there an override on this value for certain weapons?)[/SIZE] step [SIZE="1"](I have no idea... choices are step or linear. Tried linear, but it didn't move from the first frame.)[/SIZE] @keyframes [SIZE="1"](Is this line necessary?)[/SIZE] 1.0 0 0 [SIZE="1"](1st #: Seconds; 2nd #: Width Offset; 3rd #: Height Offset?)[/SIZE] 2.0 0 32 3.0 0 64 4.0 0 96 5.0 0 128 6.0 0 160 7.0 0 192 8.0 0 224
I guess my root question is: [COLOR="Red"]how do I slow the phaser animation down to a level of my choosing?[/COLOR] Thanks in advance! :)
[COLOR="RoyalBlue"]EDIT: Totally forgot about "SpriteDuration" in the weapon ODF. Now that I can control the overall duration of the animation, I need to figure out how to finely control the individual elements to animate as long as I want them to and no longer :)[/COLOR]