The RPG Maker Resource Kit

Other Game Creation => Program Troubleshooting => Topic started by: Miles Castea on January 28, 2009, 11:33:41 PM

Title: Common Event Call by Skill not working [Resolved]
Post by: Miles Castea on January 28, 2009, 11:33:41 PM
What I mean by the title is the function Common Event in each Skill in the skill tab, I made a Demi skill, and set the common event to it's skill equivalent, and even after several testing, it doesn't work. I'm sure I checked everything involved (the character, class, skill, common event, etc...) and it seems I set up everything correctly.

If you want, here's the common event:
QuoteLine 1: @>Control Variables: [0019: HP] = [1.]'s HP
Line 2: @>Control Variables: [0019: HP] *= 50
Line 3: @>Control Variables: [0019: HP] /= 100
Line 4: @>Deal Damage: [1.], Variable [0019: HP]
Line 5: @>Text: Damage: \V[19]
Title: Re: Common Event Call by Skill not working
Post by: Kokowam on January 29, 2009, 01:58:37 AM
Why do you... x50 and then divide by 100? It's the same as dividing by 2. And, most likely, your hero has an odd # of HP and the game can't register fractions of HP.
Title: Re: Common Event Call by Skill not working
Post by: Miles Castea on January 29, 2009, 02:12:23 AM
I learned from a tutorial (on RMXP) on how to do skills like heal % HP, and deal damage by %, aka Demi or Quater. That's what it told me to do. It's not a hero, as you can see, it targets a monster, to be exact, the first one.

I seem to be having a problem with any skill that calls a common event if it is intended to work in battle, and it doesn't.
Title: Re: Common Event Call by Skill not working
Post by: Kularian on January 29, 2009, 07:43:45 AM
Um...so I'm not sure where things are going askew for you.  I copied your exact lines of code (as I didn't see anything wrong with them) and made a common event with them.  I created a new skill called Demi which called that common event, and tested it in battle and it worked just fine for me.

Are you making certain to set that the skills call the event in the "Common Event" area?  If so, then I honestly have no idea what's up, man.  As I said, the eventing is sound; it works just fine. 
Title: Re: Common Event Call by Skill not working
Post by: Miles Castea on January 29, 2009, 03:31:47 PM
Yes, I'm sure. But, for the common events themselves, I always had the trigger as none.
Title: Re: Common Event Call by Skill not working
Post by: modern algebra on January 29, 2009, 08:24:27 PM
Yeah, the eventing looks sound - is the battle you are testing it in special in any way, like with an enemy hidden? Is the first enemy already dead? Or maybe you have another skill with the same name that the hero is actually using? I really don't know what is wrong with that event.

Also, as Moo said, you can just divide by 2 rather than multiplying by 50 and dividing by 100. THe reason the tutorial made it that way is likely because they were showing how to generalize percent, so if you wanted to do 57% or something, but for 50% you can just divide by 2. The rest of moo's post makes no sense though -the game will round a fraction down to the nearest integer, so that is not the problem.

Maybe there's a problem caused by some script? ~ Make sure the common event is running - put a message in there and if it plays that tells us something.
Title: Re: Common Event Call by Skill not working
Post by: Kularian on January 29, 2009, 08:34:04 PM
He requested a demo of a game where I made the Demi skill, so I whipped one up together real fast for him. 

But yeah, now that you mention it, will the Demi skill work properly if you target the second enemy?  There may need to be a bit more tweaking done, on that end; that hadn't occurred to me originally.
Title: Re: Common Event Call by Skill not working
Post by: modern algebra on January 29, 2009, 10:41:17 PM
Nah, it would always hit the first enemy.
Title: Re: Common Event Call by Skill not working
Post by: Miles Castea on January 29, 2009, 10:51:59 PM
Anyhow, I decided to provide screenshots for each window related to the problem in the Database.

http://img172.imageshack.us/img172/3897/characteruq4.png (Character)
http://img150.imageshack.us/img150/4964/classvl2.png (Class)
http://img145.imageshack.us/img145/7343/demicommoneventkf2.png (Demi Common Event)
http://img144.imageshack.us/img144/971/skillwr5.png (Demi skill)
http://img140.imageshack.us/img140/913/testbattletrooppe9.png (Test Battle Troop)

Also, a list of my scripts in use:
Anti Event Lag System by Zeriab (Version 1.0)
Advanced Debug System by Slipknot (Version 1.1)
Change Leader System by Modern Algebra (Version ?.?)
End Battles Results Screen (FF style) by ??? (Version ?.?) (I do know it's Draw Slant Bar is by SephirothSpawn)
Wordlock Chests by Zeriab (Version 1.0)
Change Message stating Miss by Sandgolem (Version 3.0)
Battle Command Memory by Sandgolem (Version 1.0)
Item Encylopedia by GoldenShadow (Version 4.0)
Auto Fix Volume Levels 1/2 by DerWulfMan (Version ?.?)
Item Count by KaotiX (Version ?.?)
Battle Trophies
UMS by Ccoa (Version 1.30)
Bank System by ??? (Has Game_Bank, Scene_Bank, Scene_Account, Window_BankItem, Window_BankNumber, Window_AccStats)
Advantage! by DerWulfMan (Version 2.2)
Luck by Falcon
Taxes by The_Darklord
Demon Book by Momomo (With Comments)
Advanced Weather System by Ccoa
Multislot system by Guillaume777
New Shop Design  by Leon (Version 1.0)
Title: Re: Common Event Call by Skill not working
Post by: modern algebra on January 30, 2009, 01:04:48 AM
And when you put the message into the common event, did it play?
Title: Re: Common Event Call by Skill not working
Post by: Miles Castea on January 30, 2009, 01:15:16 AM
No, and nothing happens, except for the miss. Would my common events called through skill not work because of a script?
Title: Re: Common Event Call by Skill not working
Post by: Kularian on January 30, 2009, 06:18:54 AM
I don't have a lot of scripting experience; I grew up on RM2k, so most of my ability is in eventing, so I can't say for sure.  But you do have a few battle-altering scripts, so I suppose it is possible for that to be causing an issue. 

You could try it the scientific way and remove a script, then test it.  If nothing changes, put the script back and take out another, and so on and so forth. 

But as I said, I don't often use scripts, so I really can't say for certain if that might be the problem or not, but I do know that in both projects that I tested the demi skill, I had no additional scripts added...so maybe?
Title: Re: Common Event Call by Skill not working [Resolved]
Post by: Miles Castea on January 30, 2009, 08:23:04 PM
I fixed it, it was the Luck script by Falcon. X_X