Accessing C++ objects from scripts
by Mitchell · in Torque Game Engine · 10/11/2007 (8:53 am) · 4 replies
Hey guys,
Is there a way to reference variables (ints, arrays, chars, etc.) that are in code from the scripting engine?
Let's say I wanted to call a function, or get the variable data from an object when I call it from a GUI button click event. I know the GUI is tied to the scripting engine, but can it reference C++ code/objects/variables?
Is there a way to reference variables (ints, arrays, chars, etc.) that are in code from the scripting engine?
Let's say I wanted to call a function, or get the variable data from an object when I call it from a GUI button click event. I know the GUI is tied to the scripting engine, but can it reference C++ code/objects/variables?
#2
10/11/2007 (10:52 am)
How do I make variables/objects initpersistfield?
#3
You will find examples of how to expose member variables and objects to script.
10/11/2007 (12:21 pm)
@Space Monkey - Depending on what you use to compile, do a find in files (Ctrl+Shift+F in Visual Studio) for the word "initPersistField"You will find examples of how to expose member variables and objects to script.
#4
Check that resource out, it will show you how to make a basic object in the engine and usable by script.
10/11/2007 (4:08 pm)
Http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5516Check that resource out, it will show you how to make a basic object in the engine and usable by script.
Torque Owner Kirk Longendyke