Hi,
I have a problem with something I thought would be rather easy, but I searched for some time now without finding a solution.
I want to create a Conditional Branch that checks if a party members parameter, like atk or agi is higher or equal to a constant. It is important to me that it is a party member, instead of a specific actor, since the players can choose between a lot of different actors for their party.
So for example, if the player wants to move a rock, the game should check if any of the party members atk (what would be replaced with strenght or something) is higher than 30, before the rock can be moved.
If there is a way to accomplish this, without using scripts, I was not able to find it yet. Using scripts I thought of two solutions:
1. Just creating a usual Conditional Branch with a Script for a condition that checks for the first party members atk is high enough and if not checks for the second and so on.
2. Setting a variable according to the parameter first and then letting the game check the variable rather than the parameter directly.
Since I am new to scripting all I could do was using fragments from similar questions and fuse them together, but I failed miserably ...
That's why I am asking the people who actually understand what they are doing 😀
I would appreciate any kind of help, like an explanation how to do these things in general, an alternative way to do this or a premade script.
My first tries looked like this:
Conditional Branch
If:
(Script) $gameParty.members(0).atk >= 30
Or the other one:
var actor = $gameParty.members(0); $gameVariables.setValue(1, actor.atk)
I have a problem with something I thought would be rather easy, but I searched for some time now without finding a solution.
I want to create a Conditional Branch that checks if a party members parameter, like atk or agi is higher or equal to a constant. It is important to me that it is a party member, instead of a specific actor, since the players can choose between a lot of different actors for their party.
So for example, if the player wants to move a rock, the game should check if any of the party members atk (what would be replaced with strenght or something) is higher than 30, before the rock can be moved.
If there is a way to accomplish this, without using scripts, I was not able to find it yet. Using scripts I thought of two solutions:
1. Just creating a usual Conditional Branch with a Script for a condition that checks for the first party members atk is high enough and if not checks for the second and so on.
2. Setting a variable according to the parameter first and then letting the game check the variable rather than the parameter directly.
Since I am new to scripting all I could do was using fragments from similar questions and fuse them together, but I failed miserably ...
That's why I am asking the people who actually understand what they are doing 😀
I would appreciate any kind of help, like an explanation how to do these things in general, an alternative way to do this or a premade script.
My first tries looked like this:
Conditional Branch
If:
(Script) $gameParty.members(0).atk >= 30
Or the other one:
var actor = $gameParty.members(0); $gameVariables.setValue(1, actor.atk)