Author Topic: Making the player face a ship  (Read 4010 times)

0 Members and 1 Guest are viewing this topic.

Offline CommanderDJ

  • Software engineer
  • 210
Making the player face a ship
Hello all,
I once again ask for your assistance in a FREDding matter. At one point in a mission, I want the player to turn to face a specific ship in the area (rather quickly, think of turning your head to look at a flicker of movement in the corner of your vision). The player would obviously need to be under AI control at that point, but I'm rather confuzzled as to how to bring that about. Any help greatly appreciated.

CommanderDJ
[16:57] <CommanderDJ> What prompted the decision to split WiH into acts?
[16:58] <battuta> it was long, we wanted to release something
[16:58] <battuta> it felt good to have a target to hit
[17:00] <RangerKarl> not sure if talking about strike mission, or jerking off
[17:00] <CommanderDJ> WUT
[17:00] <CommanderDJ> hahahahaha
[17:00] <battuta> hahahaha
[17:00] <RangerKarl> same thing really, if you think about it

 

Offline The E

  • He's Ebeneezer Goode
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Making the player face a ship
Use set-object-facing-object for great success.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline Dilmah G

  • Failed juggling
  • 211
  • Do try it.
Re: Making the player face a ship
There's also a player use ai sexp lying around for your ai player control needs.

 

Offline CommanderDJ

  • Software engineer
  • 210
Re: Making the player face a ship
Use set-object-facing-object for great success.

But wouldn't that make the player instantly face the ship? Me wantz turning motion.
[16:57] <CommanderDJ> What prompted the decision to split WiH into acts?
[16:58] <battuta> it was long, we wanted to release something
[16:58] <battuta> it felt good to have a target to hit
[17:00] <RangerKarl> not sure if talking about strike mission, or jerking off
[17:00] <CommanderDJ> WUT
[17:00] <CommanderDJ> hahahahaha
[17:00] <battuta> hahahaha
[17:00] <RangerKarl> same thing really, if you think about it

 

Offline The E

  • He's Ebeneezer Goode
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Making the player face a ship
Please take a closer look at the sexp.
Code: [Select]
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 in milliseconds (optional)
4: Bank (optional)

I wonder what those optional arguments do....
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline Dilmah G

  • Failed juggling
  • 211
  • Do try it.
Re: Making the player face a ship
Don't worry, I've done the same thing before. (assumed a sexp does what it sounds like it does without reading the box in FRED and having an epiphany).

 

Offline CommanderDJ

  • Software engineer
  • 210
Re: Making the player face a ship
Please take a closer look at the sexp.
Code: [Select]
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 in milliseconds (optional)
4: Bank (optional)

I wonder what those optional arguments do....

CommanderDJ feels pwnage and wrath of The E. My n00bness has been revealed once again.

What's the bank thing do? Does it make much difference?

Don't worry, I've done the same thing before. (assumed a sexp does what it sounds like it does without reading the box in FRED and having an epiphany).

Yeah. That's exactly what I did.
[16:57] <CommanderDJ> What prompted the decision to split WiH into acts?
[16:58] <battuta> it was long, we wanted to release something
[16:58] <battuta> it felt good to have a target to hit
[17:00] <RangerKarl> not sure if talking about strike mission, or jerking off
[17:00] <CommanderDJ> WUT
[17:00] <CommanderDJ> hahahahaha
[17:00] <battuta> hahahaha
[17:00] <RangerKarl> same thing really, if you think about it

 

Offline Dilmah G

  • Failed juggling
  • 211
  • Do try it.
Re: Making the player face a ship
I assume the bank thing will bank the player ship as the turn executes, to perhaps emulate turning in atmospheric conditions. I dunno, best way to learn is to try it yourself! :)

 

Offline ReeNoiP

  • 27
  • I FRED
Re: Making the player face a ship
IIRC bank is a toggle. Either the ship is allowed to bank as much as it wants, or not at all.
Uncharted Territory is released. But I still need voice actors

 

Offline CommanderDJ

  • Software engineer
  • 210
Re: Making the player face a ship
Hey guys,
I'm having problems with this. I've got

Code: [Select]
set-object-facing
      Alpha 1
      get-object-x
             ship-here
      get-object-y
             ship-here
      get-object-z
             ship-here
      1000

But all that happens is the player ship does a tiny turn in the general direction of the ship, which never comes into view at all. What am I doing wrong?
[16:57] <CommanderDJ> What prompted the decision to split WiH into acts?
[16:58] <battuta> it was long, we wanted to release something
[16:58] <battuta> it felt good to have a target to hit
[17:00] <RangerKarl> not sure if talking about strike mission, or jerking off
[17:00] <CommanderDJ> WUT
[17:00] <CommanderDJ> hahahahaha
[17:00] <battuta> hahahaha
[17:00] <RangerKarl> same thing really, if you think about it

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Making the player face a ship
Been awhile since I tried it but I believe you have to make it a repeating event until it's facing the ship. 
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 

Offline Colonol Dekker

  • HLP is my mistress
  • 213
  • Aken Tigh Dekker- you've probably heard me
    • My old squad sub-domain
Re: Making the player face a ship
Open a mission from a campaign that features it and peek at how it's done ;D
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 CommanderDJ

  • Software engineer
  • 210
Re: Making the player face a ship
Been awhile since I tried it but I believe you have to make it a repeating event until it's facing the ship. 

What do you mean by a repeating event? As you can tell, I'm a FREDding n00b.

Open a mission from a campaign that features it and peek at how it's done ;D

1. I can't think of any campaigns off the top of my head that do that that I have accessible.
2. If I wanted to do that, I wouldn't have asked for help here.
[16:57] <CommanderDJ> What prompted the decision to split WiH into acts?
[16:58] <battuta> it was long, we wanted to release something
[16:58] <battuta> it felt good to have a target to hit
[17:00] <RangerKarl> not sure if talking about strike mission, or jerking off
[17:00] <CommanderDJ> WUT
[17:00] <CommanderDJ> hahahahaha
[17:00] <battuta> hahahaha
[17:00] <RangerKarl> same thing really, if you think about it

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Making the player face a ship
Been awhile since I tried it but I believe you have to make it a repeating event until it's facing the ship. 

What do you mean by a repeating event? As you can tell, I'm a FREDding n00b.

Increase the event's trigger or repeat counts (repeat is apropos here I believe) in the boxes to the right of the events list.