>xabsl 2
Behavior Documentation
>
Index
>Agents
>Symbols
>Basic Behaviors
>Options
>> joystick-head-control
>>>
straight
>>>
up
>>>
down
>>>
left
>>>
right
Option joystick-head-control
Controls head with a joystick
State Machine
This browser can't display the SVG file
svg/option_joystick-head-control.svg
.
The
Adobe SVG Viewer 3.0
can be downloaded from
http://www.adobe.com/svg/viewer/install/main.html
State straight
If that state is active,
>
The option
joystick-playing
is executed.
>
These output symbols are set:
head-control-mode
=
head-control-mode.look-straight-ahead
The decision tree:
This browser can't display the SVG file
svg/option_joystick-head-control_state_straight.svg
.
The
Adobe SVG Viewer 3.0
can be downloaded from
http://www.adobe.com/svg/viewer/install/main.html
Pseudo code of the decision tree:
if
(
joystick-data.coolie
==
no-coolie
)
// coolie center
{
transition-to-state(
straight
);
}
else if
(
joystick-data.coolie
==
S
)
// coolie up
{
transition-to-state(
up
);
}
else if
(
joystick-data.coolie
==
N
)
// coolie down
{
transition-to-state(
down
);
}
else if
(
(
joystick-data.coolie
==
W
)
||
(
joystick-data.coolie
==
NW
)
||
(
joystick-data.coolie
==
SW
)
)
// coolie left
{
transition-to-state(
left
);
}
else if
(
(
joystick-data.coolie
==
E
)
||
(
joystick-data.coolie
==
NE
)
||
(
joystick-data.coolie
==
SE
)
)
// coolie right
{
transition-to-state(
right
);
}
else
{
transition-to-state(
straight
);
}
State up
If that state is active,
>
The option
joystick-playing
is executed.
>
These output symbols are set:
head-control-mode
=
head-control-mode.look-to-stars
The decision tree:
This browser can't display the SVG file
svg/option_joystick-head-control_state_up.svg
.
The
Adobe SVG Viewer 3.0
can be downloaded from
http://www.adobe.com/svg/viewer/install/main.html
Pseudo code of the decision tree:
if
(
joystick-data.coolie
==
no-coolie
)
// coolie center
{
transition-to-state(
straight
);
}
else if
(
joystick-data.coolie
==
S
)
// coolie up
{
transition-to-state(
up
);
}
else if
(
joystick-data.coolie
==
N
)
// coolie down
{
transition-to-state(
down
);
}
else if
(
(
joystick-data.coolie
==
W
)
||
(
joystick-data.coolie
==
NW
)
||
(
joystick-data.coolie
==
SW
)
)
// coolie left
{
transition-to-state(
left
);
}
else if
(
(
joystick-data.coolie
==
E
)
||
(
joystick-data.coolie
==
NE
)
||
(
joystick-data.coolie
==
SE
)
)
// coolie right
{
transition-to-state(
right
);
}
else
{
transition-to-state(
up
);
}
State down
If that state is active,
>
The option
joystick-playing
is executed.
>
These output symbols are set:
head-control-mode
=
head-control-mode.look-between-feet
The decision tree:
This browser can't display the SVG file
svg/option_joystick-head-control_state_down.svg
.
The
Adobe SVG Viewer 3.0
can be downloaded from
http://www.adobe.com/svg/viewer/install/main.html
Pseudo code of the decision tree:
if
(
joystick-data.coolie
==
no-coolie
)
// coolie center
{
transition-to-state(
straight
);
}
else if
(
joystick-data.coolie
==
S
)
// coolie up
{
transition-to-state(
up
);
}
else if
(
joystick-data.coolie
==
N
)
// coolie down
{
transition-to-state(
down
);
}
else if
(
(
joystick-data.coolie
==
W
)
||
(
joystick-data.coolie
==
NW
)
||
(
joystick-data.coolie
==
SW
)
)
// coolie left
{
transition-to-state(
left
);
}
else if
(
(
joystick-data.coolie
==
E
)
||
(
joystick-data.coolie
==
NE
)
||
(
joystick-data.coolie
==
SE
)
)
// coolie right
{
transition-to-state(
right
);
}
else
{
transition-to-state(
down
);
}
State left
If that state is active,
>
The option
joystick-playing
is executed.
>
These output symbols are set:
head-control-mode
=
head-control-mode.look-left
The decision tree:
This browser can't display the SVG file
svg/option_joystick-head-control_state_left.svg
.
The
Adobe SVG Viewer 3.0
can be downloaded from
http://www.adobe.com/svg/viewer/install/main.html
Pseudo code of the decision tree:
if
(
joystick-data.coolie
==
no-coolie
)
// coolie center
{
transition-to-state(
straight
);
}
else if
(
joystick-data.coolie
==
S
)
// coolie up
{
transition-to-state(
up
);
}
else if
(
joystick-data.coolie
==
N
)
// coolie down
{
transition-to-state(
down
);
}
else if
(
(
joystick-data.coolie
==
W
)
||
(
joystick-data.coolie
==
NW
)
||
(
joystick-data.coolie
==
SW
)
)
// coolie left
{
transition-to-state(
left
);
}
else if
(
(
joystick-data.coolie
==
E
)
||
(
joystick-data.coolie
==
NE
)
||
(
joystick-data.coolie
==
SE
)
)
// coolie right
{
transition-to-state(
right
);
}
else
{
transition-to-state(
left
);
}
State right
If that state is active,
>
The option
joystick-playing
is executed.
>
These output symbols are set:
head-control-mode
=
head-control-mode.look-right
The decision tree:
This browser can't display the SVG file
svg/option_joystick-head-control_state_right.svg
.
The
Adobe SVG Viewer 3.0
can be downloaded from
http://www.adobe.com/svg/viewer/install/main.html
Pseudo code of the decision tree:
if
(
joystick-data.coolie
==
no-coolie
)
// coolie center
{
transition-to-state(
straight
);
}
else if
(
joystick-data.coolie
==
S
)
// coolie up
{
transition-to-state(
up
);
}
else if
(
joystick-data.coolie
==
N
)
// coolie down
{
transition-to-state(
down
);
}
else if
(
(
joystick-data.coolie
==
W
)
||
(
joystick-data.coolie
==
NW
)
||
(
joystick-data.coolie
==
SW
)
)
// coolie left
{
transition-to-state(
left
);
}
else if
(
(
joystick-data.coolie
==
E
)
||
(
joystick-data.coolie
==
NE
)
||
(
joystick-data.coolie
==
SE
)
)
// coolie right
{
transition-to-state(
right
);
}
else
{
transition-to-state(
right
);
}