Game Development Community

Executing Script

by Dre Aldridge · in Torque 3D Public · 03/25/2011 (7:46 am) · 4 replies

Hi, I was wondering if anyone knew of a good resource for me to learn how to have script execute based on parameters instead of through the console. So far every tutorial I have seen has been based upon having to manually run the script but I know it is possible to do what I would like. Thank you for any help.

#1
03/27/2011 (9:52 am)
heres one way to do it:

if(parameter == value)
   exec("script.cs");
#2
03/27/2011 (11:00 am)
Thank you for your input but what I am really needing to know is where do I put script like this? Is there a script file that the project will continually pole? Is there an entity I place in the project that will allow me to activate script? That is why I was looking for a resources because I have a lot of questions and don't want to swamp people with them.
#3
03/27/2011 (11:25 am)
Or put your scripts inside functions and then call the function (with a trigger etc) and exec the cs file with all the others. Look in datablockExec.cs and ScriptExec.cs respectively.
#4
03/28/2011 (7:27 am)
Looks like I need to look up how to use the triggers. Thanks for the input. Appreciate it.