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

The PokéCommunity

Go Back     The PokéCommunity Forums > Create & Discover > Game Development > Pokémon Essentials Question Making an item with the effect of Flash

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 August 12th, 2013 (2:23 PM).
Ookiiushidesu's Avatar
Ookiiushidesu Ookiiushidesu is offline
Lead Mapper/Eventer at Gen0
 
Join Date: Jan 2012
Age: 25
Gender: Male
Posts: 55
Send a message via Skype™ to Ookiiushidesu
Title is pretty self-explanatory. Do you know where the Flash effect stuff is and how I could make an item, kind of like a torch, that has the effect of Flash?

A one-use item, though.

Thanks!
~TBC
Reply With Quote

Relevant Advertising!

  #2    
Old August 12th, 2013 (2:38 PM).
Pia Carrot's Avatar
Pia Carrot Pia Carrot is offline
Gen II Hacker | PHO Enthusiast
 
Join Date: Aug 2010
Age: 20
Gender: Male
Nature: Adamant
Posts: 579
http://www.pokecommunity.com/showpos...24&postcount=8

FL has also made a tutorial if I'm not mistaken. This question has been asked several times already.




Reply With Quote
  #3    
Old August 12th, 2013 (2:41 PM).
Ookiiushidesu's Avatar
Ookiiushidesu Ookiiushidesu is offline
Lead Mapper/Eventer at Gen0
 
Join Date: Jan 2012
Age: 25
Gender: Male
Posts: 55
Send a message via Skype™ to Ookiiushidesu
Quote:
Originally Posted by Evil Arms View Post
http://www.pokecommunity.com/showpos...24&postcount=8

FL has also made a tutorial if I'm not mistaken. This question has been asked several times already.
He says he hasn't handled Flash yet.

I didn't know it was asked before. I figured it would be an obscure thing XD Sorry. I did find the tutorial by FL, but I don't quite get it. I'm kinda dumb with code XD
~TBC
Reply With Quote
  #4    
Old August 12th, 2013 (2:46 PM).
Pia Carrot's Avatar
Pia Carrot Pia Carrot is offline
Gen II Hacker | PHO Enthusiast
 
Join Date: Aug 2010
Age: 20
Gender: Male
Nature: Adamant
Posts: 579
It's not hard to figure out yourself, it functions pretty much the same, structurally. I'm assuming you're trying to add a candle or a flashlight of a sort.




Reply With Quote
  #5    
Old August 12th, 2013 (2:51 PM).
Ookiiushidesu's Avatar
Ookiiushidesu Ookiiushidesu is offline
Lead Mapper/Eventer at Gen0
 
Join Date: Jan 2012
Age: 25
Gender: Male
Posts: 55
Send a message via Skype™ to Ookiiushidesu
The example given was for a surfboard. That still seems like it was an unlimited-use item. I need it to be a single-use item.

But yeah, like a torch thingy. Something to give the player early on before Flash to get through one way, but then if they go back through I don't want that advantage there.

It is just written kinda vaguely and I'm not sure where he has the different code being edited and stuff.
~TBC
Reply With Quote
  #6    
Old August 12th, 2013 (3:33 PM).
Pia Carrot's Avatar
Pia Carrot Pia Carrot is offline
Gen II Hacker | PHO Enthusiast
 
Join Date: Aug 2010
Age: 20
Gender: Male
Nature: Adamant
Posts: 579
Quote:
Originally Posted by Ookiiushidesu View Post
The example given was for a surfboard. That still seems like it was an unlimited-use item. I need it to be a single-use item.

But yeah, like a torch thingy. Something to give the player early on before Flash to get through one way, but then if they go back through I don't want that advantage there.

It is just written kinda vaguely and I'm not sure where he has the different code being edited and stuff.
Ah, it needs to be consumed then. You can reference the Escape Rope code for that.




Reply With Quote
  #7    
Old August 12th, 2013 (3:35 PM).
Ookiiushidesu's Avatar
Ookiiushidesu Ookiiushidesu is offline
Lead Mapper/Eventer at Gen0
 
Join Date: Jan 2012
Age: 25
Gender: Male
Posts: 55
Send a message via Skype™ to Ookiiushidesu
Alrighties. I'm still not entirely sure where to put the code and everything, though.

