Hard Light Productions Forums
Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: Black Wolf on June 18, 2005, 10:52:22 am
-
Can someone explain how any given string variable can be greater than any other given string variable? What determines relative size? I mean... they're words. They have no assigned values...AFAIK...
-
I'd imagine that it works based on alphabetical order. Something before it in the alphabet is less while something afterwards is more.
Again something I need to test :)
-
I think the variable(x) < variable(y) SEXP tree is the same as false OR true
I am not sure though, logically it shold be neither. It should not even exist.
-
Hmmm... String is greater than Sting, which would seem to support that.
TBH, string variables seem kind of useless. I can see where the advantage might come in for storing ships names and such, but I can;t think of anywhere where numerical variables wouldn't suffice.
-
For randomising, let's say message senders, it could be used. Of course it can also be done with numerical variables, but it's longer.
-
Originally posted by TopAce
For randomising, let's say message senders, it could be used. Of course it can also be done with numerical variables, but it's longer.
Variables in your messages screws up voice acting though. Of course, for unvoiced missions it's no problem.
-
But if you want only one of four freighters send you messages all through the mission, you can only have one voice, unless you want one or both of the other two send voice-acted messages.
-
Originally posted by TopAce
But if you want only one of four freighters send you messages all through the mission, you can only have one voice, unless you want one or both of the other two send voice-acted messages.
True I suppose. Still - it can still be done with numerical variables, so the point stands. :)
-
Originally posted by Black Wolf
TBH, string variables seem kind of useless. I can see where the advantage might come in for storing ships names and such, but I can;t think of anywhere where numerical variables wouldn't suffice.
String variables are incredibly useful when you have to pass the argument from a when-argument or every-time-argument to another event.
An example if for instance if you want to have one ship in a mission be a traitor. Using string variables you can now pick a random ship using when-argument/random-of and then have every other event supply the traitor ships name via a string variable.
There's other examples of how I used it here (http://www.hard-light.net/forums/index.php/topic,31462.0.html) and here (http://www.hard-light.net/forums/index.php/topic,32140.0.html).