Author Topic: SEXP for enemy targeting me  (Read 1754 times)

0 Members and 1 Guest are viewing this topic.

SEXP for enemy targeting me

Hey all,

I'm looking for a SEXP that returns a result when an enemy targets me during a battle.  I'm familiar with the "targeted" SEXP, but that only returns true if the PLAYER targets X, not the other way around.  Any advice? 

Thanks

killface

  

Offline Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
Re: SEXP for enemy targeting me
I'm afraid there's no such SEXP. I suggest to circumvent the problem and use either "set-object facing" combined with "distance" "<" "<value>" (and eventually "add-goal" "ai-chase" "<player>""<priority value>")when you want a given spacecraft to target the player. But that's more a "do" rather than a "when", meaning that you choose when this scripted targeting will occur.

You may also experiment this:

when-argument

(add all enemy spacecraft in the argument list)

<
    get-object-z
     <player>
     <none>
     <argument>
     <argument>
     <argument>

    <minimal targeting distance>


I hope that the relative z coordinates of the player taken from each enemy spacecraft would be useful in determining wheter or not it's targeting it.
The Lightblue Ribbon

Inferno: Nostos - Alliance
Series Resurrecta: {{FS Wiki Portal}} -  Gehenna's Gate - The Spirit of Ptah - Serendipity (WIP) - <REDACTED> (WIP)
FreeSpace Campaign Restoration Project
A tribute to FreeSpace in my book: Riflessioni dall'Infinito