Project1

标题: VisuStella MZ 商店自订价格 JS [打印本页]

作者: mysherry    时间: 2021-1-28 18:58
标题: VisuStella MZ 商店自订价格 JS
在 Items and Equips Core VisuStella MZ  插件里

<JS Buy Price>
code
code
price = code;
</JS Buy Price>

- Used for: Item, Weapon, Armor Notetags
- Replace 'code' to determine the buying 'price' of the item.
- Insert the final buy price into the 'price' variable.
- The 'item' variable refers to the item being bought.

我想把价格设成 变数A
还有设成 (变数A+变数B)*变数C
那该怎么写呢 可以给个方向吗  请多指教
作者: gt50    时间: 2021-1-29 15:31
本帖最后由 gt50 于 2021-1-29 15:33 编辑

价格为某变量的值
price = $gameVariables.value(id);//id为变量id
价格为变量代数运算
const a = $gameVariables.value(id_1);
const b = $gameVariables.value(id_2);
const c = $gameVariables.value(id_3);
price = (a+b)*c;





欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1