Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,846
Reaction score
12,374
First Language
English
Primarily Uses
RMMZ
EDIT
I have seen how to do what I wanted to do, so this post is superfluous.
 

Shiro-chan

Friendly Neighbourhood Neppy Maid
Veteran
Joined
Aug 7, 2018
Messages
197
Reaction score
61
First Language
German
Primarily Uses
RMVXA
This is probably super-easy, but...
What is the scriptcall equivalent of "Has item x in inventory?" for a conditional branch?
 

Heirukichi

Veteran
Veteran
Joined
Sep 24, 2015
Messages
1,460
Reaction score
624
First Language
Italian
Primarily Uses
RMVXA
Code:
$game_party.has_item?(item_goes_here)
Do not forget that items in VX Ace are stored in tree different variables: $data_items, $data_weapons and $data_armors, you have to use the right one.
 

Shiro-chan

Friendly Neighbourhood Neppy Maid
Veteran
Joined
Aug 7, 2018
Messages
197
Reaction score
61
First Language
German
Primarily Uses
RMVXA

kj3400

Hmph Master
Veteran
Joined
Nov 29, 2013
Messages
553
Reaction score
75
First Language
English
Primarily Uses
RMVXA
Is there a way to check if an attack from a battler is of a particular element for a conditional branch? Or, if not, if the attack is a particular skill?
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,693
Reaction score
3,027
First Language
Tagalog
Primarily Uses
RMVXA
You can check what skill was used and even the element of it... But when exactly do you want to check it? That would be what decides the how to do this...
 

kj3400

Hmph Master
Veteran
Joined
Nov 29, 2013
Messages
553
Reaction score
75
First Language
English
Primarily Uses
RMVXA
Is it possible to check before it hits?
 

Heirukichi

Veteran
Veteran
Joined
Sep 24, 2015
Messages
1,460
Reaction score
624
First Language
Italian
Primarily Uses
RMVXA
Is it possible to check before it hits?
If you mean "before inflicting damage" then you can do it using a damage formula, otherwise you can do it only with a script that changes how hits are calculated. Even so, when and how to do it still depends on what you want to achieve. As you have already been told, if you give us more details, we might be able to provide more help.
 

kj3400

Hmph Master
Veteran
Joined
Nov 29, 2013
Messages
553
Reaction score
75
First Language
English
Primarily Uses
RMVXA
If you mean "before inflicting damage" then you can do it using a damage formula, otherwise you can do it only with a script that changes how hits are calculated. Even so, when and how to do it still depends on what you want to achieve. As you have already been told, if you give us more details, we might be able to provide more help.
I'm using Hime's Cover Conditions (http://himeworks.com/2013/11/cover-conditions/) and I'm trying to define the condition for a particular battler to be covered as being hit by any skill with a certain element.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,846
Reaction score
12,374
First Language
English
Primarily Uses
RMMZ
@kj3400 As this relates to using a particular script, rather than a script call which works using the engine itself, you will need to post a thread in RGSSx Script Support. This particular thread is not for resolving script specific issues.
 

Vis_Mage

Wisp Charmer
Veteran
Joined
Jul 28, 2013
Messages
773
Reaction score
276
First Language
English
Primarily Uses
RMMV
Is there a script call that I can use in a conditional branch, that would let me determine if an enemy with ID x is currently alive in a battle?
 

Heirukichi

Veteran
Veteran
Joined
Sep 24, 2015
Messages
1,460
Reaction score
624
First Language
Italian
Primarily Uses
RMVXA
It depends on what you mean by "ID". If by ID you mean the position of that enemy in the troop array, it is possible to use this:
Code:
$game_troop.members[ID].alive?

If you want to check it by enemy ID, it is still possible, but it requires a completely different approach.
Code:
$game_troop.members.any? { |member| member.enemy_id == ID && member.alive? }

This last code returns true if at least one enemy with that ID is alive, false otherwise.
 

Vis_Mage

Wisp Charmer
Veteran
Joined
Jul 28, 2013
Messages
773
Reaction score
276
First Language
English
Primarily Uses
RMMV
@Heirukichi I'm a bit late on the response, but thank you very much for your help! :kaohi:

Is there by chance a script call to check if any of the first 4 actors if your party has a specific weapon/armor ID equipped?
 

Ossra

Formerly Exhydra
Veteran
Joined
Aug 21, 2013
Messages
1,076
Reaction score
882
First Language
English
Primarily Uses
RMMV
EDIT: Dah, ignore that. Did not see that this was for RPG Maker VX Ace.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
6,843
Reaction score
9,233
First Language
Indonesian
Primarily Uses
N/A
Sure, you can use the following :
Right, but it's Ace script call board.

Is there by chance a script call to check if any of the first 4 actors if your party has a specific weapon/armor ID equipped?
Use this
Code:
$game_party.members[0..3].any? {|m| m.armors.any?{|ar| ar.id == <specify here>} || m.weapons.any? {|wp| wp.id == <specify here>}}
 

Solr

Living Weapon
Veteran
Joined
Apr 20, 2019
Messages
63
Reaction score
24
First Language
English
Primarily Uses
RMVXA
So, can anyone help me out here? I checked the script call list a few times but I don't believe I saw it.
I'm looking for a script call(s) that will refresh either the battle scene or the player inventory. I don't know if they exist or not.
Basically, I'm using a strange battle system along with a script that allows for items to be stolen from enemies. They seem to be compatable for the most part, except I can only access the items I've stolen after the battle. I appreciate any help you are willing to give me.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
6,843
Reaction score
9,233
First Language
Indonesian
Primarily Uses
N/A
So, can anyone help me out here? I checked the script call list a few times but I don't believe I saw it.
I'm looking for a script call(s) that will refresh either the battle scene or the player inventory. I don't know if they exist or not.
Basically, I'm using a strange battle system along with a script that allows for items to be stolen from enemies. They seem to be compatable for the most part, except I can only access the items I've stolen after the battle. I appreciate any help you are willing to give me.
Your query would be better if you post this in RGSSx Support and provide the link to your "strange battle system" script and item steal. Provide as much as info as possible because this particular topic thread is for script call that has nothing to do with someone's script.
 

Solr

Living Weapon
Veteran
Joined
Apr 20, 2019
Messages
63
Reaction score
24
First Language
English
Primarily Uses
RMVXA
Your query would be better if you post this in RGSSx Support and provide the link to your "strange battle system" script and item steal. Provide as much as info as possible because this particular topic thread is for script call that has nothing to do with someone's script.
Oh, I see. I'm sorry I thought this was the place to post all script call related things. I just wanted to know if "battle_refresh/update" or if "inventory_refresh/update" existed as like manual script calls.
 

Latest Threads

Latest Posts

Latest Profile Posts

Spend $5,000 on a new gaming PC. Didn't expect it to be like 1 foot wide, 2 feet tall, and weigh like 100+ pounds. The heck did I get myself into?
If you are a fan of TRPGs like Fire Emblem, take a moment to help me by filling out this:

Camping inside a hidden cave.
LzSHByh.jpg
I don’t believe in astrology. I’m a Sagittarius and we’re skeptical.

Forum statistics

Threads
124,377
Messages
1,163,202
Members
163,176
Latest member
HiKKIkMori
Top