Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: FUBAR-BDHR on November 25, 2008, 06:44:25 pm

Title: Send message containing <argument>
Post by: FUBAR-BDHR on November 25, 2008, 06:44:25 pm
Been doing a lot of sending messages containing variables lately.  Doing it mostly for debugging purposes.  Just tried something new to see if it would work.  I tried doing a send message with $<argument> in it.  No luck but at least it didn't crash.  Is there anyway to output <argument> using send message besides storing it to a variable?
Title: Re: Send message containing <argument>
Post by: karajorma on November 26, 2008, 03:19:05 am
As far as I know, no. And that isn't likely to be fixed any time soon either because there is no way to make it work in multiplayer. Variables only work in multiplayer because you can use a network variable  to pass the current value on to the clients. When it comes to arguments though, only the server knows which argument is being looked at since only the server actually runs the SEXP code.
Title: Re: Send message containing <argument>
Post by: Colonol Dekker on November 26, 2008, 06:11:29 am
Using #$callsign as a sender in send message/message list didnt work for me recently....

Any ideas?
Title: Re: Send message containing <argument>
Post by: karajorma on November 26, 2008, 11:01:36 am
Try it without the dollar sign.
Title: Re: Send message containing <argument>
Post by: Colonol Dekker on November 26, 2008, 11:30:38 am
And that'll show the pilot files character name? I'll try it ;)
Title: Re: Send message containing <argument>
Post by: FUBAR-BDHR on November 26, 2008, 12:32:51 pm
As far as I know, no. And that isn't likely to be fixed any time soon either because there is no way to make it work in multiplayer. Variables only work in multiplayer because you can use a network variable  to pass the current value on to the clients. When it comes to arguments though, only the server knows which argument is being looked at since only the server actually runs the SEXP code.

Didn't think there would be but just wanted to make sure.  I was just using it for a quick test not like it's something people do everyday so it's not very important.  Only time it would be a real problem is if you were out of variables.
Title: Re: Send message containing <argument>
Post by: Trivial Psychic on November 29, 2008, 08:50:18 pm
I once made a mission where I had a when-argument event, that came true whenever one of a group of ships were scanned.  The event would also alter a numeric variable and transfer the argument value to that of a string-variable.  Then it would send a message using both variables, naming the ship that was just scanned and the number of the ships that have been scanned so far.  The end of the event would then invalidate the argument so it wouldn't be reused.