Created
October 12, 2021 12:26
-
-
Save triacontane/f1e33e4da7994f1f496a3f4b0457966c to your computer and use it in GitHub Desktop.
武器の名前からIDを逆引き
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const weaponName = '武器の名前'; | |
const variableId = 1; | |
const data = $dataWeapons.find(weapon => weapon && weapon.name === weaponName); | |
if (data) { | |
$gameVariables.setValue(variableId, data.id); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
指定した名称と一致する武器のIDを変数[1]に格納するスクリプトです。