Game Development Community

How to call one of my script functions fromm engine code!

by Valerie Butler · in Torque Game Engine · 07/24/2009 (8:05 am) · 3 replies

Hi, I have a script function called timeUp() in a file called clientGame.cs which is in the scripts folder on my client side! It takes no parameters! To call this function from engine code I am trying the following and cant get it to call...

Con::executef(1, "timeUp()", "client/scripts/clientGame.cs");

Should I be trying something differet or is there something I am not doing?

Thank You!

#1
07/24/2009 (8:11 am)
I don't think you don't need to specify the file path.

This should work:
Con::executef(1, "timeUp()");
#2
07/24/2009 (8:20 am)
Thanks Taylor, I tried this and t still doesnt seem to be calling!
#3
07/24/2009 (9:32 am)
Con::executef(1, "timeUp");
And make sure your script file that this function is in is being executed.