And then again there's the terrible issue updating from V11 essentials to 12.... -bleeeeeeep-
~TBC
Reply With Quote
  #8    
Old August 12th, 2013 (3:36 PM).
Pia Carrot's Avatar
Pia Carrot Pia Carrot is offline
Gen II Hacker | PHO Enthusiast
 
Join Date: Aug 2010
Age: 20
Gender: Male
Nature: Adamant
Posts: 579
I believe you should also copy the Escape Rope line in items.txt, one of those values means to be consumed if I recall correctly.




Reply With Quote
  #9    
Old August 12th, 2013 (5:53 PM).
Ookiiushidesu's Avatar
Ookiiushidesu Ookiiushidesu is offline
Lead Mapper/Eventer at Gen0
 
Join Date: Jan 2012
Age: 25
Gender: Male
Posts: 55
Send a message via Skype™ to Ookiiushidesu
Yeah I understand that part, but I don't get where the tutorial is saying to put the different code and where to get the other stuff. I wish it was more concise.
~TBC
Reply With Quote
  #10    
Old August 12th, 2013 (6:06 PM).
Pia Carrot's Avatar
Pia Carrot Pia Carrot is offline
Gen II Hacker | PHO Enthusiast
 
Join Date: Aug 2010
Age: 20
Gender: Male
Nature: Adamant
Posts: 579
PokemonItemEffects is where it should go if you are adding a new item (usable from the bag). You should see other items such as the escape rope. There should be two instances. Under each instance is where you should put your code. Reference the surrounding code for format.




Reply With Quote
  #11    
Old August 12th, 2013 (6:18 PM).
Ookiiushidesu's Avatar
Ookiiushidesu Ookiiushidesu is offline
Lead Mapper/Eventer at Gen0
 
Join Date: Jan 2012
Age: 25
Gender: Male
Posts: 55
Send a message via Skype™ to Ookiiushidesu
Ok. That makes sense. I figure that part would be like adding a new time frame under PokemonTime. But like where do I get the code for Flash to put under the Item effect?

Would it look like this example? (The example FL uses with the surfboard using Surf)

Spoiler:
ItemHandlers::UseFromBag.add(:YOURITEMINTERNALNAME,proc{|item|
next canUseMoveSurf? ? 2 : 0
})

ItemHandlers::UseInField.add(:YOURITEMINTERNALNAME,proc{|item|
useMoveSurf if canUseMoveSurf?
})
~TBC
Reply With Quote
  #12    
Old August 12th, 2013 (6:21 PM).
Pia Carrot's Avatar
Pia Carrot Pia Carrot is offline
Gen II Hacker | PHO Enthusiast
 
Join Date: Aug 2010
Age: 20
Gender: Male
Nature: Adamant
Posts: 579
Thing is, Surf and Flash are two different functions. They probably behave differently. Surf functions against tiles with a terrain tag of 5 while flash functions when a map has a cave setting on.

Quote:
HiddenMoveHandlers::UseMove.add(:FLASH,proc{|move,pokemon|
darkness=$PokemonTemp.darknessSprite
return false if !darkness || darkness.disposed?
if !pbHiddenMoveAnimation(pokemon)
Kernel.pbMessage(_INTL("{1} used {2}!",pokemon.name,PBMoves.getName(move)))
end
$PokemonGlobal.flashUsed=true
while darkness.radius<176
Graphics.update
Input.update
pbUpdateSceneMap
darkness.radius+=4
end
return true
})
I imagine that is going to help with what you'll need. Sorry I'm not much concrete help, I've yet to attempt adding Flash as an item myself.




Reply With Quote
  #13    
Old August 12th, 2013 (6:46 PM).
Ookiiushidesu's Avatar
Ookiiushidesu Ookiiushidesu is offline
Lead Mapper/Eventer at Gen0
 
Join Date: Jan 2012
Age: 25
Gender: Male
Posts: 55
Send a message via Skype™ to Ookiiushidesu
Yeah that should help somewhat at least Thanks. I actually think a cooler way would be to have a guy make his Pokemon use flash for you. So you talk to him and it happens. I tried clicking the script command in the event and put in a line or two in it but the game crashed when I tried activating it.

