Author Topic: set-object-facing-object  (Read 1450 times)

0 Members and 1 Guest are viewing this topic.

Offline Black Wolf

  • Twisted Infinities
  • 212
  • Hey! You! Get off-a my cloud!
    • Visit the TI homepage!
set-object-facing-object
This could be the coolest sexp I've seen in awhilem if it really does what I think it does. In my current version of FRED, it defaults to two entries, a ship to set facing, and a ship to have it face. However, it lets you add turn time and bank time, which suggests to me that maybe we can finally give a ship a sexped order to turn around and face another ship, making forward facing guns a practical reality.  Only problem is... it's not working. :(

First I set the turn time low (in my example, it was 15, thinking it was seconds), and the ship spins around way, way too fast and ends up way overshooting. Second, now thinking it was in milliseconds, I set it high, 30000. As far as I could tell, in this instance, the ship did nothing at all, despite leaving time compression on at 64x till about 30 mins, whichm for a 90 degree turn, should have shown me something).

So then, baffled, I tried a midrange number of 150. The ship jerked towards the direction it was supposed to turn a little way, then stopped, well short of facing the other ship.

Net result, I'm confused. So, my questions are - can this sexp do what I want it to, What units are the "time" measurements in, and do I need to put a specific number in there for it to work properly (I thought maybe it had to be the amount of time the ship would take given its rotation time in its table or something), and do I need a bank entry if I have a time entry?
TWISTED INFINITIES · SECTORGAME· FRONTLINES
Rarely Updated P3D.
Burn the heretic who killed F2S! Burn him, burn him!!- GalEmp

 
Re: set-object-facing-object
AFAIK this uses the same code for the camera sexps, which when I tried them last, still don't work when turning on more than one axial plane.

 

Online Colonol Dekker

  • HLP is my mistress
  • 213
  • Aken Tigh Dekker- you've probably heard me
    • My old squad sub-domain
Re: set-object-facing-object
Anyway you can post the SEXP info here so i can have a quick look, (the little info window in the events editor) I managed to make a camera pan in a mission track a hecate, just through trial and error. That was a case of setting degrees of rotation though.
Campaigns I've added my distinctiveness to-
- Blue Planet: Battle Captains
-Battle of Neptune
-Between the Ashes 2
-Blue planet: Age of Aquarius
-FOTG?
-Inferno R1
-Ribos: The aftermath / -Retreat from Deneb
-Sol: A History
-TBP EACW teaser
-Earth Brakiri war
-TBP Fortune Hunters (I think?)
-TBP Relic
-Trancsend (Possibly?)
-Uncharted Territory
-Vassagos Dirge
-War Machine
(Others lost to the mists of time and no discernible audit trail)

Your friendly Orestes tactical controller.

Secret bomb God.
That one time I got permabanned and got to read who was being bitxhy about me :p....
GO GO DEKKER RANGERSSSS!!!!!!!!!!!!!!!!!
President of the Scooby Doo Model Appreciation Society
The only good Zod is a dead Zod
NEWGROUNDS COMEDY GOLD, UPDATED DAILY
http://badges.steamprofile.com/profile/default/steam/76561198011784807.png

 

Offline Black Wolf

  • Twisted Infinities
  • 212
  • Hey! You! Get off-a my cloud!
    • Visit the TI homepage!
Re: set-object-facing-object
What sexp info do you mean? It's in the latest (I think) vrsion of FRED, under change, coordinate manipulation.

set-object-facing-object
   Sets an object's orientation to face the specified object.  Takes 2 arguments...
   1: The name of an object.
   2: The object to face.
   3: Turn time (optional)
   4: Bank (optional)
TWISTED INFINITIES · SECTORGAME· FRONTLINES
Rarely Updated P3D.
Burn the heretic who killed F2S! Burn him, burn him!!- GalEmp

 
Re: set-object-facing-object
set-camera-facing-object
   Makes the camera face the given object  Takes 1 to 3 arguments...
   1:   Object to face
   2:   Total turn time
   3:   Time to spend accelerating/decelerating

and it never worked for me. It seemed to fall short or overshoot what the camera was meant to be looking at. WMC made a test case mission where it worked properly, but it only altered the heading, and not the pitch/roll(?) of the camera.

  

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Re: set-object-facing-object
Yeah, this was a sexp I couldn't get to work and eventually dropped.  It's a bit tricky because it's hooked into the ai code.

Try using it as the action operator for an every-time sexp (and specifying times in milliseconds).