So I'm trying to make an action sequence that can be used by all spells of the same element (one for fire, one for ice, etc.) Currently, the basic functionality of the action sequence works: it plays the animation, deals damage and actor animates.
What i'm having trouble with is the secondary effects. My plan is to have perks in the form of passive states that the action sequence reads to determine which secondary effect to apply, if any. for the chance to apply, I'm using a random number between 1 and 100, and comparing it to a value that has been predetermined. My current method, however, doesn't seem to be working.
What I have right now is the following script in a Conditional Branch:
where Variable 1 is a temp variable set to the Last Actor ID to Act and Variable 2 is a temp variable set to the StateID of the passive state, both declared earlier in the action sequences. This is intended to check if the passive state is on the actor to trigger the secondary effect corresponding to that state.
Then in the notetag of the skill I have the following:
Variable 6 is a temp variable, and the 100 is the chance (set to 100 here mainly for testing)
Unfortunately, the branch for the secondary effect is getting skipped over, even when the actor has the passive state applied.
As is common with a fair number of my posts on this forum, the main issue is my lack of programming knowledge. I'm not sure if the reason it isn't working is because of poorly written syntax, incompatability with the methods I'm using, or some other issue I'm not aware of. Any help is greatly appreciated.
What i'm having trouble with is the secondary effects. My plan is to have perks in the form of passive states that the action sequence reads to determine which secondary effect to apply, if any. for the chance to apply, I'm using a random number between 1 and 100, and comparing it to a value that has been predetermined. My current method, however, doesn't seem to be working.
What I have right now is the following script in a Conditional Branch:
Code:
$gameActors.actor($gameVariables.value(1)).states().includes($dataStates[$gameVariables.value(2)])
Then in the notetag of the skill I have the following:
Code:
<JS Pre-Apply>
$gameVariables.setValue(6,100);
</JS Pre-Apply>
Unfortunately, the branch for the secondary effect is getting skipped over, even when the actor has the passive state applied.
As is common with a fair number of my posts on this forum, the main issue is my lack of programming knowledge. I'm not sure if the reason it isn't working is because of poorly written syntax, incompatability with the methods I'm using, or some other issue I'm not aware of. Any help is greatly appreciated.