# RPG Maker MV - Common event trigerd by skill?

Status
Not open for further replies.

#### Halvgrim

##### Warper
Hi smart people.

I am making a game about the struggles of a small business owner. And I want to throw a business card at a customer(monster) in order to make them drop a job (item). It is basically a pokeball mechanic im looking to make.

This is what i have so far:

I have created a skill called "Throw Business card"(kast visitkort) and set its effect to "trigger common event" like so:

Then I created a common event called "Throw Business card"(kast visitkort) in order to make a percentage out of the enemy HP my thinking is this:
Set variabel "Monster Max HP to Max HP of #1
Set variabel "Monsters present HP to HP of #1
Then I divide the present HP with 100
then i multiply the new present HP with the Max HP to get the percentage of remaining HP
So if that number is under 10(%) the actor gets an item called "**** job"(skod job)
If the HP is not under 10% the tekst says: customer is not convinced, remove there will to argue!

When I fight my first monster in game(Old lady) I bring her down to 2 HP from a Max HP of 50, I use the skill throw business card, but it just says it has no effect on The old lady.

I know things are not as easy as it is in my head, but i cant seam to fix this...

Last edited:

#### Shaz

##### Veteran

I'm not sure if the common event will play if there is nothing in the damage formula. In your common event, just put a Text command at the top that says 'common event called', to show us if it's actually running the common event at all. If it isn't, change the damage to 1 HP and then try again. This will just let you know if there needs to be some kind of damage in order for the common event to run.

Oh - and remove the parallel trigger from the common event.

#### Andar

##### Veteran
then i multiply the new present HP with the Max HP to get the percentage of remaining HP
wrong math

x% = current HP * 100 / MaxHP

However, the message you get is because the effects of a common event are never handled by the skill itself, so the skill will never have an effect. That is the default message from the engine that does not fit in this case - and because of this there are plugins who change that default. You can't remove that "no effect" without a plugin as far as I know.

#### Halvgrim

##### Warper
Hi Shaz and Andar.
Thank you so much. You 2 are champions!

Shaz you where right in the skill having to deal at least 1 hp to trigger the event. I took of the parallel like u wrote and it worked. After that the event started giving items every time I cast the skill, but of course it was because os my bad math as Andar pointed out. I am not smart enough to understand the last bit about plugins, but my take away is that it now works if the skill deal 1 damage, and I am fine with that. It actually works better that way.
The skill is now working exactly as I wanted it to in the first place.

Thanks again.

#### slimmmeiske2

##### Little Red Riding Hood

Status
Not open for further replies.

### Latest Profile Posts

Making it a rule that I don't do any world building for my new game before the actual gameplay is concrete and working. I have 16 years of lore to work with anyway.
Cheesy power metal makes everything better. No matter what you do, you'll feel heroic doing it.
Starting to really like the first of my madness areas. I think the eyes looking at them really helps to sell the place.
Made idle animation for character. It first had only three frames but looked too different from walking animation and I had to draw five more.
MV and VX Ace both have good qualities.