Help - Search - Members - Calendar
Full Version: Steal eventing glitch
RPG RPG Revolution Forums > Game Engines > RPG Maker 2000 / 2003
Biohazard
I evented a steal system to steal items from enemies during battle. It was originally written by someone on a different forum, but I tweaked it a little bit because they made it so you stole a 'chest' that you could open after battle for a random item. I changed it so that I could steal a different item directly from each enemy. It works fine with my adjustments, it knows if the enemy has an item, has been stolen from, etc. However it performs the animations, sounds, and item change, even before the character 'uses' steal and appears on top of the screen, when it should go the other way around. If you'd like to see the event, here it is. It is triggered by Turns Elapsed [1x], btw.



Branch if Switch [Steal_GO] is ON

Switch Operation: [Steal_GO] OFF

Comment: Steal was called, check to see if monster 1 was targetted

Branch if 1:Slime Targetted

Comment: Has monster 1 been stolen from already?

Branch if [StealTarget1_DONE] is ON

Comment: Show the Has no item animation

Show Battle Animation: [Has no item!], 1:Slime

: Else Handler

Comment: This is the actual Steal code

Variable Operation: [XXXX: AGL_Monster] Set 1:Slime Agility

Variable Operation: [XXXX: AGL_Monster] + Var[XXXX: AGL_Hero]'s value

Variable Operation: [XXXX: StealRnd] Set, Rnd [80-120]

Variable Operation: [XXXX: AGL_Hero] * Var[XXXX: StealRnd]'s value

Variable Operation: [XXXX: AGL_Hero] / Var[XXXX: AGL_Monster]'s value

Variable Operation: [XXXX: RandomNumber] Set, Rnd[1-100]

Branch if [XXXX: RandomNumber] is [XXXX: AGL_Hero] Less/Equal

Comment: Steal Attempt was successful!!

Message: Stole Potion x1!

Change Items: Potion 1 Add

Switch Operations: [StealTarget1_DONE] ON

Show Battle Animation: Steal Successful!

: Else Handler

Show Battle Animation: Couldn't Steal!

: End

: End

: End

Comment: If there was more than one monster, the code for that monster would go here.
: End

It generally works by turning on switches to check if each enemy 1-8 have been stolen from, if so successfully, you cannot steal from them again. The bulk of it is an algorithm to determine success rate.


Edit: I can also link you to the original post, I would ask for help there, but I'd prefer not to necropost from '07.
http://rpgmaker.net/tutorials/13/
Shaddow
I'm not too familiar with eventing in 2000/2k3, but what if you changed around the event in the 'steal successful' section to look more like this:

Show Battle Animation: Steal Successful!

Message: Stole Potion x1!

Change Items: Potion 1 Add

Switch Operations: [StealTarget1_DONE] ON

I'm not 100% sure that will work, but the only thing you are looking to fix, is make the animation and sound effects happen prior to actually being stolen from, right? If I read this event correctly, that SHOULD work.

bulmabriefs144
Here's what I did. I had an experience outside of battle system, and things like money were done with a random number and a monster (multiplier) variable. With me so far? Well, the monster number is reused for the steal system, that is you can only steal as many times as there are monsters. Now if you want a situation where stealing happens only once regardless of how many enemies there are, just change this number to 1.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.