05-14-2008 17:26
I've been experimenting with writing a walk replacer (object worn). After the appropriate permissions have been granted, I am monitoring the held and change parameters of the control event. Let's say I'm walking forward. If I use the keyboard up arrow I see a nice clean pattern. It starts with at 1,1 condition, followed by a bunch of 1,0 conditions, and ends with a 0,1 condition. Just what one would expect and nice and clean.

If I use the SpaceNavigator, I get a bunch of random looking patterns of 1,1 & 1,0 & 0,1. For that reason, the walk replacer works inconsistently when using the Walk Replacer. So the following code works fine with keys but not with the Space Navigator

CODE

if (held & change & (CONTROL_FWD|CONTROL_BACK|CONTROL_LEFT|CONTROL_RIGHT))
if (llGetAnimation(llGetPermissionsKey()) == "Walking")
walking(TRUE);
else
walking(FALSE);

where walking is defined as

CODE

walking(integer status)
{
if(status != is_walking)
{
if(status)
{
llStopAnimation("walk");
llStartAnimation(walkName);
}
else
{
llStopAnimation(walkName);
}
is_walking = status;
}
}


I was wondering if anyone has any ideas on how to make this work with the space navigator. I know it can be done because the Space Navigator works fine with my usual AO.