1

我想为我的 USB 操纵杆制作输入图。我在本教程中所做的一切:http ://wiki.beamng.com/Playing 我的输入图:

// Product Name: (USB Joystick)
// GUID: (00030E8F-0000-0000-0000-504944564944, format: {XXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX})
// axes: (4^Y^X^RZ^Z, format 3^X^X^X or 4^X^X^X^X, etc.)

//%device = "{00030E8F-0000-0000-0000-504944564944}-" @ %joyNum 0;  (<- Guid goes there too)
%device = "joystick" @ %joyNum 0; (<- device type goes there, joystick/gamepad)

// 0 deadzone
$gp_deadzone = "-0.15 0.15"; (possible deadzone configure)

// camera
moveMap.bind(%device, (axis name), "D", $gp_deadzone, gamepadYaw);
moveMap.bind(%device, (axis name), "D", $gp_deadzone, gamepadPitch);
// movement
moveMap.bind(%device, (rzaxis), joy_steer_nl_dz);
//moveMap.bind(%device, thumbly, "D", $gp_deadzone, gamePadMoveY); // using triggers instead

moveMap.bind(%device, (zaxis), "D", $gp_deadzone, joy_brake);
moveMap.bind(%device, (yaxis), "D", $gp_deadzone, joy_accelerate);

moveMap.bindCmd(%device, (button name), "beamNGResetPhysics();", "");
moveMap.bindCmd(%device, (button name), "beamNGTogglePhysics();", "");
moveMap.bindCmd(%device, (button1), "beamNGToggleParkingBrake();", "");
moveMap.bindCmd(%device, (button2), "beamNGSwitchVehicle();", "");
moveMap.bindCmd(%device, (button name), "gamepadZoom(-0.1);", "gamepadZoom(0);");
moveMap.bindCmd(%device, (button name), "gamepadZoom(0.1);", "gamepadZoom(0);");
moveMap.bindCmd(%device, (button3), "beamNGResetCamera();", "");

moveMap.bindCmd(%device, (button4), "beamNGCameraToggle();", "");

当我开始游戏时,我无法用操纵杆进行转向。这就是 torque3d.log 所说的:

38.952018|scripts/client/inputmaps/custom/usbjoystick.inputmap.cs Line: 6 - syntax error
38.952085|>>> Advanced script error report.  Line 6.
38.952146|>>> Some error context, with ## on sides of error halt:
38.952211|// GUID: (00030E8F-0000-0000-0000-504944564944, format: {XXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX})

38.952233|// axes: (4^Y^X^RZ^Z, format 3^X^X^X or 4^X^X^X^X, etc.)

38.952249| 

38.952264|//%device = "{00030E8F-0000-0000-0000-504944564944}-" @ %joyNum 0;  (<- Guid goes there too)

38.952279|%device = "joystick" @ %joyNum 0; (<- device type goes there, joystick/gamepad)

38.952294|##
38.952309|##
38.952323|// 0 deadzone

38.952339|$gp_deadzone = "-0.15 0.15"; (possible deadzone configure)

38.952369|// camera

38.952383|moveMap.bind(%device, (axis name), "D", $gp_deadzone, gamepadYaw);

38.952398|moveMap.bind(%device, (axis name), "D", $gp_deadzone, gamepadPitch);

38.952413|// movement

38.952427|moveMap.bind(%device, (rzaxis), joy_steer_nl_dz);
38.952487|>>> Error report complete.

我尽我所能来解决这个问题,但我仍然没有成功。对不起我的英语不好。

4

1 回答 1

0
38.952294|##
38.952309|##

这两个迹象表明故障在哪里......

这意味着您需要删除表示...的行之间的空格

%device = "joystick" @ %joyNum 0;

设备类型去那里,操纵杆/游戏手柄

和它下面的线。

于 2014-11-05T12:32:53.337 回答