Author Topic: Call me a newb again, but...  (Read 2158 times)

0 Members and 1 Guest are viewing this topic.

Offline Black Wolf

  • Twisted Infinities
  • 212
  • Hey! You! Get off-a my cloud!
    • Visit the TI homepage!
Call me a newb again, but...
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...
TWISTED INFINITIES · SECTORGAME· FRONTLINES
Rarely Updated P3D.
Burn the heretic who killed F2S! Burn him, burn him!!- GalEmp

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Call me a newb again, but...
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 :)
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline TopAce

  • Stalwart contributor
  • 212
  • FREDder, FSWiki editor, and tester
Call me a newb again, but...
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.
My community contributions - Get my campaigns from here.

I already announced my retirement twice, yet here I am. If I bring up that topic again, don't believe a word.

 

Offline Black Wolf

  • Twisted Infinities
  • 212
  • Hey! You! Get off-a my cloud!
    • Visit the TI homepage!
Call me a newb again, but...
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.
TWISTED INFINITIES · SECTORGAME· FRONTLINES
Rarely Updated P3D.
Burn the heretic who killed F2S! Burn him, burn him!!- GalEmp

 

Offline TopAce

  • Stalwart contributor
  • 212
  • FREDder, FSWiki editor, and tester
Call me a newb again, but...
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.
My community contributions - Get my campaigns from here.

I already announced my retirement twice, yet here I am. If I bring up that topic again, don't believe a word.

 

Offline Black Wolf

  • Twisted Infinities
  • 212
  • Hey! You! Get off-a my cloud!
    • Visit the TI homepage!
Call me a newb again, but...
Quote
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.
TWISTED INFINITIES · SECTORGAME· FRONTLINES
Rarely Updated P3D.
Burn the heretic who killed F2S! Burn him, burn him!!- GalEmp

 

Offline TopAce

  • Stalwart contributor
  • 212
  • FREDder, FSWiki editor, and tester
Call me a newb again, but...
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.
My community contributions - Get my campaigns from here.

I already announced my retirement twice, yet here I am. If I bring up that topic again, don't believe a word.

 

Offline Black Wolf

  • Twisted Infinities
  • 212
  • Hey! You! Get off-a my cloud!
    • Visit the TI homepage!
Call me a newb again, but...
Quote
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. :)
TWISTED INFINITIES · SECTORGAME· FRONTLINES
Rarely Updated P3D.
Burn the heretic who killed F2S! Burn him, burn him!!- GalEmp

  

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Call me a newb again, but...
Quote
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 and here.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]