A question about "struct Move
by ShaoWei · in Torque Game Engine · 01/24/2008 (10:57 pm) · 1 replies
Struct Move
{
// packed storage rep, set in clamp
S32 px, py, pz;
U32 pyaw, ppitch, proll;
F32 x, y, z; // float -1 to 1
F32 yaw, pitch, roll; // 0-2PI
U32 id; // sync'd between server & client - debugging tool.
U32 sendCount;
bool freeLook;
bool trigger[MaxTriggerKeys];
void pack(BitStream *stream);
void unpack(BitStream *stream);
void clamp();
void unclamp();
};
I do not know what the "bool trigger[MaxTriggerKeys]" means,
and who can give me a answer?
THANKS!!! ^_^
{
// packed storage rep, set in clamp
S32 px, py, pz;
U32 pyaw, ppitch, proll;
F32 x, y, z; // float -1 to 1
F32 yaw, pitch, roll; // 0-2PI
U32 id; // sync'd between server & client - debugging tool.
U32 sendCount;
bool freeLook;
bool trigger[MaxTriggerKeys];
void pack(BitStream *stream);
void unpack(BitStream *stream);
void clamp();
void unclamp();
};
I do not know what the "bool trigger[MaxTriggerKeys]" means,
and who can give me a answer?
THANKS!!! ^_^
Torque Owner Michael Bacon
Default Studio Name
MaxTriggerKeys is defined as 6 in my code, but I'm not sure if I modified that or not.
In the scripts these variables are set to indicate firing and jumping as dictated by the Player code which uses trigger #2 for jumping, and #0 and #1 for primary and secondary fire (respectively).
For example in my default.bind.cs I have:
function jump(%val) { $mvTriggerCount2++; } function mouseTrigger(%val) { $mvTriggerCount0++; } function altTrigger(%val) { $mvTriggerCount1++; }