RPG Maker MV - Common event trigerd by skill?

Status
Not open for further replies.

Halvgrim

Warper
Member
Joined
Feb 25, 2020
Messages
2
Reaction score
0
First Language
Danish
Primarily Uses
N/A
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:

SS skill.PNG

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!

SS hp cal.PNG

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
Veteran
Joined
Mar 2, 2012
Messages
38,797
Reaction score
12,220
First Language
English
Primarily Uses
RMMV
Is the old lady enemy #1 in your troop?

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
Veteran
Joined
Mar 5, 2013
Messages
29,523
Reaction score
6,869
First Language
German
Primarily Uses
RMMV
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
Member
Joined
Feb 25, 2020
Messages
2
Reaction score
0
First Language
Danish
Primarily Uses
N/A
Hi Shaz and Andar.
Thank you so much. You 2 are champions! :o
Your combined comments solved it all :)

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
Global Mod
Joined
Sep 6, 2012
Messages
6,181
Reaction score
4,300
First Language
Dutch
Primarily Uses
RMXP

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

I got tired of not having an avatar image. Couldn't think of anything cool. So I'm just using my game's antagonist instead... How original. At least both of our names start with C?
Expectation: Design/dev a game for the game jam | Reality: "These codes suck, why did I do it this way? lemme fix this. Also what if I add feature xyz because... well, I can."
Did my first script call in an event! :kaopride: It's completely useless and just because I thought it'd be cute if looking at clocks in-game made the character say the real-world time, but it's fully functional scripting and I did it all by myself!
Stream will be going live shortly! I will be playing Resident Evil 3 Remake, and then I will be switching to a session of the Interactive Text Adventure! Feel free to drop by!
Spent all day working on something that ultimately has nothing "flashy" to show at the end of it. But that sense of achievement...

Forum statistics

Threads
95,631
Messages
930,564
Members
125,938
Latest member
MartelStef
Top