Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: diamondgeezer on February 28, 2004, 09:06:48 pm

Title: Speed SEXP
Post by: diamondgeezer on February 28, 2004, 09:06:48 pm
Yea, verily, we need a SEXP to check a ship's speed
Title: Speed SEXP
Post by: Goober5000 on February 28, 2004, 10:12:19 pm
er, cap-waypoint-speed, surely?
Title: Speed SEXP
Post by: Solatar on February 28, 2004, 10:13:29 pm
Think he means like:

ship-speed < or > a number

I thought this could be done?
Title: Speed SEXP
Post by: Goober5000 on February 28, 2004, 10:26:34 pm
Oh.  Yeah, there's a training sexp for that, but only for the player.

It shouldn't matter for other ships, though, because they always fly at their max speed unless capped by cap-waypoint-speed.
Title: Speed SEXP
Post by: Trivial Psychic on February 29, 2004, 01:22:34 am
What about if you want an event to be triggered when a certain capship has decelerated to a stop after exiting subspace.

When
-<
--ship-speed
---SD Lucifer (multiple entries possible)
--5
-do-nothing (or whatever)

I guess this should all be in the sexps listing in the FAQ sub-forum, but since I didn't start this thread, I have no problems about continuing it at this point.

Later!
Title: Speed SEXP
Post by: karajorma on February 29, 2004, 05:31:06 am
Simply make a test mission and time it :D
Title: Speed SEXP
Post by: diamondgeezer on February 29, 2004, 12:03:45 pm
Quote
Originally posted by Goober5000
Oh.  Yeah, there's a training sexp for that, but only for the player

There is? D'oh!
Title: Speed SEXP
Post by: diamondgeezer on February 29, 2004, 01:47:33 pm
Actually, that training SEXP isn't going to cut it. It lets me return a value for speed, sure, but I can't use it in conjunction with < or >. I basically want to tell the player if he's going to fast, see? So I need when > speed 50, for example. As it stands I cant' do that
Title: Speed SEXP
Post by: karajorma on February 29, 2004, 02:15:57 pm
I've had a quick look at the SEXP and the arguement it takes isn't a speed. It's a time.  The SEXP triggers once you spend an amount of time at the speed set by the Set-Training-Context-Speed SEXP

So if you use the Set-Training-Context-Speed SEXP, set the minimum speed to 51 and the maximum speed as high as it will go you should be able to make the speed SEXP trigger as soon as the player goes over 50m/s
Title: Speed SEXP
Post by: diamondgeezer on February 29, 2004, 06:04:07 pm
Works. Another karajorma triumph :D