Question about terminals and their scripts.

Post » Wed Apr 07, 2010 8:08 pm

If I have a terminal, and on that terminal is a script with a variable Task, if I put Set task to 1 in the result line of one of the options on the terminal, will it change the Task in the terminals script? Or will it set Task to 1 in its own little private script? So would I have to say just Task or like MyTerminalRef.Task?

Gunmaster95
User avatar
I’m my own
 
Posts: 3344
Joined: Tue Oct 10, 2006 2:55 am

Post » Wed Apr 07, 2010 11:33 am

You can't set a remote variable without remote variable syntax. A remote variable is a variable that is defined in another script, as in this case from the point of view of your result script. Result scripts can only use "ref" variables (when it comes to local variables) so you can't use that approach either. Your best bet would be to use remote variable syntax, which would require you to make your terminal a persistent reference with an editorRefID.

Cipscis
User avatar
Catherine N
 
Posts: 3407
Joined: Sat Jan 27, 2007 9:58 pm

Post » Wed Apr 07, 2010 8:43 pm

Hmm I think I understand. I will use the remote var ref to do it. I was just thinking maybe the result scripts were like 'add-ons' to the objects script, but I guess not. Thanks again Cipscis :D

Gunmaster95
User avatar
hannaH
 
Posts: 3513
Joined: Tue Aug 15, 2006 4:50 am

Post » Wed Apr 07, 2010 7:35 am

If you're using a remote variable, you don't need to specifically use a "ref" variable - just leave it as an integer or float (whichever it is at the moment) and it will work fine. Good luck.

Cipscis
User avatar
Josephine Gowing
 
Posts: 3545
Joined: Fri Jun 30, 2006 12:41 pm

Post » Wed Apr 07, 2010 7:03 am

Ok, I am not doing something right. What I am trying to do is get it so when you first open a terminal, you have one option. 'Recover drives' then once you use that, it shows you other options like to veiw certain portions of it, and the 'recover drives' option goes away. To do this I am using a short. so on the terminal I have a script attached which simply declares the short varable Task. Then, for a condition on the Recover Drives option I put, that Task has to be 0, or what it is by default. Then in the result script for picking that option I put Set ONeilBasemantTerminalRef.Task to 1 which should change task to 1, changing all your options. I havent actually additional options yet, but theres still a problem. When I click on it, it still is there. It isnt changing task to 1, thus making it go away. I dont know why it isnt working... The terminal is persistant, and it doens't complain anywhere. What am i missing?
User avatar
kiss my weasel
 
Posts: 3221
Joined: Tue Feb 20, 2007 9:08 am

Post » Wed Apr 07, 2010 12:21 pm

Nevermind. I discovered that leaving the terminal and using it again resulted in the option being gone. Ticking 'Force Redraw' fixed this. It now works great. Thanks again Cipscis :)
User avatar
roxanna matoorah
 
Posts: 3368
Joined: Fri Oct 13, 2006 6:01 am

Post » Wed Apr 07, 2010 8:23 am

All variable types work fine in the Result Script of Terminals. I use this in my Vault 64 mod with no problems what-so-ever.

But, I do not think menu 1 script can use variables from menu 2 script. And I also 'think' that the script only runs once and then forgets what values may have been set in it.

If you want to use a variable to control what might come up on the terminal, on any menu selection, use a global variable. Its what I use and it works just fine.
User avatar
Adam Kriner
 
Posts: 3448
Joined: Mon Aug 06, 2007 2:30 am

Post » Wed Apr 07, 2010 9:42 pm

That makes sense WillieSea, thanks :D
User avatar
Music Show
 
Posts: 3512
Joined: Sun Sep 09, 2007 10:53 am

Post » Wed Apr 07, 2010 8:32 pm

Thanks for that WillieSea, I don't use result scripts very often so I assumed that the limitation applied to all types of them. I get the feeling I've seen you say this recently as well - sorry for forgetting if that's true.

If a variable is declared in a script on a persistent reference there won't be any issues with variables being reset randomly, even if the script consists entirely of variable declarations, so whether a remote variable or a global variable is used shouldn't make much of a difference either way.

Cipscis
User avatar
benjamin corsini
 
Posts: 3411
Joined: Tue Jul 31, 2007 11:32 pm


Return to Fallout 3