Author Topic: Changing secondary loadouts  (Read 2525 times)

0 Members and 1 Guest are viewing this topic.

Offline wistler

  • 28
Changing secondary loadouts
Hi,
Is there any way of locking a missile bank on the players ship until a set time when it can be unlocked, used, and then relocked when its empty.

I'm trying out an idea I had about rewarding the player certain missiles during the game, but I can only get it to work by changing the load out of a missile bank already in use. It's a bit more clumsy then the idea I had in mind, which was a missile bank that was offlimits to the player until he achieved a particular goal.

Basically I'm asking there's a lock / unlock secondary banks command in FRED that affects specific banks rather then all missiles.

 

Offline headdie

  • i don't use punctuation lol
  • 212
  • Lawful Neutral with a Chaotic outook
    • Skype
    • Twitter
    • Headdie on Deviant Art
Re: Changing secondary loadouts
probably not, might make a nice request.  In the mean time secondary ammo looks to be your best bet.
Minister of Interstellar Affairs Sol Union - Retired
quote General Battuta - "FRED is canon!"
Contact me at [email protected]
My Release Thread, Old Release Thread, Celestial Objects Thread, My rubbish attempts at art

  

Offline Legate Damar

  • Keeping up with the Cardassians
  • 29
  • Hail Cardassia!
Re: Changing secondary loadouts
You could make two versions of a ship, one with the extra bank and one without, and then switch the ship in mid-mission

 

Offline Aginor

  • Spelljammer
  • 210
Re: Changing secondary loadouts
That could work. But you would have to have a lot of ships in your table if you start combining.
Member of the Scooby Doo model Fanclub "verticies and splines are the medium and he is the artist."

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: Changing secondary loadouts
When
   is-secondary-selected
    Playership
    Bank to lock (#)
  lock-secondary-weapon

with a high trigger count.

To unlock do the same event but with the other bank and use unlock-secondary-weapon... or just use an if-then-else argument to do it all in one event.

You can put further checks in place to find out which bank has the weapon to lock if you need to.
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 

Offline bigchunk1

  • bigchunk1 = Awesome²
  • 29
  • ...and by awesome I mean Jerk!
Re: Changing secondary loadouts
Have you tried  the set-secondary-ammo sexp under subsystems and cargo? You could set the player's ammunition to 0 when you don't want them using the weapon and give him/her back the weapon's ammuition (saved as a variable using get-secondary-ammo) when you want to.
BP Multi
The Antagonist
Zacam: Uh. No, using an effect is okay. But you are literally using the TECHROOM ani as the weapon effect.

 

Offline wistler

  • 28
Re: Changing secondary loadouts
I'll give that a try next chance I get, thanks.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Changing secondary loadouts
Personally, I'd create a weapon called "Locked" and make that the weapon the player has when you don't want them using their missiles.

I think that's a much more elegant solution than simply changing the number of missiles available.  Although there may be some flaw in that plan I've failed to consider.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline wistler

  • 28
Re: Changing secondary loadouts
As a work around, is there a way to check what missile is in a bay before i change it, and then have the bay change back to that original missile.

Seems a bit more practical then making the player loose an entire bay for a mission, and it would also allow the player to pick their load-out.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Changing secondary loadouts
When-argument
-any-of
--list of missiles allowed in the mission
-has-secondary-weapon
--ship-name
--Weapon Bank
--<argument>
-modify-variable
--Locked-Missile[None]
--<argument>

Should do it. You can later use that string variable to add the missile back.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline wistler

  • 28
Re: Changing secondary loadouts
That's worked great, thanks Kara.  :yes: