Hard Light Productions Forums
Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: Wanderer on September 06, 2007, 02:43:54 am
-
Yeah.. i know.. the topic...
So... With me being a more of a table modders so one small question. Is is possible to make capships that have been killed to remain in game as floating or rather drifting ships? Mainly to create a visual effect of 'mission kill' instead of 'hard kill'. Something like shutting the engine flares, killing all turrets, killing ai, killing all glows, making the ship to continue on its present (as it was before the kill) course but to start slightly rotating like debris does, changing IFF, add random detonations along the hull (just graphical ones, no real damage needed)...
I know i can add detonations along the hull while it is drifting with Lua scripts but are the rest doable via fred or would i have to script the drifting effect too?
-
Drifting would probably need to be scripted (unless the set speed SEXPs can do it without it being jerky) but the rest should all be possible.
-
Isn't there a set-explosion SEXP you could sue to make explaosion along the hull?
Drifting is the only tricky part IMHO.
-
except for the drifing that has been successfully done before;
making the ship appear dead:
-------------------------------------
when
[what ever condition]
deactivate-glow-points
[Ship]
deactivate-glow-maps
[Ship]
turret-lock-all
[Ship]
sabotage-subsystem
[Ship]
[Ship's engine]
101
-------------------------------------
Isn't there a set-explosion SEXP you could sue to make explaosion along the hull?
-------------------------------------
when
[what ever condition]
explosion-effect
get-object-x => x-coords
[Ship]
[Ship's subsystem]
get-object-y => y-coords
[Ship]
[Ship's subsystem]
get-object-z => z-coords
[Ship]
[Ship's subsystem]
0 => damage; 0 'cause this is just show
0 => Blast force; 0 'cause this is just show
rand-multiple => Explosion size
50
100
10 => inner damage radius
11 => outer damage radius
0 => shockwave speed; 0 for no shockwave
rand-multiple => type
0
2
7 => sound
-------------------------------------
-
The game has a sense of 'inertia', doesn't it? That is, if a ship stops thrust, it doesn't just come to a dead stop in space, right? So what if you fired off a 3-4 second engine burst at full speed, so long as it was out of sight of the player's start point, and THEN shut down the engines? Maybe give them a fighter or something to occupy them while the special effects happen in the background.
-
Isn't there a set-explosion SEXP you could sue to make explaosion along the hull?
-------------------------------------
when
[what ever condition]
explosion-effect
get-object-x => x-coords
[Ship]
[Ship's subsystem]
get-object-y => y-coords
[Ship]
[Ship's subsystem]
get-object-z => z-coords
[Ship]
[Ship's subsystem]
0 => damage; 0 'cause this is just show
0 => Blast force; 0 'cause this is just show
rand-multiple => Explosion size
50
100
10 => inner damage radius
11 => outer damage radius
0 => shockwave speed; 0 for no shockwave
rand-multiple => type
0
2
7 => sound
-------------------------------------
Uhm...you could use random values and/or random subsystems and add a repeat count to ensure that there will be many explosions, all in different positions.
-
Uhm...you could use random values and/or random subsystems and add a repeat count to ensure that there will be many explosions, all in different positions.
actually that was an extract from a custscene where I used - I think - 11 of these...
and sure using when-argument you could randomize the subsystems and hey you could even make the explosion go off some far of a subsystem by using the aritmethic sexps (+,-,*,/)
-
I find it better. There's something else, though it won't work with destroyers. You can add random coordinates relative to a ship, so no subsystems as only reference. As I said, it shouldn't work properly with destroyers and other major warships: many of the explosions would remain hidden. :)
-
The game has a sense of 'inertia', doesn't it? That is, if a ship stops thrust, it doesn't just come to a dead stop in space, right? So what if you fired off a 3-4 second engine burst at full speed, so long as it was out of sight of the player's start point, and THEN shut down the engines? Maybe give them a fighter or something to occupy them while the special effects happen in the background.
Freespace's idea of inertia is terrible, at least when it comes to fighters. IIRC, even capships slow down relatively quickly.
-
As for the explosions i was planning on using the same method as in http://www.hard-light.net/forums/index.php/topic,45089.0.html and http://www.hard-light.net/forums/index.php/topic,47463.msg966036.html#msg966036 though with slightly toned down amount of detonations. That is basically just graphical effect.
-
Use change-ship-class (or whatever) once an object gets below a certain hull strength to change it to a "derelict" model, and make this new model follow a path. You can use every-time and the set-coordinate SEXPs to make the waypoints "follow" the ship until it's destroyed and the "derelict" model kicks in.
Just be careful with any coordinate SEXPs. They use absolute value numbers, so place everything well into the positive XYZ plane to avoid wierdness.
As for drifting, the FS physics engine makes no sense at all. Disabled ships stop where they are, but enginless debris continue on forever (even in high-friction environments like the nebula). So you will need to have some kind of engine on that thing.
-
Nah... I think i'll handle the whole drifting thing via Lua scripts.. As i can directly access both velocity and rotvel variables from there