Hard Light Productions Forums

Hosted Projects - Standalone => The Babylon Project => Topic started by: Breezer on February 19, 2006, 07:31:55 am

Title: FRED2 SEXP Question
Post by: Breezer on February 19, 2006, 07:31:55 am
Greetings everyone,

May seem simple but I don´t find it. Is there an op that checks if ShipA fired upon ShipB? No damage done, no shield damage done, just the simple act of firing?

THX
Title: Re: FRED2 SEXP Question
Post by: Trivial Psychic on February 19, 2006, 08:12:11 am
Not that I'm aware of, however if its the player's ship that you need to know this for, there is a way to determine if the player has fired, by checking if the mapped fire key has been pressed.
Title: Re: FRED2 SEXP Question
Post by: karajorma on February 19, 2006, 09:07:13 am
That will only tell you if the player ship has fired. Not what he has fired at though. You can check if the player had the ship targetted and was facing it but sneaky players can get around that.

AFAIK there's no way of telling what damage ship B has suffered was caused by ship A either.
Title: Re: FRED2 SEXP Question
Post by: Breezer on February 19, 2006, 09:21:13 am
Thx for the answers, i´ll have to find away around then.
Title: Re: FRED2 SEXP Question
Post by: 0rph3u5 on February 19, 2006, 12:44:57 pm
I had a similar prob when trying to comfirm kamikaze hits... if you want to confirm that ship A has fired on B get yourself the range of the weapons which shall be fired and make a sexp which goes like this:

Code: [Select]
$Formula: ( when
   ( and-in-sequence
      ( < (distance "Ship A" "Ship B"  )
        5000
      ( < ( hits-left "Ship B" ) 99 )
   )
   ( send-message
      "Ship B"
      "High"
      "Hit B"
   )
)
+Name: hit B
+Repeat Count: 1
+Interval: 1
+Team: 0

 basicly this just checks if A is in range to fire on B and if that is true first it will check if B's hull has been damaged (and-in-sequence take care of that)... but this only works if damage is done...
if you've got to confirm beam hits on B I would script all beam use of A for that time of the mission...

ps. I took that from one of my missions and modified it - this is editor output...
Title: Re: FRED2 SEXP Question
Post by: karajorma on February 19, 2006, 05:49:32 pm
Problem with that is that you have no actual way of being certain that Ship has actually fired on Ship A unless you're dealing with a scripted battle between two ships.

If one of those ships was Alpha 1 all bets would be off.