Learning TorqueScript
by Ivan Lazarte · in Torque Game Engine · 10/02/2005 (10:43 pm) · 14 replies
I'm running through the TGE script stuff, and I'm basically pasting stuff into the console.
Is there a way to execute a torquecript file instead?
I thought maybe something existed to hte effect of
$floc = "C:\Documents And Settings\......\torquetests.cs";
exec ( $floc );
Anyone have any tips for time saving learning methods?
Is there a way to execute a torquecript file instead?
I thought maybe something existed to hte effect of
$floc = "C:\Documents And Settings\......\torquetests.cs";
exec ( $floc );
Anyone have any tips for time saving learning methods?
About the author
#2
10/03/2005 (11:37 am)
Ah, brilliant thanks :) The work continues tonight :)
#3
"C:\Torque\SDK\example\torqueDemo.exe -game starter.fps"
is how it starts up,
and i run this command,
exec ( "./scripts/various_tests.cs" );
and it says missing file...
file lives at:
C:\Torque\SDK\example\scripts\various_tests.cs
what's wrong?
10/03/2005 (8:41 pm)
Hmm, this isn't working for me for some reason,"C:\Torque\SDK\example\torqueDemo.exe -game starter.fps"
is how it starts up,
and i run this command,
exec ( "./scripts/various_tests.cs" );
and it says missing file...
file lives at:
C:\Torque\SDK\example\scripts\various_tests.cs
what's wrong?
#5
10/03/2005 (8:45 pm)
I tried all variations of forward and backward slashes too... this is 1.3
#6
Try ommiting the period in front of /scripts.
10/03/2005 (8:53 pm)
@IvanQuote:exec ( "./scripts/various_tests.cs" );
Try ommiting the period in front of /scripts.
#7
10/03/2005 (8:55 pm)
Wow, no go. this is driving me insane!
#8
You can also look in the console log file to see if any error messages are popping up.
10/03/2005 (9:08 pm)
What is the full path, From torquedemo.exe to the script your trying to execute?You can also look in the console log file to see if any error messages are popping up.
#9
10/03/2005 (9:09 pm)
You know, I had the same problem if I tried to run a script from the root directory. Once I put the script into a subfolder, then it worked. I've never figured that one out.
#10
proof i'm not insane!
executable is being started with:
C:\Torque\SDK\example\torqueDemo.exe -game starter.fps
is there a "current working directory" command to see if the system is
confused somehow?
10/03/2005 (9:16 pm)
Http://www.ivanlazarte.com/offsite/whatthehell1.gifproof i'm not insane!
executable is being started with:
C:\Torque\SDK\example\torqueDemo.exe -game starter.fps
is there a "current working directory" command to see if the system is
confused somehow?
#11
you win tonight torque! (this doesn't bode well for me singlehandedly coding that super-mega action RPG realtime video streaming universe of mecha-warfare every-thing destroyable game i 've been thinking about)
10/03/2005 (9:30 pm)
Failure, when your best just isn't good enough.you win tonight torque! (this doesn't bode well for me singlehandedly coding that super-mega action RPG realtime video streaming universe of mecha-warfare every-thing destroyable game i 've been thinking about)
#12
Scripts and other resources aren't available unless they're in a directory that's included in either a -mod or -game directive... see the ResourceManager source as to why that's the case.
10/03/2005 (9:32 pm)
Try adding -mod scripts to your command line and add a main.cs to your scripts directory.Scripts and other resources aren't available unless they're in a directory that's included in either a -mod or -game directive... see the ResourceManager source as to why that's the case.
#13
That worked perfectly.
Someone should bookmark this for all poor first time execrs like myself!
thanks.
---
edit: and it recompiles on demand! lovely. this is exactly what i need.
this doesn't seem so bad now :)
10/03/2005 (9:40 pm)
Oh Tony. where have you been all my life since about one hour ago...That worked perfectly.
Someone should bookmark this for all poor first time execrs like myself!
thanks.
---
edit: and it recompiles on demand! lovely. this is exactly what i need.
this doesn't seem so bad now :)
#14
The Torque community won't let you fail... which is why it's the best Indie solution around... No way you'd get technical support from Unreal at this time of night :P
Sorry... I took a nap. :P
10/03/2005 (9:50 pm)
Quote:Failure, when your best just isn't good enough.
The Torque community won't let you fail... which is why it's the best Indie solution around... No way you'd get technical support from Unreal at this time of night :P
Quote:Oh Tony. where have you been all my life since about one hour ago...
Sorry... I took a nap. :P
Torque 3D Owner Stephen Zepp
exec("./pathtodirfromexelocation/torquetests.cs");