Author Topic: String Variable in FRED Stuff  (Read 3768 times)

0 Members and 1 Guest are viewing this topic.

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
String Variable in FRED Stuff
I split this off from the FRED post in the Recent builds forum cause I didn't want it to seem like I was complaining there

Quote
Originally posted by PhReAk
Build updated with some minor fixes.  Link in first post


Still no equivalence testing for String Variables though. Did you update from CVS for this build?

Goober said the stuff for it was in CVS but I'm wondering now whether he only changed things in FS2_Open and not FRED yet.
« Last Edit: March 24, 2005, 05:18:04 pm by 340 »
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
String Variable in FRED Stuff
I haven't done anything to it since I first put it in CVS.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
String Variable in FRED Stuff
Do you need to do anything for it to show up in FRED?

While I'm here what's the checkout module for FRED? I tried a couple of permutations but I couldn't get CVS to give it to me. I've got the whole of next week free and I figured it was time to finally start looking seriously into learning C++
« Last Edit: March 24, 2005, 04:33:44 pm by 340 »
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
String Variable in FRED Stuff
Make a string variable, perhaps? :confused:

  

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
String Variable in FRED Stuff
Doesn't work. If you have.

=
-0
-0

You can right click and change the zeros into a number variable but it wont let you replace it with a string variable.

When I tried manually changing it in FRED to this

=
-String (Nil)
-Something else

I ended up with this after the mission saved

=
-String
-Nil
-Something else

which unsurprisingly crashed FS2
« Last Edit: March 24, 2005, 04:46:08 pm by 340 »
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
String Variable in FRED Stuff
um...

did you by any chance notice string-equals, string-greater-than, and string-less-than? ;)

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
String Variable in FRED Stuff
Oppps :D No I didn't :D I'll report for the eye inspection tomorrow :D
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
String Variable in FRED Stuff
Still not working.

Okay I tried using the string-equals SEXP this time. :)

When
-String-Equals
--< Any String >
--< Any String >

right click on a < Any String > option, click replace variable, Choose my string variable.  Nothing happens.  Basically it just remains < Any string >

I can type in the name of the variable manually but isn't that just going to return false every single time since it's simply using the name of the variable as the string instead of it's value?
« Last Edit: March 24, 2005, 05:37:40 pm by 340 »
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
String Variable in FRED Stuff
Okay, I know what it is.  The return types need to be fiddled with. :blah:

However, typing the variable name by hand will work.  You might get a parse error, but FS2 will handle it correctly and use the string stored by the variable.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
String Variable in FRED Stuff
Nope. It doesn't work (at least for me it doesn't) as the game just treats it like a normal string.

I opened the mission in Notepad, saw how FRED sets out variables and typed in @TestString[Null] and FRED successfully parsed that into a string variable :D

Well now I know what I'll be doing all today :D
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
String Variable in FRED Stuff
Sorry to sound like a broken record but I've come across another couple of limitations that have stopped me dead in my tracks.

At the moment it looks like you can't use one variable to set another one.

I set up an event like this

Modify-variable
-Variable1 (Value 1)
-Variable2 (Value 2)

(You'll have to type in @Variable2[Value 2] to get the second one to work BTW)


but it doesn't assign "Value 2" to Variable1 (infact it just sets Variable1 to 0 for some reason).

This wouldn't be so bad if I could assign an argument to the variable but it won't let me do that.

Modify-variable
-Variable1 (Value 1)
- < argument >

Simply assigns the string < argument > rather than assigning the value of < argument >

Sorry to sound like I'm moaning about this but this is fast becoming my favourite feature in FRED. I took a sprawling MG mission and managed to stick the contents of about 12 complicated SEXPs in to one single every-time-argument  with it but that's all for nothing if  I can't assign one variable from another.

I've included a short mission you can use for testing (so as to save you making your own from scratch).


I'm also encountering an intermittant lock sometimes when I try to create a new modify-variable SEXP. Not quite certain what is causing it though. It only locks after I've created the SEXP and clicked on okay to close the Events editor. I'll try and pin down what causes it.
« Last Edit: March 25, 2005, 10:00:23 am by 340 »
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
String Variable in FRED Stuff
mvrtfgerenen prenerningerh......