Running a script's method from the engine....
by Phil Mundy · in Torque Game Engine · 08/04/2006 (5:03 am) · 2 replies
I have made a gui in the script and when you change to a section of it, the menu slides to show the next menu.
The change is initiated by a button and without the sliding motion, moves to its new position fine. The sliding motion also works fine, and is a script function. This means I want to keep calling that script function, every gameloop, and that is where I am stuck.
I figured I would have to edit the engine side of Torque to get it to run every loop, but I have no idea how to call script functions from the code.
I think I was getting close with Con::executef() but have no idea about the parameters, or whether that is right.
Anyway, the point being, I would like to know how to run functions in scripts from the cc code.
Can anyone help?
The change is initiated by a button and without the sliding motion, moves to its new position fine. The sliding motion also works fine, and is a script function. This means I want to keep calling that script function, every gameloop, and that is where I am stuck.
I figured I would have to edit the engine side of Torque to get it to run every loop, but I have no idea how to call script functions from the code.
I think I was getting close with Con::executef() but have no idea about the parameters, or whether that is right.
Anyway, the point being, I would like to know how to run functions in scripts from the cc code.
Can anyone help?
Associate Anthony Rosenbaum