Hard Light Productions Forums
Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: Solatar on December 26, 2010, 09:47:50 pm
-
I see it's straightforward to check if a player has bank 1 or 2 selected. However, in a single mission I'm trying to make, there will be several ways to accomplish the objectives. If the player has armed himself with TAG missiles, I'd like to have a training message show up to tell him what ships will respond. If he doesn't have any armed, then I don't want the training message to appear. Is there any way to do this?
-
Like has-primary-weapon or has-secondary-weapon?
-
Yes. To my knowledge neither exists, right? :nervous:
-
Then your knowledge be lacking. :P
(http://fubar5.fubar.org/fubar/FS2/has-weapon.jpg)
-
Yep, that's the sexp to use. I've used it for something very similar to what Solatar wants to do (I was replicating the Mjonlir system that was in Vassago's Dirge, but only wanted the Mjonlirs to respond to tagged ships if the player had TAG-A or TAG-B missiles).
-
I've been using a FRED executable from August. Whoops. :nervous:
-
Which year? I coded that SEXP in over a year ago IIRC. :p
-
wait really? i remember spoon and i begging for it like a month ago.
-
Maybe I'm confusing it with one I coded then. Probably the ammo rather than weapon one.
-
Doesn't show up in a FRED build from August of this year, but it's plain-as-day-I'm-a-dumbass in a recent build. Seems to suggest it's kind of recent. And that I'm an idiot for not noticing. :P
EDIT: btw, works perfectly. It even fires if I have another weapon mounted and use debug codes to switch to the one referenced in the SEXP. At that point the message fires. :yes:
-
yes it is recent, kara only coded it up a little while back for mr. spoon