Conditional skills by party members

Status
Not open for further replies.

bananatron

Villager
Member
Joined
Jul 23, 2013
Messages
12
Reaction score
1
First Language
English
Primarily Uses
I'm not sure if what I'm looking for can be accomplished with events, but I'm hoping it can.

Essentially, I'm trying to make a skill which is used on allies, where the effect is unique dependent on the actor casting it and the ally receiving it (or their classes, whichever is easier). The normal conditional branches don't have anything this specific and my only other idea is to somehow track the party actors as variables and then use those variables to have the skill call a common event which swaps out the skill based on the variables which are present, etc.

Any other ideas?
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Is this a skill used in battle? If it is, you have the issue that damage has already been calculated and displayed by the time a common event is called, so your common event would not affect what's sent to the battle log.


If you don't care about that, or it's not a battle skill, then sure - you could use a common event called by the skill, and a series of nested conditions to see who the user and target are. I'm not sure if those values are saved and able to be accessed in a common event - if they aren't by default, you could use the formula box to set variables to a and b (which represent the user and the target), followed by the damage, then use those variables in the common event.
 

bananatron

Villager
Member
Joined
Jul 23, 2013
Messages
12
Reaction score
1
First Language
English
Primarily Uses
I'm not sure if those values are saved and able to be accessed in a common event - if they aren't by default, you could use the formula box to set variables to a and b (which represent the user and the target), followed by the damage, then use those variables in the common event.
How would I go about setting the user/target into a variable? Previously I was thinking of having a common event which is called before the skill takes place which sets the variables/switches to learn the party comp, but it sounds like what you're saying might be simpler via the formula box inside the one common event?

EDIT: I'm just having a hard time telling the common event who the target/user are of that skill.
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
In the formula box of the skill, type this (I'll use variable 5 for the user and variable 6 for the target, and dmg for the damage - if there is no damage, use 0)

Code:
$game_variables[5] = a.actor_id; $game_variables[6] = b.actor_id; dmg
 
Last edited by a moderator:

bananatron

Villager
Member
Joined
Jul 23, 2013
Messages
12
Reaction score
1
First Language
English
Primarily Uses
Thank you so much for the help!

I can't quite get this to work, however. There aren't any errors and everything seems to be configured correctly but the common event I have just says if Variable 5 = 1 and 6 is = 2 (which they are, actor one is targeting actor 2), then add HP or gain a skill, or anything, and those things aren't triggering, however the else conditions aren't triggering either which makes me think that the common event IS recognizing that these values are correct, but not following through with the actions. I've even taken away the second condition and tested just saying "is variable 5 actor 1 (which it is)" and still no actions and no else conditions are triggered.

During this time it does go through the process of telling me there is 0 damage dealt, and it will follow anything outside of the conditional branch or whatever so I know the skill itself is working, it just doesn't seem to follow through with the conditions.

Any ideas on why this would be happening?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Can you show some screenprints? I'd like to see how your skill is set up, as well as your common event.


You could also add a couple of Show Text commands at the very start of the common event, and have it output what's in variables 5 and 6 (or whatever variables you're using - don't use those two just because I used them in the example, especially if you're already using them for something else in your game).
 

bananatron

Villager
Member
Joined
Jul 23, 2013
Messages
12
Reaction score
1
First Language
English
Primarily Uses
Here are some screens: http://imgur.com/a/yJnCO#0

To test further I added a simple condition I knew was true to the skill, and then the actions did go through which leads me to believe the problem is with the way I'm having it check for variables that are causing the problem. I used var 5 and 6 to test since I wasn't using those anyway.

EDIT: I had it print the variables and they aren't changing, staying at 0,0 so I must have put the script/formula wrong or something?
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
okay - I've run into this before. I don't think it's recognizing what actor_id is. Can you change both instanced of actor_id to just id? So it'll be this:

Code:
$game_variables[5] = a.id; $game_variables[6] = b.id; dmg
I really don't know if that'll work or not. I wasn't able to solve it last time I had the issue (not part of the battle formula, but still within the Game_Battler class)
 

bananatron

Villager
Member
Joined
Jul 23, 2013
Messages
12
Reaction score
1
First Language
English
Primarily Uses
I think that worked!

EDIT: IT definitely did, you're a genius; thanks a million!
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Awesome!


This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,863
Messages
1,017,053
Members
137,571
Latest member
grr
Top