Author Topic: FRED2 SEXP Question  (Read 2008 times)

0 Members and 1 Guest are viewing this topic.

Offline Breezer

  • 22
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

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
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.
The Trivial Psychic Strikes Again!

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
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.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Breezer

  • 22
Thx for the answers, i´ll have to find away around then.

 

Offline 0rph3u5

  • 211
  • Oceans rise. Empires fall.
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...
« Last Edit: February 19, 2006, 12:49:32 pm by 0rph3u5 »
"As you sought to steal a kingdom for yourself, so must you do again, a thousand times over. For a theft, a true theft, must be practiced to be earned." - The terms of Nyrissa's curse, Pathfinder: Kingmaker

==================

"I am Curiosity, and I've always wondered what would become of you, here at the end of the world." - The Guide/The Curious Other, Othercide

"When you work with water, you have to know and respect it. When you labour to subdue it, you have to understand that one day it may rise up and turn all your labours into nothing. For what is water, which seeks to make all things level, which has no taste or colour of its own, but a liquid form of Nothing?" - Graham Swift, Waterland

"...because they are not Dragons."

  

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
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.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]