Gamepad Get Connected


描述

You can use this action to check and see if a given gamepad "slot" has a gamepad connected. You supply the gamepad index (this is the number of "slot" that a gamepad occupies) and the returned value will be stored in the target variable that you supply for future use (this can be flagged as a temporary local variable that you create for this event or script).


动作语法:

Gamepad Get Connected Syntax


参数:

参数 描述
游戏手柄 The gamepad index to check.
目标 The target variable to store the returned value in.


例如:

Gamepad Get Connected Example
上述动作块代码执行了一个 for 循环来检查游戏手柄是否连接到了12个可用插槽中的任何一个。. 如果发现检测到了游戏手柄,则会将全局变量设置为当前插槽号,并且终止循环。