Game Development Community

Execute a program while game is running?

by Somesh Nanda · in Torque Game Builder · 04/18/2013 (10:29 am) · 3 replies

Hi.. How do i execute another program(say calculator) just to start and run while my game is running using torque script?? Besides, how do i close it when my game is closed? please help....

#2
04/19/2013 (6:39 am)
Thank you Mr. Lucas.. But system() is probably in C++ isn't it? can i use that in torque script??
#3
04/19/2013 (6:42 am)
Ah...
Add this somewhere in C++, it should create a new TorqueScript function that works just like the C++ one (you can change the name to anything you want ofc)
DefineEngineFunction(system, void, (const UTF8* command), (NULL), "usage")
{
	system(command);
}