Okay so I want a character that can steal items. Pretty much a staple in RPG's that involve classes, which is why I don't
understand why MV doesn't have this function built in. That's besides the point though.
So I created an event, where my steal skill triggers a Common event. All that common event does is check if the enemy
has a state called "Can't Steal" and if it does it displays the message, "The Enemy has Nothing" The Else branch contains switch activators that correspond with the enemies in the fight, since I want different things to be stolen from each enemy. The ability
also adds a state called Targeted to the enemy.
For example: Enemy 1 will need switch 1 on to activate the event when you use steal on that enemy, Enemy 2 with need switch 2
to activate the event relating to that enemy.
If the switches are on the next part checks to see if the state "Targeted" is on which it will be because the steal ability itself applies this state 100% of the time. Once this condition is met. I use a randomized variable to decide which items can be stolen.
If Variable is Less than or Equal to 5 you get a common items, if the variable is 6, 7, or 8 you get a rare item, and if the variable is
9 or 10, you get one of two ultra rare items, depending on if the variable is 9 or 10.
After this I want the event to not trigger again. Which I can do by putting the state, "Can't Steal" on the enemy, so if the steal command is used again. The skill itself sees that the state, "Can't Steal" is present, and say "The Enemy has Nothing", I also set the Variable back to 0.
It works perfectly if I only have 1 enemy in the troop, the problem comes when I have more than 1 enemy. Having another enemy causes 1 of 2 problems. If I use the steal ability on enemy 2 first it doesn't do anything, however it still works on enemy 1 just fine. The other problem is that if I use it one enemy 1 first, it works just fine, but than if I try to use it on enemy 2. It just displays the, "The Enemy has Nothing" message, even though I haven't stolen from that enemy yet.
I don't turn the switches off after the event has run, because if I turn the switches off it crashes the game, and won't let me do anything
Any help that may allow me to make this work, would be greatly appreciated.
Thank You,
understand why MV doesn't have this function built in. That's besides the point though.
So I created an event, where my steal skill triggers a Common event. All that common event does is check if the enemy
has a state called "Can't Steal" and if it does it displays the message, "The Enemy has Nothing" The Else branch contains switch activators that correspond with the enemies in the fight, since I want different things to be stolen from each enemy. The ability
also adds a state called Targeted to the enemy.
For example: Enemy 1 will need switch 1 on to activate the event when you use steal on that enemy, Enemy 2 with need switch 2
to activate the event relating to that enemy.
If the switches are on the next part checks to see if the state "Targeted" is on which it will be because the steal ability itself applies this state 100% of the time. Once this condition is met. I use a randomized variable to decide which items can be stolen.
If Variable is Less than or Equal to 5 you get a common items, if the variable is 6, 7, or 8 you get a rare item, and if the variable is
9 or 10, you get one of two ultra rare items, depending on if the variable is 9 or 10.
After this I want the event to not trigger again. Which I can do by putting the state, "Can't Steal" on the enemy, so if the steal command is used again. The skill itself sees that the state, "Can't Steal" is present, and say "The Enemy has Nothing", I also set the Variable back to 0.
It works perfectly if I only have 1 enemy in the troop, the problem comes when I have more than 1 enemy. Having another enemy causes 1 of 2 problems. If I use the steal ability on enemy 2 first it doesn't do anything, however it still works on enemy 1 just fine. The other problem is that if I use it one enemy 1 first, it works just fine, but than if I try to use it on enemy 2. It just displays the, "The Enemy has Nothing" message, even though I haven't stolen from that enemy yet.
I don't turn the switches off after the event has run, because if I turn the switches off it crashes the game, and won't let me do anything
Any help that may allow me to make this work, would be greatly appreciated.
Thank You,