Pop-Up Weapons

Got questions about Shipmaker? Get answers here. Please read the stickied topics first!

Moderators: th15, Moderators

Post Reply
Rahnzan
Lieutenant, Junior Grade
Lieutenant, Junior Grade
Posts: 13
Joined: Wed Dec 24, 2008 8:29 pm

Pop-Up Weapons

Post by Rahnzan »

I'm having difficulty with my weapons systems.

I have a Joint that rotates a Bay Door, and a Mount for the HVRocket that moves the rocket into firing position. I've set the rocket to fire in short 3 clip volleys. The Bay door is inert and simply parented to the Joint for movement while the HVRocket is parented to the Mount. The Joint and Mount are both parented to the ship hull.

Here is my current setup

1) Joint
T1: Weapon Acquired Target (HVRocket)
T2: Weapon Fire (HVRocket)
T1o: Rot. reach CCW border (Self)
T2o: Rot. reach CW border (Self)
Mode: Rotate (60 degrees counter clockwise from left side of craft)

2) Mount
T1: Rot. reach CCW border (Joint)
T2: Weapon fire (HVRocket)
T1o: Mov. reach target (Self)
T2o: Mov. reach origin (Self)
Mode: Move (10 pixels horizontally to outside of craft)

3) HVRocket
Shooting: Disabled
T1: Mov. reach target (Mount)
T2: Disabled
T1o: Mov. reach origin (Mount)
T2o: Disabled
Mode: Shooting

What happens is when the ship moves close enough for the HVRocket to acquire a target, the Joint rotates and opens the Bay Door, the Mount moves into position and the HV Rocket Fires. The Mount then retracts and the Joint then rotates to close the bay door. The problem is, it doesn't cycle so the HVRocket only fires once because the HVRocket only acquires a target once to begin the animation.

What I want to happen is when the weapon is ready to fire, the bay door opens and the mount moves the gun into position. The gun should then fire, the mount retracts, and the bay door closes while the gun reloads. When it's ready to fire the process starts all over again.

I feel like I'm overcomplicating this somehow..
What's this say? Ensign? ... OH GOD I'M A RED-SHIRT!
Squishy
Rear Admiral
Rear Admiral
Posts: 852
Joined: Mon Dec 03, 2007 4:32 am

Re: Pop-Up Weapons

Post by Squishy »

Acquire Target is bad for that kind of reusable trigger because the HV rocket can still acquire new victims while the animation is in transit to either open or closed state, causing desynchronization.

However, try having the 'Weapon Fired' start the bay door opening instead of Target Acquire. Then change the bay door to stay open for a X amount of time before automatically closing again.

X amount of time = HV rocket reload time + time to fire all rockets.

This way, the bay door will start closing after the rocket finishes firing the missiles.

What you lose is that dramatic 'initialization' effect as the missile coverings unveil to show the launcher underneath, but this setup is proven, self-correcting way to synchronize section movement and weapons fire.
Realism, seriously? It's a space ship game. Realism was thrown out the window a long time ago.
Rahnzan
Lieutenant, Junior Grade
Lieutenant, Junior Grade
Posts: 13
Joined: Wed Dec 24, 2008 8:29 pm

Re: Pop-Up Weapons

Post by Rahnzan »

Alright...no clue how I'm supposed to delay the bay door.
What's this say? Ensign? ... OH GOD I'M A RED-SHIRT!
User avatar
Arcalane
Pseudofeline Overlord
Posts: 4034
Joined: Thu Sep 13, 2007 10:37 am
Location: UK

Re: Pop-Up Weapons

Post by Arcalane »

Squishy wrote:*stuff*
You might still be able to get the initialization by using a dummy weapon that the HVR is linked to with a fire delay - once the dummy fires, the thing deploys, and the delay is long enough for the deploy animation to conclude. Then the missiles/rockets launch. Set the reload/range on the dummy appropriately, set the mag to 1, and then set the rest of the important specs on the HVR.

Then automatically fold back in once the HVR is spent and whilst the dummy reloads.
  /l、
゙(゚、 。 7
 l、゙ ~ヽ
 じしf_, )ノ
Rahnzan
Lieutenant, Junior Grade
Lieutenant, Junior Grade
Posts: 13
Joined: Wed Dec 24, 2008 8:29 pm

Re: Pop-Up Weapons

Post by Rahnzan »

I had initially intended for 2 of these weapons to fire simultaniously, so I would have to link them eventually.

I can't wrap my head around how to impliment what squishy said. Can I get a rundown of what I need to set? This is my first attempt with triggers ever and it took me all day just to do what I did.

Long hard road figuring all of this out...
What's this say? Ensign? ... OH GOD I'M A RED-SHIRT!
Squishy
Rear Admiral
Rear Admiral
Posts: 852
Joined: Mon Dec 03, 2007 4:32 am

