Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: SF-Junky on January 26, 2021, 01:11:16 pm

Title: Does secondary-fired-since work?
Post by: SF-Junky on January 26, 2021, 01:11:16 pm
This SEXP seems not to work. Can anyone confirm that or am I just a little dumb again?
Title: Re: Does secondary-fired-since work?
Post by: 0rph3u5 on January 26, 2021, 03:35:07 pm
Show us the event, please

Also the FSO version number you are using would be good information too
Title: Re: Does secondary-fired-since work?
Post by: SF-Junky on January 29, 2021, 02:28:31 pm
It seems that it depends on the delay you enter. It only works if you enter a non-zero number.

Code: [Select]

$Formula: ( when
   ( secondary-fired-since "Alpha 1" 1 1 )
   ( send-message
      "#Command"
      "High"
      "AHAHAHA"
   )
)
+Name: Event name
+Repeat Count: 1
+Interval: 1
+Event Log Flags: ( "true" "false" )

Using FSO 20.1.0-20201211
Title: Re: Does secondary-fired-since work?
Post by: mjn.mixael on January 29, 2021, 03:08:19 pm
Those sexps can be confusing, but yes that makes sense. If you don't set a number, you're asking "was secondary fired in the last 0 seconds"... which of course it wasn't.
Title: Re: Does secondary-fired-since work?
Post by: SF-Junky on January 30, 2021, 08:30:14 am
Those sexps can be confusing, but yes that makes sense. If you don't set a number, you're asking "was secondary fired in the last 0 seconds"... which of course it wasn't.
Ah okay. That's why it is secondary-fired-since and not secondary-fired-delay.
Title: Re: Does secondary-fired-since work?
Post by: karajorma on January 30, 2021, 10:35:55 am
Yep. Secondary-fired-delay would check if the secondaries were fired x seconds ago rather than in the last x seconds.