State removed after certain number of hits

kartacha

Veteran
Veteran
Joined
Aug 16, 2013
Messages
81
Reaction score
6
First Language
Bulgarian
Primarily Uses
RMMZ
Is there an easy way to make a State that is removed after a certain amount of hits? My main idea behind it is to create a shield that fully absorbs N number of hits. I cannot really do it with turns or damage as the idea is for the damage itself to be nullified.
 

Milennin

"With a bang and a boom!"
Veteran
Joined
Feb 7, 2013
Messages
2,511
Reaction score
1,642
First Language
English
Primarily Uses
RMMV
Have all enemy skills inflict an invisible state.
Have a common event run during each action in combat, on every encounter that checks whether the actor has the shield state on, and if so, checks if they're inflicted with the invisible state from enemy attacks, and if yes, count the shield durability variable down by 1 (set up the shield durability in a common event linked to the shield skill (if it's meant to take 5 hits, set the variable to 5). Next, have it check if the variable is at 0, and if so, remove the shield state. At the end of the event, always remove the invisible state, so it can check for the next attack.

It'll be a pain to set up initially if you have to backtrack a lot of encounters, but I'd always recommend having common events run during turns and actions on all battle encounters to deal with these things.
 

kartacha

Veteran
Veteran
Joined
Aug 16, 2013
Messages
81
Reaction score
6
First Language
Bulgarian
Primarily Uses
RMMZ
This took some enginuity! GJ man!
Won't this really slow the game though? These are a lot of checks it seems.
 

kartacha

Veteran
Veteran
Joined
Aug 16, 2013
Messages
81
Reaction score
6
First Language
Bulgarian
Primarily Uses
RMMZ
Did what you said and it is working. It will be easy to do if all shields are able to contain only 1 charge since I do not need to keep track on those.

However, if I want to keep track of all possible party members and the shields they have I should have a separate variable for each character/shield combination. My initial variable is to have a formula like this:
v[1] = Character Order Number * 10 + Shield Type Number ; v[v[1]] = Shield Power
Is this expression functional? I am most concerned about the v[v[1]] part.

Making a few tries showed that it seemingly does. Yet, I prefer to have a reconfirmation.
 
Last edited:

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

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,853
Messages
1,016,990
Members
137,562
Latest member
tamedeathman
Top