Re: Pop-Up Weapons

Post by Squishy »

Here you go, an example of what I meant.


Things of interest that make this all work:

1. The triggers of the weapon

2. The triggers of the moving section, and the blue arrow connections to the weapon

3. The moving parameters of that same moving section.



Explanations probably aren't going to do any justice, but this hard example should help inspire you a little... maybe?
Attachments
MISSILES.sb4
(3.1 KiB) Downloaded 168 times
Realism, seriously? It's a space ship game. Realism was thrown out the window a long time ago.
Rahnzan
Lieutenant, Junior Grade
Lieutenant, Junior Grade
Posts: 13
Joined: Wed Dec 24, 2008 8:29 pm

Re: Pop-Up Weapons

Post by Rahnzan »

That doesn't really help me out but thanks.

Your missile continuously fires so there's no possibility of the bay door closing between reloads.

The bay doors need to open, the rocket needs to extend, and it's volley needs to be fired. The rocket then recedes, and the bay door closes while the rocket re-arms. This is what I'm trying to make happen. The fire rate is 3 frames, the reload time on the 3 round clip is 5 seconds (150 frames).

How do I make a dumby weapon that doesn't fire?
What's this say? Ensign? ... OH GOD I'M A RED-SHIRT!
vidboi
Tournamentator
Tournamentator
Posts: 669
Joined: Mon Mar 08, 2010 5:14 am
Location: UK

Re: Pop-Up Weapons

Post by vidboi »

ok, i'll give you a step by step run through of pretty much what's squishy's said ^^

thinking about it actually, it's pretty hard to do, because 'weapon fire' triggers don't work with fire disabled weapons, hmmm...

1. build the whole bay doors and mount setup first, get the movement and rotation to what you desire (make sure to set a delay time before the sections return to the original position), and then set both with the following triggers: on trigger 1: weapon fire, off trigger 1: movement/rotation reach origin (s)

2. place a HVR on the mount. set the range, arc range, firing arc, reload time (which should be slightly longer than the time it takes for the entire movement/rotation cycle), clip size and rate of fire to what you want the missile launcher to fire at (0 arc range would probably be best for this) and under the ED2 panel change the firing option box to 'disabled'. this is your parent weapon which will tell the others where and when to fire.

3. on top of the HVR place another weapon, like a machine gun (it has a small explosion sprite) and set the range to 1, damage to 0, clipsize and reload time to 1, and change the bullet sprite to a very dark colour (but not pitch black, that causes an error). with this weapon selected right click on the parent HVR and select 'link' weapon. the machine gun will now fire when the HVR does.

4. with the bay doors selected, right click on the machine gun (you may have to move it so you can click on it) and set it as on trigger 1. repeat this process with the weapon mount. when the parent HVR (and therefore the machine gun) fires it will now trigger the movement and rotation and move the launcher into position.

5. now place a second HVR on top of the parent HVR. set the stats of this to what you want the HVR to do normally, except for the clipsize and reload time, which should once again be set to one. then, on the ED2 tab, change the 'link delay' to the same time or slightly longer than it takes the HVR to move into position.

and there you have it, hope this helps =D
There is no OP, there is only more boosters...
Squishy
Rear Admiral
Rear Admiral
Posts: 852
Joined: Mon Dec 03, 2007 4:32 am

Re: Pop-Up Weapons

Post by Squishy »

Rahnzan wrote:That doesn't really help me out but thanks.

Your missile continuously fires so there's no possibility of the bay door closing between reloads.

The bay doors need to open, the rocket needs to extend, and it's volley needs to be fired. The rocket then recedes, and the bay door closes while the rocket re-arms. This is what I'm trying to make happen. The fire rate is 3 frames, the reload time on the 3 round clip is 5 seconds (150 frames).

How do I make a dumby weapon that doesn't fire?
Are you that rigid?

I intended for you to ADJUST the bay door open time and the weapon's reload time to match as needed. That's why I told you to look at the three fields for the weapon and the section. I'm sorry if I did not explicitly make it clear on that critical task that I expected you to do.

You did not actually provide specific numbers to work with so I put in some arbitrary times. It goes without saying that the missile cover trigger will not match the timing of whatever you had in mind.

Clearly, you didn't bother to play around with the example, or else you would have figured out that the timing of the bay door staying open will need to match the total time it takes for the weapon to finish firing. The doors on the example DO, IN FACT, recede when the missiles are done firing. Did you honestly expect a solution to land on your lap without needing any further work to get aligned with your goals?


Dumby weapon = Firing/Shooting set to disabled. But I doubt you'll get any use out of that alone.
Realism, seriously? It's a space ship game. Realism was thrown out the window a long time ago.
Post Reply