Script Call Equivalent of Events

yeah i test it.

And i use it on my script
hi guys, just wanted to know what is the script equivalent of 'Change Actor Graphic'.

Thanks 😀
actor.set_graphic(character_name, character_index, face_name, face_index)


where actor is $game_actors[id] or $game_party.members[index] or whatever else will give you a Game_Actor object.
Could someone please explain to me how I would go about making a mini script where, once the player enters a town, a message would come up onto the top left or right side of the screen to let them know that if they push a certain button it would activate a common event to happen in that town? I read the first page of this forum, but I got confused. Thank you.

so2_pa_1_450.jpg
That has nothing to do with this topic. Please make a new thread for your question.
Need help on script call to force player to use an item. Or consume an item for player via script call.  Can't seem to find a function for this. Something like this?

$game_party.USE_item($data_items[X])
An item is not used by the party. It's used by an individual actor.

So any of the following would work, depending on how you're deciding who uses it:

Code:
$game_actors[id].use_item($data_items[x])$game_party.leader.use_item($data_items[x])$game_party.members[index].use_item($data_items[x])
An item is not used by the party. It's used by an individual actor.

So any of the following would work, depending on how you're deciding who uses it:

$game_actors[id].use_item($data_items[x])$game_party.leader.use_item($data_items[x])$game_party.members[index].use_item($data_items[x])
It worked! Thanks!  I knew use_item is usable but didn't realise it's only for individual. Thanks again. Out of curiousity, is there like a RGSS3 bible somewhere for these things?
There IS a site that I've seen recommended a few times, but I don't have it linked and can't think of what it is.


When I'm trying to figure something out, I will (in this order):


- look through the existing scripts


- look at the help file; all the standard classes are documented there, as well as quite a few that are used but aren't actually in the scripts


- check my Programming Ruby 1.9 manual


- google some keywords


- look at scripts made by others, where I suspect they've done something similar to what I want to do
There is OpenRGSS, which closely mirrors RGSS3. There was another site, but unfortunately the owner has since moved on, and the information is no longer available.
Thanks.
Need help on getting the enemy id of the target on battle. I use a conditional branch that if the enemy's id(@enemy_id) is equal to the target enemy's id, then I could execute a skill.
You're posting in the wrong place, as there is no event command to do this already, and this thread is for script call equivalents of (existing) events.


Please start a new thread with your question, or post in the RGSS/Ruby questions that don't deserve their own thread topic, and specify if you're actually talking about enemies, or just the target (which could also be an actor).
Oh sorry.
Doesn't look like this one was mentioned...

Show Battle Animation:

@enemy_index = 0@animation_id = 1iterate_enemy_index(@enemy_index) do |e| e.animation_id = @animation_id if e.alive?endThat will show a battle animation. 🙂
How about Scene Shop? Say for example I wanna sell Items ID 1 - 10, weapons 1-10, armors 1 - 10...aside from saying

Scene_Manager.call (Scene_Shop)what other parameters should be called?
This is the Game_Interpreter method that does the shop processing:

def command_302 return if $game_party.in_battle goods = [@params] while next_event_code == 605 @index += 1 goods.push(@list[@index].parameters) end SceneManager.call(Scene_Shop) SceneManager.scene.prepare(goods, @params[4]) Fiber.yield endSo you're going to have to set up the list of goods, call the shop scene, and then call the prepare method.goods is an array that contains sub-arrays of type (0-item, 1-weapon, 2-armor), id, a flag to override the price, and the price, if overridden.
This is the Game_Interpreter method that does the shop processing:

def command_302 return if $game_party.in_battle goods = [@params] while next_event_code == 605 @index += 1 goods.push(@list[@index].parameters) end SceneManager.call(Scene_Shop) SceneManager.scene.prepare(goods, @params[4]) Fiber.yield endSo you're going to have to set up the list of goods, call the shop scene, and then call the prepare method.goods is an array that contains sub-arrays of type (0-item, 1-weapon, 2-armor), id, a flag to override the price, and the price, if overridden.
So by saying 

goods = [1]for example, am I calling the items id?
No. The proper way to use it would be

Code:
goods = [[type, id, price_override_flag(, price)]]
or a concrete example
Code:
goods = [[0,1,1,25],[0,2,0]]SceneManager.call(Scene_Shop)SceneManager.scene.prepare(goods, true)
This would create a shop where you could only buy with an inventory of a Potion at 25 and a Hi-Potion at default price (assuming default database).
Yes, I forgot to state that the price_override_flag is 0/1, not true/false. 0 means take the price from the database; 1 means override the price (and then you have to include the extra parameter for price).

Original thread: https://forums.rpgmakerweb.com/threads/script-call-equivalent-of-events.6248/