how do I change the background when a character touches a certain point? ex: attempting to step out of the screen in a forest brings the player into a town.
Script Call Support Boards
RPG Maker VXAce SupportThat has absolutely nothing to do with script calls, it can be done by eventing alone.
Please check on the tutorials to learn how it's done, transfer events are explained in the basic tutorials you'll need to learn anyway.
If you do not know where to start, follow the link in my signature.
Hello, there. 😀
So I know that by default, you can only show pictures from "Graphics/Pictures" and I know that you can onlyshow change battleback for the battle screen.
But what if I want to show pictures from "Graphics/Battlebacks1" and/or "Graphics/Battlebacks2" when the player is not in the battle screen?
And what if I want to show battlers picture taken from RPG::Enemy complete with the hue? Is it possible to do these two using some script call? 🤔
Or do I have to ask this somewhere else? :|
So I know that by default, you can only show pictures from "Graphics/Pictures" and I know that you can only
But what if I want to show pictures from "Graphics/Battlebacks1" and/or "Graphics/Battlebacks2" when the player is not in the battle screen?
And what if I want to show battlers picture taken from RPG::Enemy complete with the hue? Is it possible to do these two using some script call? 🤔
Or do I have to ask this somewhere else? :|
Take a look in the Cache script at the picture and battleback methods. See if they hardcode the path. If they don't, you just need to make the appropriate script calls (see what Game_Interpreter does when you use the Show Picture event command - or look at the original event command script reference thread linked in the first post of this thread to see what the script command is to show a picture) and pass in the correct location. You wouldn't be able to set a hue in a Show Picture command, but see if there's a tint picture command that you might be able to use.
Heh. Not sure what "hardcode" means, but... here's what's written in Cache.
Hmm. Guess I have to request a script to make things easier... 😀
Anyway, just taken a look again at the Script Call Collection thread. According to Archeia, this is the format I should write in the script call if I want to tint the pic:
screen.pictures[n].start_tone_change(Tone.new(0, 0, 0, 0), wait)So, following above, after using Show Picture in index number 1, this was what I wrote next:
screen.pictures[1].start_tone_change(Tone.new(24, -26, -25, 0), wait)But instead of tinting the pic, what happened was an error. 'Game Interpreter' line 1411: wrong number of arguments (0 for 1). What did I do wrong here? 🤔
#-------------------------------------------------------------------------- # * Get Picture Graphic #-------------------------------------------------------------------------- def self.picture(filename) load_bitmap("Graphics/Pictures/", filename) end #-------------------------------------------------------------------------- # * Get Battle Background (Floor) Graphic #-------------------------------------------------------------------------- def self.battleback1(filename) load_bitmap("Graphics/Battlebacks1/", filename) end #-------------------------------------------------------------------------- # * Get Battle Background (Wall) Graphic #-------------------------------------------------------------------------- def self.battleback2(filename) load_bitmap("Graphics/Battlebacks2/", filename) end #-------------------------------------------------------------------------- # * Get Battle Graphic #-------------------------------------------------------------------------- def self.battler(filename, hue) load_bitmap("Graphics/Battlers/", filename, hue) end
Anyway, just taken a look again at the Script Call Collection thread. According to Archeia, this is the format I should write in the script call if I want to tint the pic:
screen.pictures[n].start_tone_change(Tone.new(0, 0, 0, 0), wait)So, following above, after using Show Picture in index number 1, this was what I wrote next:
screen.pictures[1].start_tone_change(Tone.new(24, -26, -25, 0), wait)But instead of tinting the pic, what happened was an error. 'Game Interpreter' line 1411: wrong number of arguments (0 for 1). What did I do wrong here? 🤔
wait is wrong, you need to put a number there.
Ahh I see. Should've known. lol. Thank you, Shaz. Thank you, Archeia 😀
I want to activate a switch when a skill is selected , before it calculates the success rate , in order to have a conditional branch inside the calculate rate section that increases the success rate to 100% when the certain skill is used and another switch is on.
if #skill selected is [Skill] rate = 1 if ($game_switches[switch_id] == true && $game_switches[swtich_id]== true)endHow can I call the skill selected ?
if #skill selected is [Skill] rate = 1 if ($game_switches[switch_id] == true && $game_switches[swtich_id]== true)endHow can I call the skill selected ?
Are you doing this as a script call? From where? Seems you want to alter the default scripts, which means this question doesn't belong in this thread. Please make a new thread in RGSSx Script Requests.
'\v[66]' only works when used within message windows. Otherwise, use '$game_variables[x]' :
Code:
$game_party.gain_item($data_items[$game_variables[66]],$game_variables[34])
How can I call the change enemy Hp . There is an event for it but I need its script call...
In Game_BattlerBase:
Code:
#-------------------------------------------------------------------------- # * Change HP (for Events) # value: Amount of increase/decrease # enable_death: Allow knockout #-------------------------------------------------------------------------- def change_hp(value, enable_death) if !enable_death && @hp + value <= 0 self.hp = 1 else self.hp += value end end
Made my own topic for this question,
Code:
$game_troop.members[index].change_hp(value, true/false)
For all members ,what do I have as an index .
Do I use an array with all the numbers or is it a number
Do I use an array with all the numbers or is it a number
What do you mean, "for all members"?
If you want to do something to all members, you have to do it to them one at a time.
Look through the Game_Interpreter class and see how it handles the command you're trying to execute.
If you want to do something to all members, you have to do it to them one at a time.
Look through the Game_Interpreter class and see how it handles the command you're trying to execute.
Code:
$game_party.members.each {|mbr| mbr.change_hp(value, true/false)}
If I want something to happen when a player is on an event I use 2 variables to get the players x and y
I then have 2 conditionals, first checking if the player's x = event's x, then if the player's y = event's y.
Is it possible to use a script call in one conditional which simply asks if the players x,y is the same as the event's?
Thank you
I then have 2 conditionals, first checking if the player's x = event's x, then if the player's y = event's y.
Is it possible to use a script call in one conditional which simply asks if the players x,y is the same as the event's?
Thank you
yes, use this:
You can also use the "Player Touch" event trigger 😳
Code:
$game_player.x == $game_map.events[id].x && $game_player.y == $game_map.events[id].y
Original thread: https://forums.rpgmakerweb.com/threads/script-call-support-boards.25767/
