I am trying to create a mini game to get from one location to another in a set of tiles. However, the challenge is that each step you walk on a certain tile, the pokemon party will randomly get a poison status e.g or deduct 1hp for all party. I am thinking of creating a script for each factor.
I understand , we need to play around the PField_Field under the section field movement. But I do not understand what the codes are saying.
next if handled
if $PokemonGlobal.stepcount % 4 == 0 && POISONINFIELD
for i in $Trainer.party
if i.status==PBStatuses::POISON && i.hp>0 && !i.isEgg? &&
if i.hp==1 && !POISONFAINTINFIELD
handled=true if pbAllFainted
5. Copy and Paste these events towards your desired places!
Note: If all party Pokémon have fainted, add a Parallel Process event. Inside the Parallel Process event, add a Conditional Branch "$Trainer.ablePokemonCount>0". Under "Else" put your message notifying that the player is out of usable Pokémon. Then transfer the player out of the map and add "Recover All: Entire Party" (Pokémon Center Script).
Note 2: Do not use Erase Event if you want the party to get hurt on the same spot. You may add a Screen Flash, Sound Effect, Picture, etc. to spice things up a little.
Sorry, this is totally unrelated but learning how this random choice generator function works helped me solve a question I had about generating a random question for a trivia quiz mini-game. Thank you for posting! And I hope you got what you needed as well Blackmamba.