Hard Light Productions Forums
Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: vonhertell999 on May 18, 2011, 05:10:08 pm
-
ok, this is rather common use in many campaigns, including blue planet, derilict, and Terran vasudan war project. but how would i make the mission end by landing in the fighter bay of a Hecate destroyer?
-
Distance check between the player and the hangar bay subsystem as a conditional, end-mission sexp. Also an is-event-true-delay to mark the point in the mission when you want this to be available.
-
im sorry, these things really confuse me, could you please tell me exactly what sexps to use in what order? (im not good at this)
-
you need a logical sexp so "=" "<" or "<=" with the distance to ship-subsystem sexp in the first value and the triggering distance in the second.
then in the last part of the event you want the end mission sexp
-
:eek: i'll try it, but even with something as simple as ship arrival or play sound from file i still have to say it aloud lol
-
"<=" is in logical
"Distance-ship-subsystem" is in status -> distance and coordinates
"end-mission" is in change -> missions and campaign
[attachment deleted by ninja]
-
500 being the distance from the actual fighterbay subsystem correct?
-
id do this in a completely different way though, but it would involve some model tweaks and probably some scripting.
id use a series of invisible subsystems to establish a path. to land the player would have to fly through the subsystems in a specific order. based on data like position of the ships relative speed between them etc and create an ils screen on the hud. mission would end when you pass the last sub system. you could probably also simulate a touchdown in this kinda way, but that makes it somewhat difficult, since you would need to override the standard collision behavior if certain parameters were correct (relative speed, orientation, etc) and instead apply static force that keeps you from hitting the ship, and maybe bind you to the hull somehow (you could say that the ship uses magnetic wheels or that the carrier's artificial gravity and inertial dampeners has been turned on). having the mission end with a complete landing and taxi to hanger bay would be awesome.
-
im much too dumb to figure that out XD ask general battuta to try it
-
*snip*
use that, but a smaller number (say 50)
-
Hard Light wiki, entry on subsystems. Subsystem flags. "Allow landing". What does it do and how does it work
-
since you would need to override the standard collision behavior if certain parameters were correct (relative speed, orientation, etc) and instead apply static force that keeps you from hitting the ship, and maybe bind you to the hull somehow (you could say that the ship uses magnetic wheels or that the carrier's artificial gravity and inertial dampeners has been turned on). having the mission end with a complete landing and taxi to hanger bay would be awesome.
So, we actually have this somewhat.
http://www.hard-light.net/wiki/index.php/Ships.tbl#.24Collision_Physics:
Like everything else along these lines, it's still sort of a crude hack. The "binding to the hull" part can be roughly simulated with downthrust (assuming wheels are down), but it looks a bit bouncy and thus goofy.
By the way, the "allow landing" flag works in conjunction with this: the landing/reorient stuff from the link above only works when touching down on subsystems with "allow landing."
-
sounds interesting but it might be possible to improve it a great deal. of course id have to take a look at it in detail to make any assumptions as to how to make it bounce less. i bet its because the collision frame is not handled correctly. at collision your essentially using your momentum to slow you down. it could have been something like using the whole momentum instead of just the downward component of the momentum to calculate the response force, you could wind up with a larger response than necessary, hence the bouncing.
-
sounds interesting but it might be possible to improve it a great deal. of course id have to take a look at it in detail to make any assumptions as to how to make it bounce less. i bet its because the collision frame is not handled correctly. at collision your essentially using your momentum to slow you down. it could have been something like using the whole momentum instead of just the downward component of the momentum to calculate the response force, you could wind up with a larger response than necessary, hence the bouncing.
Well, for a while I did have the bounce so small it was unnoticeable. The problem was that it was possible to get into situations where you actually fall through the deck. I figured a bit of bouncing was the lesser evil and went with that.
By all means, please look at the code... there's plenty of room for improvement. :)