Okay here's what i need. In The Legend of Zelda: Ocarina of Time, your
fairy, Navi, will give you help when you need it or when you lock on to an
enemy.
Can anyone get/make me a script that gives the player a hint when a
button is pressed? That would help me out A LOT with my game. Thanks.
With RM2K3, you can do this easily by key imput processing. But that was a major feature they shouldn't have taken out for RMXP.
SO how about just do it with many switches. In the area where you get the hint, put an event on every square where you would get the hint, make it on key press, and then when its done giving the hint, turn on the switch. And if you want it to make a sound, you would need to make about 2 more switches so that you don't hear "Hey" in an anoying voice on every place you step.If you want navi to fly around you, ask someone else, or put it in the charset.
Making that many events on one map would make the whole game run
EXTREMELY slow. Like...slower than dial-up slow. LOL
But that thought did cross my mind.
This is for if the shift key is pressed down on the map, you'll have to get someone else to do the battle thing for you, I'm supposed to be taking notes right now lol.
Insert this with all the other window scripts.
class Window_Navi_Tip < Window_Base
attr_accessor :tip
def initialize
super(0,400,640,80)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = 'Times New Roman'
self.contents.font.size = 22
@tip = '' unless $tip.nil? != true and $tip != ''
@tip = $tip unless @tip.nil? != true
give_tip
end
def give_tip
self.contents.clear
self.contents.font.color = normal_color
w = self.contents.width
h = self.contents.height
self.contents.draw_text(0,0,w,h,@tip,0)
wait
end
def wait
loop do
self.update
if Input.press?(Input::C)
break
end
end
self.dispose
end
def update
Graphics.update
end
end
then add this in the update definition of Scene_Map
if Input.press?(Input::A)
navi_tip = Window_Navi_Tip.new
end
The tip is automaticly ' ' unless you make it something else, to change the tip, simply use
$tip = 'text here'
If that doesn't work, notify me, give me the error, etc.
EDIT: forgot to say that you just press the space bar/enter/etc. to get it to go away again
Lol, I remember I tried doing this once with events.
Except you could set the fairy on Attack, Defense, and Support mode.
There was some bug in it though.. I can't remember.
Interesting idea, ArkBennet.
Tsuno, nothing happens when I push the button. :|
Quote from: Master_of_TimeMaking that many events on one map would make the whole game run
EXTREMELY slow. Like...slower than <a style='text-decoration: none; border-bottom: 3px double;' href="http://www.qklinkserver.com/lm/rtl3.asp?si=92&k=dial%20up&st=1" onmouseover="window.status='Search for: dial-up'; self.ql_skeyphrase='dial%20up'; if(window.event) self.ql_sevent=window.event.srcElement; self.ql_timeout = setTimeout('ql_doMouseOver(1)', 1000); self.ql_isOverLink=true; return true;" onclick="if(self.ql_timeout) clearTimeout(self.ql_timeout); self.ql_isOverTip = false; ql_closeiframe(); self.ql_skeyphrase='dial%20up'; window.status='Search for: dial-up';return true;" onmouseout="window.status=''; if(self.ql_timeout) clearTimeout(self.ql_timeout); self.ql_isOverTip = false; setTimeout('ql_closeiframe()', 1500); ">dial-up</a> slow. LOL
But that thought did cross my mind.
Only if you get a bjillion hints in every map.
Dangit, why does that keep happening when I try to quote?!
Quote from: Master_of_TimeInteresting idea, ArkBennet.
Tsuno, nothing happens when I push the button. :|
Are you pressing shift?
Yes I am.
I set the hint to say "Hello!" just to test it, but nothing happens. :|
Quote from: Master_of_TimeYes I am.
I set the hint to say "Hello!" just to test it, but nothing happens. :|
I'll test it tomorrow (or at least try to).
I'm going to a solo/small ensemble competition from 6:30 Am - 5:00 Pm tomorrow, and I think my grandparents are picking me up.
EDIT: correction, my dad is picking me up, so sometime next week I'll fix it
I apologize for the delay.
Just tweaked, tested, and fixed.
Put this with the other window_scripts.
class Window_Navi_Tip < Window_Base
attr_accessor :tip
def initialize
super(0,400,640,80)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = 'Times New Roman'
self.contents.font.size = 22
@tip = '' unless $tip.nil? != true and $tip != ''
@tip = $tip unless @tip.nil? != true
give_tip
end
def give_tip
self.contents.clear
self.contents.font.color = normal_color
w = self.contents.width
h = self.contents.height
self.contents.draw_text(0,0,w,h,@tip,0)
wait
end
def wait
loop do
self.update
if Input.press?(Input::A)
break
end
end
self.dispose
end
def update
Graphics.update
Input.update
end
end
then add this in the update definition of Scene_Map
if Input.press?(Input::A)
navi_tip = Window_Navi_Tip.new
end
The tip is automaticly ' ' unless you make it something else, to change the tip, simply use
$tip = 'text here'
Press shift to see the tip, and press shift again to make it go away.
Thanks, Tsuno. :D
K'ya, I was thinking I might want to use this too, yet this is the second script I would be fidling with, where evectly do I go about putting these?
Quote from: Aus Ace LeaderK'ya, I was thinking I might want to use this too, yet this is the second script I would be fidling with, where evectly do I go about putting these?
The window script itself can just be put above main, but for sake of orginization, it's recommended to insert it with all the other window scripts.
For the part that's needed in Scene_Map's update method, just find.
def update
in the script Scene_Map
and past the lines bellow it.
You can change the tip through the script event command.
You can change what button is needed to close the window (which is recomended because the window accepts input quickly and will probably be closed and opened again, etc. if you press the button too long and it's the same used to both open and close it *inhales*)
Just find this part in the window script itself.
if Input.press?(Input::A)
break
endand replace the A with another letter -
A = shift
C = space, enter, etc.
there's others, but it would make sense to just choose one or the other.