Structs in TorqueScript?
by Imre Chroncsik · in Torque Game Engine · 03/07/2006 (7:09 am) · 2 replies
Is it possible to create some kind of structs in TorqueScript? I'd like to group my variables for easier access. I mean things like:
%client.myStruct.myValue = 1;
%s = %client.myStruct;
%s.myValue = 2;
echo(%client.myStruct.myValue); // should echo 2
I've tried different syntax variations, but none of them worked.
Thanks for any help.
%client.myStruct.myValue = 1;
%s = %client.myStruct;
%s.myValue = 2;
echo(%client.myStruct.myValue); // should echo 2
I've tried different syntax variations, but none of them worked.
Thanks for any help.
Associate Anthony Rosenbaum
%struct = new scriptObject(){ class = fred; }; function fred::onAdd(%this){ //init here } function fred::onremove(%this){ //destroy here }