Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: SF-Junky on January 21, 2020, 01:57:39 pm

Title: Different types of $AWACS
Post by: SF-Junky on January 21, 2020, 01:57:39 pm
Not sure whether I'm in the right board. Maybe this should rather go to the scripting boad?

From the wiki:
Quote
$AWACS:

    Sets this subsystem's effective AWACS range. (AWACS reveals stealthed ships, cuts through nebula fog.)
    Syntax: Float, the maximum range of the AWACS

Does the Float do anything? It must be bigger than 0 for the awacs to actually work.

I'd find it cool to have different types of awacs, like:
- Type 0: Can only detect non-stealth ships through nebula, stealth remains fully functional
- Type 1: Can detect ships through the nebula and make stealth ships appear als radar blip (custom, what it does now)
- Type 2: Can detect ships through the nebula and make stealth ships fully visible

If it was also possible to put more than one $AWACS option into a table entry (which currently seems impossible), this would give nice new options to FREDers.

Gimme your opinions. :)
Title: Re: Different types of $AWACS
Post by: Nightmare on January 21, 2020, 02:32:15 pm
In theory you can have that stuff now already; it should all be doable through SEXPs even though it's some work.
Title: Re: Different types of $AWACS
Post by: 0rph3u5 on January 21, 2020, 02:42:22 pm
In theory you can have that stuff now already; it should all be doable through SEXPs even though it's some work.

All of the relevant SEXP are used in this example:
https://wiki.hard-light.net/index.php/Sensor_degradation_with_range_or_facing
Title: Re: Different types of $AWACS
Post by: Nightmare on January 21, 2020, 02:49:17 pm
All of the relevant SEXP are used in this example:
https://wiki.hard-light.net/index.php/Sensor_degradation_with_range_or_facing

This is quite specific though; it works only from the players ship onto other ships. It wouldn't work if you're using a Charybdis or something similar.
Title: Re: Different types of $AWACS
Post by: 0rph3u5 on January 21, 2020, 04:09:10 pm
You can also do a thing like this:

Code: [Select]
$Formula: ( when-argument
   ( any-of
      "GTF Hercules 2"
      "GTF Loki 3"
      "GTF Pegasus 4"
   )
   ( and
      ( <
         ( distance
            "GTA Charybdis 1"
            "<argument>"
         )
         3000
      )
      ( <=
         ( is-ship-visible "<argument>" )
         1
      )
   )
   ( if-then-else
      ( not
         ( is-ship-class
            "GTF Pegasus"
            "<argument>"
         )
      )
      ( ship-tag "<argument>" 2 1000 )
      ( ship-tag "<argument>" 1 1000 )
   )
)
+Name: Event name
+Repeat Count: 10000
+Interval: 0

EDIT: needs a check if the <argument> is not tagged, forgot that