< >
Hello, guest! Please log in or register.

The PokéCommunity

Go Back     The PokéCommunity Forums > Create & Discover > Game Development > Pokémon Essentials Question Some questions about Wild battle

Notices

Pokémon Essentials All questions and discussion about Pokémon Essentials, the Pokémon game kit for RPG Maker XP, go in here. Also contains links to the latest downloads and the Essentials Wiki.

Reply Post Reply
 
Thread Tools
  #1    
Old April 1st, 2013 (8:17 AM).
Littleroot's Avatar
Littleroot Littleroot is offline
...
 
Join Date: Jul 2012
Gender: Male
Nature: Adamant
Posts: 32
Hey, in RSE versions, when you're battling a zigzagoon, you can't flee, but the text is not "Can't escape", like in the essentials, there is another way to edit the text than editing the script? (i dont want this text permanent, just for this battle), and when the player's lifebar is in red color the wild pokemon flees.

how can i do it? (that the wild pokemon flees and to change the text when can't escape).

Thanks!
Reply With Quote

Relevant Advertising!

  #2    
Old April 1st, 2013 (9:47 AM).
Maruno's Avatar
Maruno Maruno is offline
Lead Dev of Pokémon Essentials
 
Join Date: Jan 2008
Location: England
Posts: 5,113
You could always do the old favourite of using a Global Switch to decide whether this is your special battle, and display a different message if so. It's simple enough to set up. It'll be the first "Can't escape!" message in def pbRun.

You can set up a wild battle as one which the player can't ever escape from. Check the wiki.

The wild Pokémon fleeing is slightly more involved, but it works on the same principle. Check the def pbProcessTurn and copy-paste the "alwaysrun" bit (which is used for roaming Pokémon) and make it apply only while the Switch is ON and the player's Pokémon is weak.
Reply With Quote
  #3    
Old April 1st, 2013 (12:15 PM).
Maruno's Avatar
Maruno Maruno is offline
Lead Dev of Pokémon Essentials
 
Join Date: Jan 2008
Location: England
Posts: 5,113
I didn't tell you to put anything in pbBeginTurn.

Try using pbOpposing1.hp (I assume it'll be a single battle). Also, you've done the "if" statement wrong (you've deleted the hp check and some &&).
Reply With Quote
  #4    
Old April 2nd, 2013 (12:37 AM).
Littleroot's Avatar
Littleroot Littleroot is offline
...
 
Join Date: Jul 2012
Gender: Male
Nature: Adamant
Posts: 32
i made it like that, below the original one, because i wanted to change the text (if i used "Or" statement it showed me only "fled" in the battle.

Quote:
if [email protected] && @battle.rules["alwaysflee"] && self.hp>0 &&
@battle.pbIsOpposing?(self.index) && @battle.pbCanRun?(self.index)
pbBeginTurn(choice)
@battle.pbDisplay(_INTL("{1} fled!",self.pbThis))
@battle.decision=3
pbEndTurn(choice)
return
end
if $game_switches[55] && pbOpposing1.hp<4
pbBeginTurn(choice)
@battle.pbDisplay(_INTL("Wild Zigzagoon fled!"))
@battle.decision=3
pbEndTurn(choice)
return
end
It works, almost, the wild zigzagoon flees when his hp is low than 4, not when the player's hp is low than 4, i tried to change the pbOpposing1 to pbOppsing2 and then again to pbOppsing0, and it didnt work.
(sry about my english, this is my second language)
Reply With Quote
  #5    
Old April 2nd, 2013 (3:53 AM).
Maruno's Avatar
Maruno Maruno is offline
Lead Dev of Pokémon Essentials
 
Join Date: Jan 2008
Location: England
Posts: 5,113
Oh, so you did put it in the right place.
Code:
    if [email protected] &&
       $game_switches[55] && self.hp>0 && self.pbOpposing1.hp<=(self.pbOpposing1.totalhp/4) &&
       @battle.pbIsOpposing?(self.index) && @battle.pbCanRun?(self.index)
      pbBeginTurn(choice)
      @battle.pbDisplay(_INTL("{1} fled!",self.pbThis))
      @battle.decision=3
      pbEndTurn(choice)
      return
    end
Use that. Your problem was that you'd deleted the @battle.pbIsOpposing?(self.index) bit, which meant that, in your game, the fleeing happened when either Pokémon reached a low HP, not just the wild Pokémon.

The displayed message in my code will be "The wild Zigzagoon fled!", so you don't need to change it.
Reply With Quote
  #6    
Old April 2nd, 2013 (4:14 AM).
Littleroot's Avatar
Littleroot Littleroot is offline
...
 
Join Date: Jul 2012
Gender: Male
Nature: Adamant
Posts: 32
i didnt knew how to do this only for the opponent, i'm not new in ruby, but i am new in essentials, Thannk you
Edit: Works perfect
Reply With Quote
Reply Post Reply
Quick Reply

Sponsored Links
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


  All times are GMT -8. The time now is 7:35 PM.


Contact Us Archive Privacy Statement Terms of Service Top