Hello,
Ive been trying for several days to figure out how to make potions work in my rpg. I have it set up to give an effect on the creation of the potion to an extent. I am currently replacing the effects with different numbers but this causes weird ascetic issues. I have the code:
```
<On Creation Eval>
if ($gameVariables.value(18) != 0) {
item.effects[0].value1 = 5;
item.effects[0].value2 = $gameVariables.value(18);
} else {
item.effects[0].value1 = 0;
item.effects[0].value2 = 0;
};
if ($gameVariables.value(19) != 0) {
item.effects[1].value1 = 5;
item.effects[1].value2 = $gameVariables.value(19);
} else {
item.effects[0].value1 = 0;
item.effects[0].value2 = 0;
};
if ($gameVariables.value(20) != 0) {
item.effects[2].value1 = 5;
item.effects[2].value2 = $gameVariables.value(20);
} else {
item.effects[2].value1 = 0;
item.effects[2].value2 = 0;
};
</On Creation Eval>```
I feel like there has to be a better way to do this. Any help would be appreciated. This kindve works but it applies buffs that last forever with 0 turns remaining.
Ive been trying for several days to figure out how to make potions work in my rpg. I have it set up to give an effect on the creation of the potion to an extent. I am currently replacing the effects with different numbers but this causes weird ascetic issues. I have the code:
```
<On Creation Eval>
if ($gameVariables.value(18) != 0) {
item.effects[0].value1 = 5;
item.effects[0].value2 = $gameVariables.value(18);
} else {
item.effects[0].value1 = 0;
item.effects[0].value2 = 0;
};
if ($gameVariables.value(19) != 0) {
item.effects[1].value1 = 5;
item.effects[1].value2 = $gameVariables.value(19);
} else {
item.effects[0].value1 = 0;
item.effects[0].value2 = 0;
};
if ($gameVariables.value(20) != 0) {
item.effects[2].value1 = 5;
item.effects[2].value2 = $gameVariables.value(20);
} else {
item.effects[2].value1 = 0;
item.effects[2].value2 = 0;
};
</On Creation Eval>```
I feel like there has to be a better way to do this. Any help would be appreciated. This kindve works but it applies buffs that last forever with 0 turns remaining.