Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: Socio on September 18, 2008, 01:10:45 am

Title: How do I have anybody say a message?
Post by: Socio on September 18, 2008, 01:10:45 am
For example, I want the player, Alpha 1 to say something. Or maybe a character that isn't even there. How do I do this? I get errors if I try Alpha 1 or a ship that doesn't exist.
Title: Re: How do I have anybody say a message?
Post by: FUBAR-BDHR on September 18, 2008, 01:21:11 am
Just put a # in front of the name like this:  #Alpha 1
Title: Re: How do I have anybody say a message?
Post by: Colonol Dekker on September 18, 2008, 08:18:43 am
In the message sexp, where it asks for message originator /sender. Not the ship editor before you ask :)
Title: Re: How do I have anybody say a message?
Post by: Socio on September 20, 2008, 07:21:15 pm
Another question: How do I set an event to happen after a message? I want ships to jump in after someone finishes talking (long series of messages).
Title: Re: How do I have anybody say a message?
Post by: FUBAR-BDHR on September 20, 2008, 07:26:18 pm
A couple of ways to do it.  The most basic would be just using is-event-true-delay in the arrival cue of the ship. 
Title: Re: How do I have anybody say a message?
Post by: Socio on September 20, 2008, 07:32:34 pm
I have my messages set up right now as "when time elapsed" 3 seconds to start going through the messages. If I set the arrival of the news to that event, they end up jumping in after three seconds. How do I set it after the final message? Am I doing it wrong?

thanks for the speedy help by the way.
Title: Re: How do I have anybody say a message?
Post by: FUBAR-BDHR on September 20, 2008, 07:42:40 pm
Are you using send-message or send-message-list?  If you are using send-message-list what you already know how long the messages are going to take.  Just put something bigger in the delay for the is-event-true-delay.  Note send-message-list delays are in milliseconds while is-event-true-delay is in seconds.  If you are using multiple events to send the messages then set it to the last event that sends the message.  If you have all the messages in one event using just send-message you are probably doing something you shouldn't be. 
Title: Re: How do I have anybody say a message?
Post by: Socio on September 20, 2008, 07:45:44 pm
Sounds like I'm doing it wrong. I guess I'll separate the last message into another event and see if that works out.
Title: Re: How do I have anybody say a message?
Post by: FUBAR-BDHR on September 20, 2008, 07:50:04 pm
If there's no chance of the ships in the conversation being destroyed send-message-list would work just fine. 
Title: Re: How do I have anybody say a message?
Post by: TrashMan on September 21, 2008, 09:36:17 am
Your problem is timing.
The send-message-list turns true the second the messages start sending. What you need to do is time (in your head) how long it takes for the whole conversation to finish (you should know..just add up the (mili)seconds in the send-message-list event + how long it takes to speak out the last message )and put that in the delay for the wing/ship.

Example

EVENT Chat
When
+has-arrived-delay
--GTC Orff
--0
+send-message-list
--GTC Orff
--High
--Chat1   <---- "GTC Orff here. We're now on station" (takes about 4 seconds to say slowly)
--0
--Alpha2
--High
--Chat2   <--------"Finally. What took you so long? We waited for an eternity."
--4000        <----will be sent 4 seconds after the Chat 1 message
--GTC Orff
--High
--Chat3   <------"Engine trouble Alpha2. Couldn't be helped."
--7000    <------ will be send 7 seconds after Chat 2 message


So, if you want a enemy wing to jump in after the conversation is done, you'd set it's arrival cue as

When is-event-true
-- Chat
--15   (4000+700+4000 for the last message = 15 seconds)