Jump to content

Pokemon A - Problem with Cut Script


ego

Recommended Posts

Hello there,

 

I just started creating my own Pokemon Fan-Game.... or more like a demo.... actually atm I'm just trying out stuff to learn how things work and if it works the way I imagine.

So I started to modify the script for the HM Cut, so that it would allow other moves except cut to be used. I followed this tutorial: http://pokemonessentials.wikia.com/wiki/Tutorial:Adding_new_move_effects_outside_battle

I changed the script accordingly, so at you could use ember as well (for testing reasons only). In game it allows me to cut trees without a pokemon knowing cut, but with my Litwick knowing Ember. Here's the twist: When I confirm that I want to use cut it says "[Player] used cut.". No Pokemon moving over the screen. Just that message and a cut tree. If I hit "No" it asks me again if I'd like to cut the tree and if I confirm, it tells me "[Pokemon] used Ember" and it also plays the animation the way its supposed to.

Anyone an idea what the problem might be?

 

Thanks for your help.

 

Here's my modified script

  Reveal hidden contents

 

Link to comment
Share on other sites

Hello o/

 

Basically why you're getting that is because you're testing it in DEBUG mode via rpg maker (when you do it like that your character will be able to use all hms by itself).

 

Best way to test hm changes and most of the changes in the game is by playing the game without the debug mode.

 

Also you'll have to change the script in the beginning a bit so you won't get errors, should be something like these:

 

  Quote

def Kernel.pbCut
  possiblemoves=[:CUT,:EMBER]
     if $DEBUG || $Trainer.badges[BADGEFORCUT]
    for i in possiblemoves
   move=getID(PBMoves,i)
   movefinder=Kernel.pbCheckMove(move)
    if movefinder

Expand  

 

also you can add these 2 lines so you can also use the move from the pokemon tab

HiddenMoveHandlers::CanUseMove.copy(:CUT,:EMBER)

HiddenMoveHandlers::UseMove.copy(:CUT,:EMBER)

 

add them so it looks like this

  Reveal hidden contents

 

also when testing make sure to add gym badge that is required for you to use cut (by default it is set to 1) or change the requirement to 0 in setting script section

jsut add a event with this script, and make sure to talk to it before trying cut :]

$Trainer.badges[1]=true

 

 

Have fun and good luck with your game o/

Link to comment
Share on other sites

Hey thanks for your help.

I found another problem when trying to test cut in the normal game. Was just a typo.

 

Anyway another 2 problems occured. First, when I talk to the tree while not having any batches it works the way it's supposed to BUT it will let me cut the tree if I use ember from the party screen. And there's the second problem: the animation of the tree being cut down isn't playing and it just disappears. This is still true if I got enough batches. Talking to the tree and cutting it works perfectly fine but not when doing so using the party screen.

Link to comment
Share on other sites

I don't understand your first problem.

 

For 2nd problem I get the animation when using ember from party screen. Could you post whole script again and try to explain it more?

Link to comment
Share on other sites

For the first problem...are you saying that you can cut down trees with ember, but it won't show up in the party screen (like cut would) or is it that it works from the Pokemon party screen showing the move, but won't show up in the menu. Those are two very, very different problems with different fixes for each.

 

For the animations issue, you either didn't add a property in, but I feel like it's more than likely a specific line of coding was deleted. I'm sure Njab has this covered from the looks of it, but when you have a problem you need to be very specific and upload the code so that we can look at it to figure out what is wrong. But since it functions but the animation is missing, we need to look at the animation code section itself.

Link to comment
Share on other sites

Sorry forgot the script.

Here's the updated script

  Reveal hidden contents

 

  On 5/2/2017 at 9:19 PM, Commander said:

you either didn't add a property in

Expand  

What do you mean?

 

  On 5/2/2017 at 9:19 PM, Commander said:

But since it functions but the animation is missing, we need to look at the animation code section itself.

Expand  


These are the event commands I'm using for the tree. They are excactly like the ones from Essentials.

 


 

  Reveal hidden contents

 

The first problem I was talking about:
You know in the original games, when a Pokemon knows cut it will show the move in the party screen. However if you don't have the requiered badge it will tell you "Sorry a new badge is required.". In my game it shows Ember in the party screen, just as it's supposed to be. But when I don't have the requiered badge, and choose to use Ember from the party screen, it will cut the tree even though I shouldn't be able to do so. I think it skipps the badge check.

 

Link to comment
Share on other sites

Turns out that in pokemon essentials there too is no animation for the tree if you use it from the party screen. So that one is solved. Kind of

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...