Copyright 6 Vista 7 new! Languages 8 Glovepie scripts 9



Download 0.65 Mb.
Page16/30
Date conversion08.07.2018
Size0.65 Mb.
1   ...   12   13   14   15   16   17   18   19   ...   30

POV Hats

These are either those little hat switches you get on the top of some joysticks, or they are the D-Pad on a Game Pad with analog sticks when it is in analog mode.


There can be up to 4 POV Hats per joystick, numbered Pov1, Pov2, Pov3 and Pov4.
The number of POV hats the joystick has is given by Joystick.NumberOfPOVs.
POV Hats can be either centred, or they can be pushed out in some direction. You can’t tell how far in that direction they are pushed. Analog POV hats can be pushed in any angle. Digital ones only support 8 different angles.
To tell in PIE whether Pov1 is centred, read: Joystick.Pov1Center. It will be either true or false. If it is true then you can read Joystick.Pov1 and it will be the angle in degrees (or you can convert it to other units if you want). If it is centred then Joystick.Pov1 will be -1.
Another way of reading the POV hat is to use the values Pov1Up, Pov1Down, Pov1Left and Pov1Right. For example if the joystick is pushed to the front-left corner then Pov1Up and Pov1Left will both be true and the others will be false. For analog POV hats it only has to be closer to that direction than to any other.
The final way of reading the POV hat is to use the values Pov1x and Pov1y. They work just like the x and y values of the joystick, except the values it can return are more restrictive (either both values are 0, or one of them is on the edge).

Joystick Information

There are other joystick fields with information about the joystick. You can look most of them up in the DirectInput documentation. They are:


Alias: true or false

Attached: true or false

Deadband: true or false

DeviceType: number

DeviceSubType: number

Emulated: true or false

FFAttack

FFDriverVersion

FFFade

FFSamplePeriod



FirmwareRevision

ForceFeedback

ForceFeedbackGuid

HardwareRevision

HID

Hidden


HidUsage, HidUsagePage

InstanceGuid

IsFirstPerson, IsFlight, IsGamePad, IsJoystick, IsLimited, IsVirtualJoystick, IsWheel

Name: The name of that individual joystick

Phantom: true or false

PolledDataFormat

PolledDevice

PosNegCoefficients

PosNegSaturation

PPJoyNumber

ProductGuid

ProductName: The brand of the joystick

Saturation

StartDelay



Multiple Joysticks

By default “Joy” or “Joystick” refers to “Joystick1”. You can also specify a joystick by number, eg. “Joystick1” or “Joystick2”.


But you can also specify joysticks by type. Note that that only works if the joystick reports its type correctly, which lots of them don’t. My Game Pad reports itself as a joystick for example.
Joystick.GamePad1 refers to the first gamepad. Joystick.GamePad2 refers to the second gamepad.
Joystick.Joystick1 refers to the first joystick that actually is a joystick.
Joystick.Wheel1 refers to the first wheel.
Joystick.Flight1 refers to the first flight stick.
Joystick.FirstPerson1 refers to the first Virtual Reality DirectInput device (p5 gloves don’t count as DirectInput devices).
Joystick.PPJoy1 refers to PPJoy virtual joystick 1.
Joystick.NotPPJoy1 or Joystick.Real1 refers to the first joystick that is NOT a PPJoy Virtual Joystick.
The number after the type is optional. You then put the item after, like this:
debug = joystick.gamepad1.x
or like this:
debug = joystick.wheel.x
This is useful if you have different types of joysticks (that report their type correctly).


The “Any” object, for any kind of gamepad

When you don’t care whether the user is using a Wiimote and Nunchuk, Classic Controller, SIXAXIS, XBox360 controller, or ordinary gamepad, you can use the “Any” object.


It supports DirectInput gamepads, Wiimotes, Nunchuks, Classic controllers, SIXAXIS, or XBox 360 controllers. It also sort-of supports real joysticks, but not really.
By convention, the Nunchuk is assumed to be in your left hand, and the Wiimote in your right, even though that is not necessarily the case.
It is not complete yet, and is still a work in progress. I haven’t implemented motion stuff yet.
It doesn’t support multiple players individually. ALL controllers will trigger it, even if you have multiple of the same type.

The Joysticks and DPads

Any.Joy1x, Any.Joy1y: This is the left joystick on a gamepad with two joysticks (sixaxis, classic, xbox360, etc), or the Nunchuk joystick on Wiimote+Nunchuk, or the joystick on a joystick.


Any.Joy2x, Any,Joy2y: This is the right joystick on a gamepad with two joysticks. On a joystick that twists, Joy2x will be the twist.
Any.DPadLeft, DPadRight, DPadUp, and DPadDown: These are the direction buttons on the DPad. They may be analog or digital (0 to 1). If the device is an actual joystick, it will be the hat switch instead.
Any.Left, Right, Up, Down: Either the DPad or the left joystick, or Nunchuk, can be used to control these, or the joystick if the device is a real joystick
Any.LeftThumbLeft, LeftThumbRight, LeftThumbUp, LeftThumbDown: Any DPad or analog stick controlled by your left thumb, or the Nunchuk. This does not include the Wiimote dpad. On a real joystick this will be the joystick or hat switch even though both are controlled by your right hand.
Any.RightThumbLeft, RightThumbRight, RightThumbUp, RightThumbDown: Either the right analog stick, or the Wiimote’s DPad (the Wiimote is the only controller with a DPad for the right hand).
Any.L3: Pushing in on the left analog stick. This does NOT work on a Classic Controller or Nunchuk, they have no L3 button. It only works on the SIXAXIS, XBox 360 Controller, or regular gamepad.

Any.R3: Pushing in on the right analog stick. This does NOT work on a Classic Controller, they have no R3 button. It only works on the SIXAXIS, XBox 360 Controller, or regular gamepad.


Any.Joy1Run: Left analog stick is pushed to run speed.

Any.Joy2Run: Right analog stick is pushed to run speed.


1   ...   12   13   14   15   16   17   18   19   ...   30


The database is protected by copyright ©dentisty.org 2016
send message

    Main page