Changing variables with skills

Status
Not open for further replies.

Perpetr8r

Villager
Member
Joined
Nov 9, 2013
Messages
6
Reaction score
0
First Language
English
Primarily Uses
Hi,


I've got a skill which I want to keep track of the usage of. In the skill's effects, along with it doing its thing I have tried to call a common event which increases a variable every time the skill is used. However, this common event never gets called during the battle, and waits until after the battle and all other events have finished before finally activating, which is useless. What this indicates to me is that common events called by a skill don't work at all how I was expecting them to. In that case, how do I keep track of the usage of a specific skill?


I've attached the skill sheet thing as an example. I just want to call that common event WHEN the skill is used.

sample skill.jpg
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
if the common event waits until after battle, then you have set that event to parallel process or something similiar. That doesn't work combined with the call command, the call command needs a CE that is not triggered by something else.

Please post a screenshot of the CE called so that we can check the error there

However, you can also change the variables by entering a script command into the damage formula - that depends on what the CE really does, as the damage formula field is limited and you need to know the script equivalents of the commands used in the common event.
 

Perpetr8r

Villager
Member
Joined
Nov 9, 2013
Messages
6
Reaction score
0
First Language
English
Primarily Uses
if the common event waits until after battle, then you have set that event to parallel process or something similiar. That doesn't work combined with the call command, the call command needs a CE that is not triggered by something else.

Please post a screenshot of the CE called so that we can check the error there

However, you can also change the variables by entering a script command into the damage formula - that depends on what the CE really does, as the damage formula field is limited and you need to know the script equivalents of the commands used in the common event.
After you mentioned that, I found out what my problem is. It seems that the common event does not get called when you finish a battle with an ability that calls a common event. (I thought the problem was in my defense version of the skill, but it's actually in the attack version) In that case, the battle ends, the event seems to be delayed, and only occurs after everything else finishes.

So I guess I need to use scripting in the formula with the attack? Is there another way?

I need the event to be called on time regardless of whether or not it finishes the battle when you use the skill.

Edit: Just in case that wording wasn't super clear, I mean something like this:

  • Say you have a skill called "Punch"
  • Along with doing damage, it also calls the common event to increase the usage count of Punch's variable (see first post)
  • It you use it and DON'T win the battle from that attack, the common event is called and executes
  • If you DO win the battle from that attack, the common event is delayed until everything else finishes, including any events you were in the middle of before the battle
  • I want to check the number of times the player used the attack in a battle immediately after said battle, which means I need that last hit to count too and the delayed effect won't fire in time


cower event.jpg
 
Last edited by a moderator:

Berylstone

Veteran
Veteran
Joined
Jun 3, 2013
Messages
642
Reaction score
62
First Language
English
Primarily Uses
From the sound of things I think what may be your problem is that by default battles end immediately after the last enemy reaches 0 HP.  This can be pretty frustrating if you are trying to trigger events after the last monster dies.

A way around this is change your enemies to an immortal state and end the battle manually when ever you are ready.  I also think Tsukihime made a script to help with this.  I will try to dig it up for you and post it here when I find it.

#Edited

Well I did find it.  But unfortunately my paste button is broken also so it seems and it won't let me copy and paste links.   I'll try typing it out and see what that does...

http://Himeworks.wor...phase-triggers/

Well the link doesn't seem to work.  But maybe that will give enough information you can find the script.  You can find a functioning link in the Leveling up in battle thread.  I posted a  link there a while back and it seems to still work.
 
Last edited by a moderator:

Perpetr8r

Villager
Member
Joined
Nov 9, 2013
Messages
6
Reaction score
0
First Language
English
Primarily Uses
So it turns out that this script ALSO allows common events called by skills to run before the battle ends, which basically does exactly what I needed.

Much appreciated, you two!
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
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,862
Messages
1,017,049
Members
137,569
Latest member
Shtelsky
Top