> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# IGameInputForceFeedbackEffect::SetParams

> IGameInputForceFeedbackEffect::SetParams

# IGameInputForceFeedbackEffect::SetParams

為力回饋效果設定新的參數。

## 語法

```cpp theme={null}
bool SetParams(
    const GameInputForceFeedbackParams* params
);
```

### 參數

*params*   \_In\_\
類型：[GameInputForceFeedbackParams\*](https://docs.xbox.com/zh-TW/reference/input/gameinput/structs/gameinputforcefeedbackparams.md)

要設定的新力回饋參數。

### 傳回值

類型：bool

設定新參數的結果。如果函式成功，會傳回 true。

## 備註

為力回饋效果設定新參數時，馬達會嘗試不中斷地繼續播放效果。只有在新參數和舊參數共用相同的 [GameInputForceFeedbackEffectKind](https://docs.xbox.com/zh-TW/reference/input/gameinput/enums/gameinputforcefeedbackeffectkind.md) 列舉時，您才能為力回饋效果設定新參數。如需詳細資訊，請參閱[進階 GameInput 主題](https://docs.xbox.com/zh-TW/build/core-features/common/input/advanced/input-advanced-topics.md)。

請注意，如果持續時間值沒有變更，持續時間計時器**不會**重新整理。只有在提供不同的持續時間值，或是效果停止後重新啟動時，計時器才會重新整理。

[GameInput 概觀](https://docs.xbox.com/zh-TW/build/core-features/common/input/overviews/input-overview.md)\
[GameInputForceFeedbackParams](https://docs.xbox.com/zh-TW/reference/input/gameinput/structs/gameinputforcefeedbackparams.md)\
[IGameInputForceFeedbackEffect](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinputforcefeedbackeffect/igameinputforcefeedbackeffect.md)

## 版本歷程記錄

| 版本 | 變更 |
| - | - |
| **v0** | 推出。 |


## Related topics

- [GameInput 上的力回饋](https://docs.xbox.com/zh-TW/build/core-features/common/input/advanced/input-forcefeedback.md)
- [IGameInputForceFeedbackEffect (介面內容)](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinputforcefeedbackeffect/igameinputforcefeedbackeffect.md)
- [IGameInputForceFeedbackEffect::SetGain](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinputforcefeedbackeffect/methods/igameinputforcefeedbackeffect_setgain.md)
- [IGameInputForceFeedbackEffect::SetState](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinputforcefeedbackeffect/methods/igameinputforcefeedbackeffect_setstate.md)
- [IGameInputForceFeedbackEffect::GetGain](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinputforcefeedbackeffect/methods/igameinputforcefeedbackeffect_getgain.md)
