You should consider joining our Discord to ask for support.

We created a support channel using the new Discord Forum feature!

You can also visit our new website, it has a help section in English and French

0 like 0 dislike
370 views
in Script help by (330 points)
Bonjour à tous,

comme vous pouvez lire dans le titre je suis entrain de créer un move tutor pour apprendre draco météore.

Dans mon event actuel ça marche si le joueur est intelligent mais comme j'ai appris en programmation, il faut faire comme si tout le monde était stupide haha.

Donc je voudrais vérifier si le pokémon qu'il a sélectionné peut apprendre l'attaque (si elle est contenu dans son movepool). Je pensais à utiliser la fonction can_learn? mais ça ne fonctionne pas.

Merci d'avance pour celui ou ceux qui m'aideront.

2 Answers

0 like 0 dislike
by (17.1k points)
Qu'entends-tu par "Ça ne fonctionne pas" ? Tu as des exemples ? Normalement cette méthode devrait être la bonne, donc si quelque chose est pété on peut voir ce qu'il se passe. :)
by (330 points)
Ah ce que dis l'erreur, il ne reconnait pas la fonction can_learn?

================================Erreur de script================================
Message :
undefined method `can_learn?' for #<Interpreter:0x10227ee8>

Type : NoMethodError
Script : (eval) (RMXP)
Ligne : 1
Date : 27/07/2022 19:00:20
Game Version : 256
Logiciel : Pokémon SDK 26.2
Script used by eval command :
can_learn?(:draco_meteor)

===================================Backtraces===================================
[25] : (eval) (RMXP) | ligne 1 eval_condition_script
[24] : 00600 Script_RMXP/02600 Interpreter_3.rb (PSDK) | ligne 206 eval
[23] : 00600 Script_RMXP/02600 Interpreter_3.rb (PSDK) | ligne 206 eval_condition_script
[22] : 00600 Script_RMXP/02600 Interpreter_3.rb (PSDK) | ligne 187 command_111
[21] : 00600 Script_RMXP/02500 Interpreter_2.rb (PSDK) | ligne 16 execute_command
[20] : 00600 Script_RMXP/02400 Interpreter_1.rb (PSDK) | ligne 132 update
[19] : 00600 Script_RMXP/02400 Interpreter_1.rb (PSDK) | ligne 100 loop
[18] : 00600 Script_RMXP/02400 Interpreter_1.rb (PSDK) | ligne 100 update
[17] : 01450 Systems/00003 Map Engine/00003 GamePlay/00200 Scene_Map.rb (PSDK) | ligne 171 auto_transfert_update
[16] : 01450 Systems/00003 Map Engine/00003 GamePlay/00200 Scene_Map.rb (PSDK) | ligne 168 loop
[15] : 01450 Systems/00003 Map Engine/00003 GamePlay/00200 Scene_Map.rb (PSDK) | ligne 168 auto_transfert_update
[14] : 01450 Systems/00003 Map Engine/00003 GamePlay/00200 Scene_Map.rb (PSDK) | ligne 21 update
[13] : 00700 Ajout_PSDK/00002 FPSBalancer.rb (PSDK) | ligne 44 times
[12] : 00700 Ajout_PSDK/00002 FPSBalancer.rb (PSDK) | ligne 44 run
[11] : 01450 Systems/00003 Map Engine/00003 GamePlay/00200 Scene_Map.rb (PSDK) | ligne 21 update
[10] : 01450 Systems/00000 General/00003 GamePlay__Base/00000 GamePlay__Base.rb (PSDK) | ligne 260 main_process
[9] : 01450 Systems/00000 General/00003 GamePlay__Base/00000 GamePlay__Base.rb (PSDK) | ligne 153 main
[8] : tools/GameLoader/Z_main.rb (PSDK) | ligne 17 <top (required)>
[7] : tools/GameLoader/3_load_extensions.rb (PSDK) | ligne 54 rgss_main
[6] : tools/GameLoader/50_load_game_uncompiled.rb (PSDK) | ligne 45 <top (required)>
[5] : ScriptLoad.rb (PSDK) | ligne 189 require
[4] : ScriptLoad.rb (PSDK) | ligne 189 load_tool
[3] : tools/GameLoader/Z_load_uncompiled.rb (PSDK) | ligne 14 <top (required)>
[2] : ScriptLoad.rb (PSDK) | ligne 189 require
[1] : ScriptLoad.rb (PSDK) | ligne 189 load_tool
[0] : Game.rb (RMXP) | ligne 11 <main>
===================================Fin du log===================================
by (14.8k points)
C'est une méthode reliée à ton équipe, pas à Interpreter. Regarde la démo de PSDK, le PNJ dans la forêt en bas à droite.
by (330 points)
Le pnj apprend une attaque au premier pokemon de l'equipe ça je sais faire, c'est vérifié s'il peut l'apprendre que je sais pas fair
0 like 0 dislike
by (14.8k points)
C'est une méthode reliée à ton équipe, pas à Interpreter. Regarde la démo de PSDK, le PNJ dans la forêt en bas à droite.
...