Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Black Wolf on June 06, 2006, 01:29:54 am

Title: Feature request - definable death message.
Post by: Black Wolf on June 06, 2006, 01:29:54 am
Sometimes, when you're FREDding, it's neccesary to kill the player because he breaks the rules, and the net result of this is going to be a broken mission/campaign. Now, the way I normally do this is to just give every fighter, and capship orders to attack Alpha 1, and every beam in the mission orders to fire on him, but sometimethat doesn't work (generally if there aren't enough fighters/beams in the mission) and you have to kill the player with the self destruct sexp.

Now, when you do this, the death message comes up as "Alpha 1 was killed by unknown causes". What I'd like is a method whereby I can replace everything after "killed by" with some different text, like "equipment failure" or "his own incompetence". That way, I can link Alpha 1's death to events in the mission. By way of example, in my current rmission, the destruction of a cruiser, the GVC Nefertiti, is an event the campaign can't recover from, and since there's no way of Alpha 1 jumping out, he needs to die. Usiing this method, I could put "the shockwave from GVC Nefertiti exploding" on the end of it rather than unknown causes, so the death screen would have a sliver of ligitimacy.

The best way I can think to do this would be a sexp, or possibly a pair of sexps:

 - Define-death-message, would overwrite any FS2 generated death messages and pop in whatever text the mission designer wrote in, regardless of the actual circumstances of the players untimely demise.

 - Clear-death-messages would clear out any death messages in the mission file, reverting back to FS defaults.

Erm, this is the point where I'd normally say "I'm not a coder, but I suspect that since the death message is already defined by variables, tapping into that system might make this sort of thing easier than, say, geomod". But I wont this time. Coz I know you guys hate that. ;)
Title: Re: Feature request - definable death message.
Post by: karajorma on June 06, 2006, 02:19:40 am
That one annoys me too (and not just for the player. There are a number of times I've wanted to have a different ship appear in the log as destroyed instead of self-destructed etc).

I'm not certain that custom messages for everything is feasible (IIRC the game actually checks when something is destroyed by looking in the log to see if a ship was destroyed!)

The death message for players though probably is possible. Remind me this weekend and I'll take a look at it.
Title: Re: Feature request - definable death message.
Post by: Colonol Dekker on June 06, 2006, 07:12:57 am
Could always use a cutscene sexp. IE Set borders and add a subtitle, while you  focus the camera on alpha one and BOOM!!!

BTW - dont mention GEOmod <j/k> , If Beams could carve cruisers in half for real, My PC would explode  :lol:
Title: Re: Feature request - definable death message.
Post by: Goober5000 on June 06, 2006, 08:34:42 am
Well I was going to keep this secret until I wrote DEM II, but
Quote
* Revision 2.243  2006/03/18 22:43:16  Goober5000
 * added set-death-message sexp
 * --Goober5000
 *
:)
Title: Re: Feature request - definable death message.
Post by: karajorma on June 06, 2006, 10:34:00 am
Now I was under the impression that the WCP boys wanted those so that they could set a message for the ships to transmit upon dying. Not to change what was recorded in the log or on the screen when a player blew up.

I guess I'll have to take a closer look now :)
Title: Re: Feature request - definable death message.
Post by: Starman01 on June 06, 2006, 10:58:38 am
Our death-messages are meant different. We want to have enemy fighters send an "Aahhhh" when being destroyed. We made those with some tricky sexp's that seem to take advantage of a bug or something. But Goober has now coded in something more handy for us :)

Regarding this message here, would be nice to change that one. At the moment, I just use the end-mission script and display what happen
in the debriefing window, and I'm not all that happy with, but I can live with :)