Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: Crybertrance on February 03, 2012, 04:52:01 am

Title: FRED Capship in-mission warpout help
Post by: Crybertrance on February 03, 2012, 04:52:01 am
Hey guys, I have created an in-mission subspace jump for a player capship, following Axem's beautifully written tutorial. In the tutorial he uses a "ship-lat-maneuver" SEXP to move the ship while its playing dead. However, this SEXP only relies on the tabled movement speed of the ship in particular. This effect while for a fighter is cool, its not so good for a capship (who likes to see a caphip warpout at 40 m/s?) Is there a way to use the the ships tables warpout speed instead?

Also, on another note, is the "ship-rot-maneuver" SEXP not working? I tried using it on a disabled ship, no joy tho (obviously i cleared all goals and used the play-dead SEXP)
Title: Re: FRED Capship in-mission warpout help
Post by: MatthTheGeek on February 03, 2012, 05:56:47 am
Also, on another note, is the "ship-rot-maneuver" SEXP not working? I tried using it on a disabled ship, no joy tho (obviously i cleared all goals and used the play-dead SEXP)
It may sound obvious, but it sounds like it's related to the fact that a disabled ship can't move and hence cannot perform any sort of manoeuvre.
Title: Re: FRED Capship in-mission warpout help
Post by: Crybertrance on February 04, 2012, 03:46:13 am
Hey guys, I have created an in-mission subspace jump for a player capship, following Axem's beautifully written tutorial. In the tutorial he uses a "ship-lat-maneuver" SEXP to move the ship while its playing dead. However, this SEXP only relies on the tabled movement speed of the ship in particular. This effect while for a fighter is cool, its not so good for a capship (who likes to see a caphip warpout at 40 m/s?) Is there a way to use the the ships tables warpout speed instead?

Is it not possible?
Title: Re: FRED Capship in-mission warpout help
Post by: Lester on February 04, 2012, 06:17:53 am
You could use set-object-speed in an every-time where the speed is determined by a variable that gets 1 added to its value every time the event triggers. Set one of the conditions for the every time to
Code: [Select]
not
       =
       variable
       300
so the event stops triggering after your capship has accelerated to 300 (or whatever your desired speed is). You'd have to be sure the ship is aligned with one of the x, z, or y axes as this sexp only supports axis movement independent of the ship's actual orientation. It'd look weird if you had the ship going into subspace sideways.
Title: Re: FRED Capship in-mission warpout help
Post by: Dragon on February 04, 2012, 07:14:29 am
Actually, the SEXP should support both relative and absolute reference frames (IIRC), so set it to use the former and use the Z-axis.
Title: Re: FRED Capship in-mission warpout help
Post by: Crybertrance on February 04, 2012, 07:43:10 am
Actually, the SEXP should support both relative and absolute reference frames (IIRC), so set it to use the former and use the Z-axis.

In the same way you use the warp-effect SEXP to show a warphole in front of your ship?
Title: Re: FRED Capship in-mission warpout help
Post by: Crybertrance on February 05, 2012, 10:41:13 am
You could use set-object-speed in an every-time where the speed is determined by a variable that gets 1 added to its value every time the event triggers. Set one of the conditions for the every time to
Code: [Select]
not
       =
       variable
       300
so the event stops triggering after your capship has accelerated to 300 (or whatever your desired speed is). You'd have to be sure the ship is aligned with one of the x, z, or y axes as this sexp only supports axis movement independent of the ship's actual orientation. It'd look weird if you had the ship going into subspace sideways.

Could I get an example Event as I am very new to variables...  :p
Title: Re: FRED Capship in-mission warpout help
Post by: NeonShivan on February 05, 2012, 08:00:35 pm
Sorry but wouldn't this be posted under FRED discussion or am I wrong.
Title: Re: FRED Capship in-mission warpout help
Post by: Crybertrance on February 10, 2012, 12:55:16 am
Thanks Karajorma (for moving this thread to the FRED Discussion).

Is it that hard? :confused: Can someone please at-least provide a sample event? :blah:
Title: Re: FRED Capship in-mission warpout help
Post by: Lester on February 10, 2012, 09:06:50 am
Dragon was right, there indeed is a third optional operator that sets the speed based on the object's orientation. Here's a screenie of the
event:

(http://i598.photobucket.com/albums/tt70/lester456/sexpeee.jpg)
Title: Re: FRED Capship in-mission warpout help
Post by: Crybertrance on February 10, 2012, 11:09:09 am
Oooh! Thanks!
For some godforsaken reason when I set the 3rd Option of the set-object-speed-z (3: Whether the speed on the axis should be set according to the universe grid (when false) or according to the object's facing (when true); You almost always want to set this to true; (optional; defaults to false).) to tru...the event wont run... However if I set it to false (delete) the even works fine. wahts tah problehm!!
Title: Re: FRED Capship in-mission warpout help
Post by: Crybertrance on March 03, 2012, 12:20:04 pm
 :bump: :bump: :bump:

Sorry, but I'm still stuck....Can someone please help!
Title: Re: FRED Capship in-mission warpout help
Post by: General Battuta on March 03, 2012, 04:24:20 pm
I think I just ended up doing an end-mission honestly, and I'm not sure how to adapt this to a mid-mission jump.
Title: Re: FRED Capship in-mission warpout help
Post by: karajorma on March 03, 2012, 07:42:54 pm
I think you need to post a simplified version of the mission with just the capship warping out. Then we can see what you're doing wrong.
Title: Re: FRED Capship in-mission warpout help
Post by: General Battuta on March 03, 2012, 10:08:10 pm
I think you need to post a simplified version of the mission with just the capship warping out. Then we can see what you're doing wrong.

If I'm not mistaken/misrepresenting (I may be, just let me know) isn't the issue here that he needs to use ship-lat-maneuver for the mid-mission warpout (as per usual protocol for mid-mission jumps), but can't use that SEXP to push the ship up beyond its tabled maximum?

This is a problem I don't know of a workaround for.
Title: Re: FRED Capship in-mission warpout help
Post by: bigchunk1 on March 04, 2012, 12:12:44 am
Well if that's the case, would setting the speed just under the warpout threshhold and letting the ship accelerate the rest of the way work? Is there any way to tell what the warpout threshhold is?

If that does not work, you could trigger a change-ship-class sexp to set the ship to a custom pre-tabled version of the capital ship, only its has the acceleration/speed of a fighter. This type of ship, regardless of its size, should warpout how you would expect it to.
Title: Re: FRED Capship in-mission warpout help
Post by: mjn.mixael on March 04, 2012, 12:26:12 am
That would probably work.

Though, an override for ship maneuver sexps could be handy. (To override tabled top speeds)
Title: Re: FRED Capship in-mission warpout help
Post by: Crybertrance on March 04, 2012, 04:26:11 am
That would probably work.

Though, an override for ship maneuver sexps could be handy. (To override tabled top speeds)

That would be handy indeed, I tried setting the ship_lat_maneuver speed to 200%, but i didnt work...


If that does not work, you could trigger a change-ship-class sexp to set the ship to a custom pre-tabled version of the capital ship, only its has the acceleration/speed of a fighter. This type of ship, regardless of its size, should warpout how you would expect it to.

This might work. Ill have to try it when I finish my exams..
Title: Re: FRED Capship in-mission warpout help
Post by: General Battuta on March 04, 2012, 08:19:58 am
Change-ship-class is probably the best way to do this.