FL
Pokémon Island Creator
- 2,544
- Posts
- 14
- Years
- Seen yesterday
I tried to use this but when i try this script it directly goes in battle without selection.
Can you write a example script? with battle.
# To this script works, put it above main and use in script command # 'PokemonSelection.choose(min, max, canCancel, acceptFainted)'
Follow the instructions. Notice n the first post:
I tried to use this but when i try this script it directly goes in battle without selection.
Can you write a example script? with battle.
PokemonSelection.choose(3,3)
pbTrainerBattle(
PBTrainers::YOUNGSTER,"Ben",
_I("\bAww, I lost."))
PokemonSelection.restore
Pokécommunity is breaking my scripts. How to solve this:Little help with this...
Tried to follow instructions here but I'm getting a
'PokemonSelection' Line60:SyntaxError
I'm trying to set it up so that you can enter a 'Fighting Type' only contest, and I have put in all the species allowed to compete and placed it above Main in the scripts sections,
ADVICE PLEASE???
Or use the thread print url: https://www.pokecommunity.com/printthread.php?t=290931Click Thread Tools, and then Show Printable Version, and copy that instead.
# This class uses a type array that only allows the pokémon as valid if it
# has one of these types when bannedTypes=false or the reverse
# when bannedTypes=true
class TypeRestriction
def initialize(types, bannedTypes=true)
@types=types
@bannedTypes = bannedTypes
end
def isValid?(pokemon)
ret=false
for singleType in @types
if pokemon.hasType?(singleType)
ret = true
break
end
end
ret = !ret if @bannedTypes
return ret
end
end
Ah that's got rid of the error nicely! Thanks.
What script exactly would I need to use to open the battle now?
Tried the one suggested near the start of the thread but that's giving me a large error now in game
PokemonSelection.choose(3,3)
pbTrainerBattle(
PBTrainers::YOUNGSTER,"Ben",
_I("\bAww, I lost."))
PokemonSelection.restore
When "canCancel" is false, the player is prompt to select the pokémon again when pressing cancel. This is happening? If so, the system was worked as should be.Great script! I have a couple questions / issues. I am using essentials 17.2 and I have installed all scripts as instructed and everything seems to be working except one thing. Even with it set to not be able cancel the selection I am still able to do so in game. Any idea what the issue might be?
[Pokémon Essentials version 17.2]
Exception: RuntimeError
Message: Script error within event 28 (coords 23,2), map 3 (Wolf's house):
Exception: NoMethodError
Message: Elite Battle Battle:148:in `pbStartBattleCore'undefined method `sendingOut=' for #<PokeBattle_DebugSceneNoLogging:0xa4f8a18>
***Full script:
PokemonSelection.choose(1,6,true,false)
Interpreter:243:in `pbExecuteScript'
PokeBattle_Battle:2413:in `pbStartBattle'
PokeBattle_BattleRecord:59:in `pbStartBattle'
PBattle_OrgBattleGenerator:1020:in `pbRuledBattle'
PBattle_OrgBattleGenerator:1383:in `pbGenerateChallenge'
PBattle_OrgBattleGenerator:1375:in `times'
PBattle_OrgBattleGenerator:1375:in `pbGenerateChallenge'
PBattle_OrgBattleGenerator:1373:in `loop'
PBattle_OrgBattleGenerator:1403:in `pbGenerateChallenge'
PBattle_OrgBattleGenerator:1339:in `times'
Interpreter:276:in `pbExecuteScript'
Interpreter:1606:in `command_355'
Interpreter:494:in `execute_command'
Interpreter:193:in `update'
Interpreter:106:in `loop'
Interpreter:198:in `update'
Scene_Map:163:in `updateold'
Scene_Map:161:in `loop'
Scene_Map:170:in `updateold'
Unreal Time System:151:in `update'
Pass 'canCancel' parameter as true. The method return 'false' if cancelled, use this on a conditional to skip the battle.If i press cancel. I still have to choose pokemon?? I want that cancel button to cancel the battle.
Can anyone that has had the same problem tell me how to fix it?