Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: SF-Junky on January 25, 2020, 02:57:51 pm

Title: Turret-fired-since
Post by: SF-Junky on January 25, 2020, 02:57:51 pm
I have a mission in which the player is tasked with providing TAG support for an Orion's main beam guns. I might be able to produce a work-around solution with fire-beam and ship-tagged, but since such a thing might come in handy in other occasions, I'd like to ask if there is any way to show the player the time since the last time a specific turret has been fired.

Ideally, there'd be turret-fired-since SEXP, but I couldn't find one. Although I could swear I came across one some time in the past. Unfortunately, I have no experience in coding. Maybe this wouldn't even be too difficult to devise. I mean, there must be such a counter in the code somewhere already, right?
Title: Re: Turret-fired-since
Post by: Nightmare on January 25, 2020, 04:34:04 pm
AFAIK there's no SEXP like that. :(
Title: Re: Turret-fired-since
Post by: wookieejedi on January 25, 2020, 04:44:50 pm
I might be able to make lua sexp that does that... PM me on Discord if I forget.
Title: Re: Turret-fired-since
Post by: Colt on January 25, 2020, 04:48:26 pm
Vassago's Dirge has a mission where you TAG enemy ships for some Mjolnirs, with a box telling you their cooldown and when they're ready to fire again. If you can try opening the mission up in FRED and rummage through you may be able to replicate what you want, or something close at least.
I could make you a lua sexp that does that... PM me on Discord  :)
That's easier too. :lol:
Title: Re: Turret-fired-since
Post by: wookieejedi on January 25, 2020, 05:00:33 pm
EDIT: Ah I thought there was a lua call to that but alas not, and a workaround would be rather complex. Best to check what Vassago's Dirge does. Sorry about that!
Title: Re: Turret-fired-since
Post by: 0rph3u5 on January 25, 2020, 05:14:02 pm
Dont forget to add the "same turret cooldown" (or whats it called) to the turret weapon to disable fire wait scaling by difficulty
Title: Re: Turret-fired-since
Post by: General Battuta on January 25, 2020, 09:10:28 pm
I have a mission in which the player is tasked with providing TAG support for an Orion's main beam guns. I might be able to produce a work-around solution with fire-beam and ship-tagged, but since such a thing might come in handy in other occasions, I'd like to ask if there is any way to show the player the time since the last time a specific turret has been fired.

Ideally, there'd be turret-fired-since SEXP, but I couldn't find one. Although I could swear I came across one some time in the past. Unfortunately, I have no experience in coding. Maybe this wouldn't even be too difficult to devise. I mean, there must be such a counter in the code somewhere already, right?

This really shouldn't take anything new, as long as you're only firing the beam on command. Just use some variables.