Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: diamondgeezer on February 28, 2004, 09:41:23 pm

Title: 'Facing' SEXP
Post by: diamondgeezer on February 28, 2004, 09:41:23 pm
Er... does the 'facing' SEXP actually work? I'm using it in conjunction with an is-event-true-delay SEXP via an AND operator. I've defined the forward view cone as 60, but it just flat doesn't want to work. Can anyone confirm whether it works or not please?

I'm using one of the end of January FRED and FSO builds, BTW :nod:
Title: 'Facing' SEXP
Post by: Goober5000 on February 28, 2004, 10:21:57 pm
Works for me in the training missions.  Here's how they did it there:
Code: [Select]
+Chained: 7

$Formula: ( when
   ( not ( facing "Instructor" 0 ) )
   ( training-msg "Face Instructor" )
   ( flash-hud-gauge "CENTER_RETICLE" )
   ( flash-hud-gauge
      "WEAPON_LINKING_GAUGE"
   )
   ( flash-hud-gauge "THREAT_GAUGE" )
   ( flash-hud-gauge "THROTTLE_GAUGE" )
)
+Name: Face Instuctor
+Repeat Count: 1
+Interval: 1
+Chained: 12

$Formula: ( when
   ( facing "Instructor" 10 )
   ( training-msg "Good" "Good" 0 10 )
   ( add-goal
      "Instructor"
      ( ai-waypoints-once
         "Waypoint path 3"
         89
      )
   )
)
+Name: Facing Instructor 2
+Repeat Count: 1
+Interval: 1
+Chained: 6
+Objective:  XSTR("Face Instructor", 2131)
Title: 'Facing' SEXP
Post by: diamondgeezer on February 28, 2004, 11:39:38 pm
OK, now things are getting weird. I made a test mission with a single Loki and a single event which fired when I faced the Loki (with a cone of 10). It worked, no problem.

Then  I returned to the problematic mission.  I make an event which fires when I face the offending ship, with no other operators or anything else. I set this as a directive. When I enter the mission and the directives pop up on the left, the event is red - it just fails automatically. WTF is going on with that?
Title: 'Facing' SEXP
Post by: Lightspeed on February 29, 2004, 04:08:23 am
it checks at "0" seconds mission time. You'll prolly not be facing your target at that time so it becomes invalid.
Title: 'Facing' SEXP
Post by: diamondgeezer on February 29, 2004, 11:59:06 am
And yet when I ran my test mission and turned to face the Loki, the event fired. No muss, no fuss. This is why I'm confused.
Title: 'Facing' SEXP
Post by: karajorma on February 29, 2004, 12:14:40 pm
Quote
Originally posted by diamondgeezer
Then  I returned to the problematic mission.  I make an event which fires when I face the offending ship, with no other operators or anything else. I set this as a directive. When I enter the mission and the directives pop up on the left, the event is red - it just fails automatically. WTF is going on with that?


Is the ship present at the start of the mission? It could be failing if the ship isn't there to turn and face.
Title: 'Facing' SEXP
Post by: diamondgeezer on February 29, 2004, 12:26:06 pm
Ahhh.... good point. It's not. I'll imperiment a bit.
Title: 'Facing' SEXP
Post by: karajorma on February 29, 2004, 12:27:50 pm
Let us know. I used to do this sort of experimentation all the time :) Kinda miss it now. I need to FRED more often :)
Title: 'Facing' SEXP
Post by: diamondgeezer on February 29, 2004, 12:51:10 pm
Bingo. Fix0red.

Nice one Kara. FRED's ghey, mind.
Title: 'Facing' SEXP
Post by: magatsu1 on February 29, 2004, 01:34:10 pm
No bad tools, only bad workmen.

*runs*
Title: 'Facing' SEXP
Post by: diamondgeezer on February 29, 2004, 01:48:24 pm
*chases*
Title: 'Facing' SEXP
Post by: aldo_14 on February 29, 2004, 02:48:43 pm
*aims and fires*
Title: 'Facing' SEXP
Post by: HotSnoJ on February 29, 2004, 02:51:01 pm
*watches the pretty explosions*
Title: 'Facing' SEXP
Post by: diamondgeezer on February 29, 2004, 05:33:32 pm
*hits alt-J*

*jumps out*
Title: 'Facing' SEXP
Post by: Lightspeed on February 29, 2004, 05:47:00 pm
if
+is facing
 -diamondgeezer
 -thread
+then
 -self-destruct
 -HLP

:)
Title: 'Facing' SEXP
Post by: diamondgeezer on February 29, 2004, 06:12:55 pm
I went through a short phase on the VBB of posting entirely in SEXPs. Soon got bored of it :nod:
Title: 'Facing' SEXP
Post by: Goober5000 on February 29, 2004, 07:19:36 pm
You also went through a short phase of posting little custom signatures after every post.  What happened to that?
Title: 'Facing' SEXP
Post by: diamondgeezer on February 29, 2004, 08:26:40 pm
Made rapid-fire arguments with Stryke a bit of a bastard, so I stopped bothering. They were supposed to be 'DG facts' so you could impress your friends with your knowledge of DG trivia. I was impressed I kept the habit up as long as I did :D