Thank you! That might be all I need to figure this out.
Script Call Equivalent of Events
RPG Maker VXAce SupportThere is no equivalent, you have to be using sprites to be able to do that:
http://rgss3doc.tk/en/rgss3/Bitmap.html
http://rgss3doc.tk/en/rgss3/Sprite.html
I think this (and the first example) is missing a dot after [index]. I think it should read:
screen.pictures[index].show(file_name, upperleft/center, x, y, x zoom, y zoom, opacity, blend type)
(God. 5 hours of tinkering later . . . *facepalm*)
oh oops i forgot the dot.
Happy to help out. Wanted to expand on the add party member call: $game_actors[A].setup(1) where "A" is an actorID will initialize the specified actor, whether in the party or not. So, you can use it in conjunction with $game_party.add_actor(actor_id) to add initialized actors to the party.
EDIT: Wanted to expand on the add party member call: $game_actors[A].setup( 😎 will initialize actor ID "A" and replace it with an initialized version of actor ID "B," though I've noticed the map character sprite doesn't automatically refresh if one of the affected party members is in the party. It works whether in the party or not. So, you can use it in conjunction with $game_party.add_actor(actor_id) to add initialized actors to the party. Use at your own risk--you could erase one of your actors if your not careful.
EDIT: Using this script call at all seems to create a bunch of problems. I'd avoid it unless you know what you're doing. Sorry to even bring it up. *blush*
EDIT: Using this script call at all seems to create a bunch of problems. I'd avoid it unless you know what you're doing. Sorry to even bring it up. *blush*
With the Setup(1) section of that code, is the numeral denoting the level of the Actor you want to initialise at? Like say I want to initialise Actor 03 at Level 5 I would go:
$game_actors[03].setup(5)
?
Nope, it doesn't actually initialize like I thought. If you want to initialize using this method, you'll have to make sure A = B in the following script call: $game_actors[A].setup( 😎
Huh? What do you mean?
Do you mean.....
If you have a Actor 03 in database and another Actor.. say Actor 09 (which has all the skills and setup you want to intialise with), you go:
$game_actors[03].setup(09)
?
EDIT: Using this script call at all seems to create a bunch of problems. I'd avoid it, unless you know what you're doing.
09 is not a valid number.
Do not do things like
$game_actors[1].setup(2)That is going against how the database was designed.Game actor 1 should always correspond to database actor 1. If you want to change this behavior, do it properly.
You are introducing inconsistencies by saying actor 5 is really actor 12 or maybe actor 2 depending on what you feel like doing.
Do not do things like
$game_actors[1].setup(2)That is going against how the database was designed.Game actor 1 should always correspond to database actor 1. If you want to change this behavior, do it properly.
You are introducing inconsistencies by saying actor 5 is really actor 12 or maybe actor 2 depending on what you feel like doing.
I'd like to add a little bit to the list as well.
$game_map.passable?(X, Y, D)This lets you determine is a tile is passable or not. I use this for a teleport skill done via common events.
$game_map.passable?(X, Y, D)This lets you determine is a tile is passable or not. I use this for a teleport skill done via common events.
$game_player.passable?(x, y, d) and $game_map.events[event_id].passable?(x, y, d)
are extensions to this that do a little more detailed checking.
$game_map.passable? only tells you whether you can leave one tile in the direction of the other. The player and event versions take it further and tell you if you can leave that tile in the direction of the other AND if you can enter the other tile from the tile you're on now (for example, if you are facing right and the tile in front of you is the edge of a cliff that is higher than you - $game_map.passable? would tell you that you CAN step right from the current tile. But $game_player.passable? would tell you that you could not move onto the next tile from the left). It also looks to see if there is an event on your target tile which would stop you going there, but $game_map.passable? would not tell you that.
are extensions to this that do a little more detailed checking.
$game_map.passable? only tells you whether you can leave one tile in the direction of the other. The player and event versions take it further and tell you if you can leave that tile in the direction of the other AND if you can enter the other tile from the tile you're on now (for example, if you are facing right and the tile in front of you is the edge of a cliff that is higher than you - $game_map.passable? would tell you that you CAN step right from the current tile. But $game_player.passable? would tell you that you could not move onto the next tile from the left). It also looks to see if there is an event on your target tile which would stop you going there, but $game_map.passable? would not tell you that.
Oh wow, I didn't know that. Well thank you for that 🙂
Hrmm.. I can't seem to find the relevant call for finding the player's current HP.. I can do it inside a battle but I can't find a way to do it outside a battle. I looked through all the methods for Game_Actor and others.. but I can't find it.. it's not essential.. but I'd like to use a condition based on player's current HP on the map.
You can check an actor's current hp with:
Or the leader's current hp:
Or a member of the party:
Code:
$game_actors[x].hp
Code:
$game_party.leader.hp
Code:
$game_party.members[x].hp
If your condition is in an event, you can just use Control Variables to get an actor's HP into a variable.
Any script call to get the quantity of an item in a players inventory? I am trying to make a conditional branch in an event that checks it a player has 15 of item id 32. I know it has something to do with
if $game_party.has_item?($data_items[32])Would I just put =15 after that?
And yes I know I could do it with variables.
if $game_party.has_item?($data_items[32])Would I just put =15 after that?
And yes I know I could do it with variables.
Yup, that's what I was going to do but couldn't find a way to access the HP value to get it into the variable.
No. Best way to find the script equivalent of something you can do in events is to look through the Game_Interpreter script and search for the event that does it, then decide how the script needs to be changed (because the interpreter uses parameters for the numbers you want to input).
Here's the script from Game_Interpreter that places the quantity of an item into a variable:
$game_party.item_number($data_items[param1])So you'd just change param1 to the item id you're interested in, and add your condition around it:
if $game_party.item_number($data_items[32]) == 15Checking how many of a particular type of weapon or armor is very similar:
Code:
$game_party.item_number($data_weapons[param1])$game_party.item_number($data_armors[param1])
Original thread: https://forums.rpgmakerweb.com/threads/script-call-equivalent-of-events.6248/