Help - Search - Members - Calendar
Full Version: [Help] Deduct a variable at the end of battle
RPG RPG Revolution Forums > Scripting > Event Emporium
orcywoo6
Ok so I am creating a complicated monster taming system for my current project that involves a variable being set to 1 at the beginning of the battle to tell the common event when the tame skill is used what monster type you are battling against so that the correct monster is tamed.

The problem is I need this variable to be set back to 0 after the battle has ended so that other monsters can be tamed. I cannot seem to find a way to do this...

Any help is greatly appreciated. rolleyes.gif
Xarak
One way to do this is to have a common event that is always running (i.e. is a "parallel process" set to be on whenever a junk switch is on).
To do this, go into the common event tab in the database, create a new common event, set the trigger to "Parallel Process", create a new switch with any name and set the common event to require it to be on, and the common event will have one line of code:
Control Variables: [XXXX: Taming Var] = 0

And technically, that should work. Note: Since common events only run on maps, this should mean that the variable you're using for that taming thing will always be 0 on the map.
Hope I helped.
orcywoo6
QUOTE (Xarak @ Jun 26 2010, 12:21 AM) *
One way to do this is to have a common event that is always running (i.e. is a "parallel process" set to be on whenever a junk switch is on).
To do this, go into the common event tab in the database, create a new common event, set the trigger to "Parallel Process", create a new switch with any name and set the common event to require it to be on, and the common event will have one line of code:
Control Variables: [XXXX: Taming Var] = 0

And technically, that should work. Note: Since common events only run on maps, this should mean that the variable you're using for that taming thing will always be 0 on the map.
Hope I helped.


Ok I will try this and get back to you with the results. Thank you smile.gif


EDIT: Thanks Xarak it worked a charm smile.gif
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.