View Full Version : possible to change the objDir to a type of variable?

09-30-2003, 06:31 PM
Hello all.. starting to play with the ol Lscript.. 2nd try .. got a quick question

is it possible to set the objDir command to a type of variable?

like say if I had something like

objDir = (%programfiles%)
would go to programfiles directory
you can try this by clicking start->run then typing this in

or more specifically
objDir = (%programfiles%/Wolfenstein - Enemy Territory)
and would go to wolfenstien Dir root

or is there another way to direct this to windows specific folders.
I know that command with the "%" sign only works with windows directorys so how could I or can I do this in a LS?

newbscript .01,

10-01-2003, 06:24 AM
I'm not sure what you mean by the "objDir" command. Where did you get this from? Can you give me a page number or something in the LScript docs for this?

But anyway, I think you might be needing the "getenv" function. Have a look at page 18 in the LScript Reference manual PDF file. That should let you get any system environment variable that you need.

10-01-2003, 09:12 AM
Thanks fxnut!! this is exactly what i was looking for :D

That objDir command was just a common tag for defining what directory your objects load from.

I just tested my script a bunch of times with no screwups so I'm going to post a new thread with it. Thanks again.