I want to basically a text show up when a specific script call is called automatically.
Textbox shows up when a scriptcall is called from another script?
RPG Maker VXAce SupportCould you be more explicit about this? Having your game display text when calling a method via script call can be done by adding something like
if you want your text to be displayed in the console or
if you want your text to be displayed in the game message box. Just add one of these lines at the end of your method and you will see when it is being called. If you want something else I am afraid you have to go deeper in the details.
Code:
puts "hit"
Code:
$game_message.add("hit")
Fiber.yield while $game_message.busy?
This script is not easy to mod. It might be more straightforward, unless you have dozens of quests, to put in a show text command in the event immediately after the script call, set to Middle - which is what I assume you did for the screenshot.
As an aside, 'received' is an exception to the rule of "i before e, except after c". It is a mistake that I see quite often.
As an aside, 'received' is an exception to the rule of "i before e, except after c". It is a mistake that I see quite often.
Modifying the line I wrote above like this:
will definitly do the trick. Don't forget to use
at the end of your code or the event keeps running while your message is being displayed.
Of course you can do as Kes said and add this line in a script command when you assign a quest or you can edit the script itself.
I could help you modifying your script but unfortunatly instructions are not what I need to modify it. Can you provide a link to the script?
Code:
$game_message.add("Quest Received!")
Code:
Fiber.yield while $game_message.busy?
Of course you can do as Kes said and add this line in a script command when you assign a quest or you can edit the script itself.
I could help you modifying your script but unfortunatly instructions are not what I need to modify it. Can you provide a link to the script?
please next reply
I'm making dozens of quests so I will be disregarding inserting texts for every quest recieved so I will need the script.
http://rmrk.net/index.php?topic=25533.0http://rmrk.net/index.php?topic=25533.0
http://rmrk.net/index.php/topic,45127.0.html
This should do the trick.
As written in the comment above I didn't look too carefully into the code. Remove that line if you have problems with it.
EDIT: I updated the code with a tested version. You have now access to your notification window background type and position.
Code:
class Game_Quests
alias setup_quest_old setup_quest
def setup_quest(id)
setup_quest_old(id)
# Change the following value to fit your needs
# [0] Normal, [1] Faded, [2] Transparent. Default is 1
$game_message.background = 1
# This is the position of your notification window. Feel free to change it. Default is 1.
# [0] Top, [1] Middle, [2] Bottom
$game_message.position = 1
$game_message.add("Quest Received!")
Fiber.yield while $game_message.busy?
end
end
As written in the comment above I didn't look too carefully into the code. Remove that line if you have problems with it.
EDIT: I updated the code with a tested version. You have now access to your notification window background type and position.
@Heirukichi
isn't a script call that exists in the script.
It does exist since I used an alias above. That way the previous reveal_quest is then called reveal_quest_old and every time some other method refers to the reveal_quest method it points to the new one instead.
However to let it work you have to put that code below Materials in your script editor and BELOW your quest journal script.
If you are interested in going deeper about alias here is a link.
However to let it work you have to put that code below Materials in your script editor and BELOW your quest journal script.
If you are interested in going deeper about alias here is a link.
@Heirukichi this happend
Sorry, my bad. I changed the code in the previous post. It works now (tested).
That method I used only exists in the VX version and not in the VX Ace one.
That method I used only exists in the VX version and not in the VX Ace one.
@Heirukichi thanks! it works!
You're welcome. Keep in mind that when using special code formatting in your string (the one displayed in the message after a quest is received) you have to use "\" twice (without quotation marks)!
Example: to increase text size you have to type \\{ instead of \{, to display a variable you have to type \\V[n] instead of \V[n], and so on.
So your line could be something like:
Example: to increase text size you have to type \\{ instead of \{, to display a variable you have to type \\V[n] instead of \V[n], and so on.
So your line could be something like:
Code:
$game_message.add("\\{\\{Quest Received!")
thanks! for the heads up
Original thread: https://forums.rpgmakerweb.com/threads/textbox-shows-up-when-a-scriptcall-is-called-from-another-script.79115/