Would you know a way to put the darkness radius increase in an event? I tried just pasting the darknessradius+=4 thing, but it didn't work either.
~TBC
Reply With Quote
  #14    
Old August 12th, 2013 (6:59 PM).
Pia Carrot's Avatar
Pia Carrot Pia Carrot is offline
Gen II Hacker | PHO Enthusiast
 
Join Date: Aug 2010
Age: 20
Gender: Male
Nature: Adamant
Posts: 579
In an event? I would assume you'd have to make a new command for that. I think someone like Maruno would be more help here.




Reply With Quote
  #15    
Old August 12th, 2013 (7:07 PM).
Ookiiushidesu's Avatar
Ookiiushidesu Ookiiushidesu is offline
Lead Mapper/Eventer at Gen0
 
Join Date: Jan 2012
Age: 25
Gender: Male
Posts: 55
Send a message via Skype™ to Ookiiushidesu
Okay. I can just mess around with the item and stuff for now.
~TBC
Reply With Quote
  #16    
Old August 13th, 2013 (4:08 AM).
Nickalooose Nickalooose is offline
--------------------
 
Join Date: Mar 2008
Gender: Female
Posts: 1,280
So are you no longer using an item?
Because Pokémon who can learn flash... Already works how you changed your mind to!
I've been watching this post, but Evil Arms has been doing a fine job helping you... But now I'm confused.
Reply With Quote
  #17    
Old August 13th, 2013 (10:18 AM). Edited August 13th, 2013 by Luka S.J..
Luka S.J.'s Avatar
Luka S.J. Luka S.J. is offline
Jealous Croatian
 
Join Date: Dec 2008
Location: Croatia
Age: 22
Gender: Male
Nature: Adamant
Posts: 1,002
Code:
ItemHandlers::UseFromBag.add(:TORCH,proc{|item|
   darkness=$PokemonTemp.darknessSprite
   next 0 if !darkness || darkness.disposed?
   Kernel.pbMessage(_INTL("{1} used the {2}.",$Trainer.name,PBItems.getName(item))
   $PokemonGlobal.flashUsed=true
   next 4
   while darkness.radius<176
     Graphics.update
     Input.update
     pbUpdateSceneMap
     darkness.radius+=4
   end
})
Does this solve your dilema? Just put it in PokemonItemEffects.
Reply With Quote
  #18    
Old August 13th, 2013 (4:09 PM).
FL's Avatar
FL FL is offline
Pokémon Island Creator
 
Join Date: Sep 2010
Gender: Male
Posts: 1,552
Quote:
Originally Posted by Evil Arms View Post
Thing is, Surf and Flash are two different functions. They probably behave differently. Surf functions against tiles with a terrain tag of 5 while flash functions when a map has a cave setting on.



I imagine that is going to help with what you'll need. Sorry I'm not much concrete help, I've yet to attempt adding Flash as an item myself.
I didn't tested with all HMs, but I believe that my tutorial works with all HMs effects since every one has a 'CanUseMove' and an 'UseMove' proc.

If there's something that someone doesn't understand in one of my tutorials/scripts, just ask.
Reply With Quote
  #19    
Old August 13th, 2013 (4:59 PM).
Rayd12smitty's Avatar
Rayd12smitty Rayd12smitty is offline
Shadow Maker
 
Join Date: Dec 2011
Gender: Male
Posts: 647
I feel like you have your answer with what Luka said but if you still need it, and want an event, just call this script.

Code:
darkness=$PokemonTemp.darknessSprite
return false if !darkness || darkness.disposed?
$PokemonGlobal.flashUsed=true
while darkness.radius<176
  Graphics.update
  Input.update
  pbUpdateSceneMap
  darkness.radius+=4
end
Reply With Quote
  #20    
Old August 18th, 2013 (11:39 AM).
Ookiiushidesu's Avatar
Ookiiushidesu Ookiiushidesu is offline
Lead Mapper/Eventer at Gen0
 
Join Date: Jan 2012
Age: 25
Gender: Male
Posts: 55
Send a message via Skype™ to Ookiiushidesu
Thank you guys SO MUCH!!!!! You've helped tremendously and also helped make Viridian Forest that much more awesome now. Thank you!!!!

Anyone can lock this, now.
~TBC
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 6:01 PM.


Contact Us Archive Privacy Statement Terms of Service Top