Author Topic: Do something when a certain message has been sent  (Read 1794 times)

0 Members and 1 Guest are viewing this topic.

Offline dragonsniper

  • 29
  • Master of the Irrelevant
    • Steam
Do something when a certain message has been sent
It's a pretty lame title, I know, but is there a SEXP or a variable to use to tell FRED to do something after a certain message has been sent? (Hope this makes sense. :))
Do or do not, there is no try...
~HLP Member and Modder~
          ~~2008-201x~~

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Do something when a certain message has been sent
Several ways:

Chain an event to the one that sends the message.

Put the sexps in the same one that sends the message.

Event base on Is-event-true of the event that sent the message.

Straight time delay from mission start if you know exactly when the message will be sent every time.
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 

Offline dragonsniper

  • 29
  • Master of the Irrelevant
    • Steam
Re: Do something when a certain message has been sent
Chain an event to the one that sends the message.
If I do that, then won't the event that I chained to the message trigger as soon as the first message is played, or after the last one is played?
Do or do not, there is no try...
~HLP Member and Modder~
          ~~2008-201x~~

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Do something when a certain message has been sent
Wait you said after a message was sent.  Are you using send-message-list?  That would be messages then.  If you are then since you know the time the message is sent after the event that sends it becomes true then you can chain an event to it with that time delay.   Also you can break it up into 2 message events chained together. 

An example of your current message event and when you want the next event to occur would help.
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 

Offline dragonsniper

  • 29
  • Master of the Irrelevant
    • Steam
Re: Do something when a certain message has been sent
I don't think I have anything on hand...

An example of the SEXP that isn't there would be something like this: is-message-sent 
                                                                                                              is-message-sent-delay



Do or do not, there is no try...
~HLP Member and Modder~
          ~~2008-201x~~

 

Offline Rodo

  • Custom tittle
  • 212
  • stargazer
    • Steam
Re: Do something when a certain message has been sent
create your sexp with the message, name it "something".

then use if event true delay
                              "something"
                                   xxx
- with xxx being the amount of time it takes to get to that message and that's it (count from the time the event something is triggered), this is Fubar's idea, and looks like a pretty solid way to do it, give it a try.
el hombre vicio...

  

Offline dragonsniper

  • 29
  • Master of the Irrelevant
    • Steam
Re: Do something when a certain message has been sent
Thanks. :) I've used this once or twice before, but I wanted to know if there was another way around it.
Do or do not, there is no try...
~HLP Member and Modder~
          ~~2008-201x~~