Author Topic: Generating something in front of player.  (Read 4295 times)

0 Members and 1 Guest are viewing this topic.

Generating something in front of player.
Is it possible to create something, such as a warp affect, in front of the player a set distance,  regardless of his position? I'm creating a little mission and I want to generate a warp affect in front of the player regardless of where he is, just in front of him. I don't want it to follow his orientation around, just be generated in front of him at a certain moment. I'm looking at the get-object-x/y/z SEXP, but I'm not entirely sure how it works...any suggestions?

I suppose I could use the AI to control his ship and then generate something in front of the player using a static coordinates, but I was hoping for a dynamic coordinate that solely depended on the direction he is facing so that I could put the affect in front of his face.
« Last Edit: June 01, 2009, 06:31:15 pm by haloboy100 »
Fun while it lasted.

Then bitter.

 

Offline The E

  • He's Ebeneezer Goode
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Generating something in front of player.
I'm pretty certain you need to do some scripting for that. There are functions in there that allow you to draw models.
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

 
Re: Generating something in front of player.
I'm aware of that, but I can't seem to find a way to draw a model in front of the player ship regardless of his orientation or position.

For example, an argument that returns the coordinates of a position X amount of meters away from and in front of the player's ship.
Fun while it lasted.

Then bitter.

 

Offline The E

  • He's Ebeneezer Goode
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Generating something in front of player.
I don't know this for sure, but I believe this would be something like
-Get the player's ship position
-Get the player's current orientation (This would be expressed as a vector, I believe)
-Generate the coordinates where you would draw the effect by taking the players' coordinates, adding the vector and a distance.
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

 
Re: Generating something in front of player.
How would you get the orientation? Realize that my knowledge i confined strictly to FRED, as I know nothing about table hacking or anything like that.
Fun while it lasted.

Then bitter.

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Generating something in front of player.
Right now I don't think it's possible.  I believe there is a mantis report open on the problem.  Basically there are optional arguments that should allow you to do it but they don't return the correct values. 

I have thought of one way to do it but it would involve editing both the .pof and the table for the ship.  Basically put a special point in front of the model, make it an untargetable subsystem, and then use get object position x y and z of the dummy subsystem. 
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

 
Re: Generating something in front of player.
Hmm. That seems possible, though I'll stick with using A.I. control for now.

Thanks anyways. :)
Fun while it lasted.

Then bitter.

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Generating something in front of player.
Well if you are using AI control it doesn't even need to be a static point.  All you have to do is get the ship turned so it is aligned with the Z axis.  Then you can use the get-object x y and z and just add a value to z.  You can achieve this with a waypoint way off on the Z axis and doing a waypoint goal.   
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

 
Re: Generating something in front of player.
Well, if I'm using A.I. control, I may as well go all the way by directing the player to move to a static spawn anyway, right?

It would make a decent excuse as an autopilot.
Fun while it lasted.

Then bitter.

  

Offline Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
Re: Generating something in front of player.
What about a cutscene working in tandem with relative coordinates? :)
The Lightblue Ribbon

Inferno: Nostos - Alliance
Series Resurrecta: {{FS Wiki Portal}} -  Gehenna's Gate - The Spirit of Ptah - Serendipity (WIP) - <REDACTED> (WIP)
FreeSpace Campaign Restoration Project
A tribute to FreeSpace in my book: Riflessioni dall'Infinito

 
Re: Generating something in front of player.
Well I'm trying to make it work dynamically in real time, so that the player can trigger it via an event no matter where he is.
Fun while it lasted.

Then bitter.

 

Offline Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
Re: Generating something in front of player.
Yeah? What I said doesn't imply that you can't get the effect you want. :)
The Lightblue Ribbon

Inferno: Nostos - Alliance
Series Resurrecta: {{FS Wiki Portal}} -  Gehenna's Gate - The Spirit of Ptah - Serendipity (WIP) - <REDACTED> (WIP)
FreeSpace Campaign Restoration Project
A tribute to FreeSpace in my book: Riflessioni dall'Infinito

 
Re: Generating something in front of player.
Well, I could use what I want to do to make a cutscene, but it's not exactly what I'm looking for. ;)

Though, I'm not sure I know what you're talking about...you're saying using a cutscene to get what I want?
Fun while it lasted.

Then bitter.

 

Offline Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
Re: Generating something in front of player.
Yeah, a cutscene with camera settings that make use of relative positions.
The Lightblue Ribbon

Inferno: Nostos - Alliance
Series Resurrecta: {{FS Wiki Portal}} -  Gehenna's Gate - The Spirit of Ptah - Serendipity (WIP) - <REDACTED> (WIP)
FreeSpace Campaign Restoration Project
A tribute to FreeSpace in my book: Riflessioni dall'Infinito

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Generating something in front of player.
I doubt you can do the cutscene either.  The problem is relative coordinates don't work correctly.  See http://scp.indiegames.us/mantis/view.php?id=1923

If they did his effect would be simple. 
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 Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
Re: Generating something in front of player.
I remember them working fine the last time I checked...
The Lightblue Ribbon

Inferno: Nostos - Alliance
Series Resurrecta: {{FS Wiki Portal}} -  Gehenna's Gate - The Spirit of Ptah - Serendipity (WIP) - <REDACTED> (WIP)
FreeSpace Campaign Restoration Project
A tribute to FreeSpace in my book: Riflessioni dall'Infinito

 
Re: Generating something in front of player.
What are the get-object x/y/z SEXPs supposed to do anyway? I know they get the coordinates of an object in a certain axis, but what do the relative arguments do?
« Last Edit: June 02, 2009, 06:05:09 pm by haloboy100 »
Fun while it lasted.

Then bitter.

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Generating something in front of player.
Modify those coordinates, I believe?

I've used them to make torpedoes come flying in from off-screen during a cinematic. Create the torpedoes at relative coordinates to the target.

 
Re: Generating something in front of player.
so the arguments add or subtract to the coordinates the SEXP returns?
Fun while it lasted.

Then bitter.

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Generating something in front of player.
The problem is that while the relative values will be returned the functions do not take into account the direction the ship is facing so they are basically useless.  True relative position would align the Z axis with the direction the ship is facing. 
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