ClientKillCallback
Used as a dependency for other mods, resource for modders.
模組介紹 作者原文
KillCallback
Adds a client sided callback triggered each player kill in the match.
Note:
Thanks to Fifty#8113 and Spoon#1812 as they did most of the work on this.
For end users:
This alone does nothing but is required for other mods to function.
If another mod listed this one as its dependency, download it!
For modders:
Changelog:
- v2.0.1:
- Added bool victimIsOwnedTitan to callback params
Due to the new update, all mods which require this one must be updated (v1.0.0 -> v2.0.0+).
AddClientCallback_OnPlayerKilled ( void functionref ( ObituaryCallbackParams {entity victim, entity attacker, int damageSourceId, int scriptDamageType} ) customCallback)
With the new update made by Uniboi, the arguments of current callbacks need to be replaced with an ObituaryCallbackParams struct.
The struct currently contains:
- entity attacker
- entity victim
- int damageSourceId
- int scriptDamageType
- bool victimIsOwnedTitan
Example:
void function afterClientInit(){
AddCallback_OnPlayerKilled ( myCallbackFunction )
}
void function myCallbackFunction ( ObituaryCallbackParams inputParams ) {
if(inputParams.attacker == GetLocalClientPlayer() && DamageSourceIDToString(inputParams.damageSourceId) == "mp_weapon_sniper")
thread myOnKillFunction()
}
Note: this is triggered each time a player gets killed in a match, not just by the client player. If you only care about client player's kills, simply check if inputParams.attacker == GetLocalClientPlayer()
安裝與使用 安裝:Northstar 用戶端模組
- 先安裝 Northstar 用戶端(Titanfall 2 的開源社群用戶端,官方發布頁提供安裝器),模組由它載入。
- 把本站下載的壓縮包解壓,內容放入 Titanfall2 目錄下的 Northstar/mods/ 資料夾。
- 透過 NorthstarLauncher.exe 啟動遊戲,控制台會列出已載入的模組。
Northstar 用於私人伺服器與自訂內容,請勿用它連線官方伺服器。