Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: karajorma on March 24, 2005, 04:18:02 pm
-
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
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.
-
I haven't done anything to it since I first put it in CVS.
-
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++
-
Make a string variable, perhaps? :confused:
-
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
-
um...
did you by any chance notice string-equals, string-greater-than, and string-less-than? ;)
-
Oppps :D No I didn't :D I'll report for the eye inspection tomorrow :D
-
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?
-
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.
-
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
-
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.
-
mvrtfgerenen prenerningerh......