Is there a way to "seal" (disable) the attack command?

Status
Not open for further replies.

ct_bolt

Creator
Veteran
Joined
May 3, 2012
Messages
954
Reaction score
520
First Language
Javascript
Primarily Uses
RMMZ
Premise:
I've created a skill that uses a "Pistol" weapon type & also requires ammo to use that skill.

Problem:

You can just click attack which just attacks using what ever you have equipped without requiring the user to have any ammo.

Question:

Is there a way to "seal" (disable) or remove the attack command without using any scripts?
I want this to be completely done with the database & events.

Summary:

Basically I want the attack command to be unusable if the user has a gun equipped.
 
Last edited by a moderator:

Clord

Nya~
Veteran
Joined
Aug 5, 2012
Messages
2,358
Reaction score
385
Primarily Uses
Weapons -> Features -> Skills -> Seal Skill


It is pretty simple as that. However to disable it when you have no ammo you will indeed need a event or script.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,673
First Language
German
Primarily Uses
RMMV
without scripts - not that I know of, the base attack skill is set up to make sure that there is always a skill the enemies can use.

However, you might try a workaround with the skill's damage formula:

You can enter any ruby code in the damage formula field, including an IF to see what kind of weapon the current user as equipped.

And in that case reduce the ammo there.

Unfortunately this will result in a used up action if there is no ammo, and the coding in that field would be rather complex - I don't have it right now.
 

ct_bolt

Creator
Veteran
Joined
May 3, 2012
Messages
954
Reaction score
520
First Language
Javascript
Primarily Uses
RMMZ
Weapons -> Features -> Skills -> Seal Skill
Oh my goodness, how did I overlook that... :blush:

lol, I was even about to make a script (but I really didn't want to have to, many thanks to you for the info) to do just that... like so:

class Scene_Battle < Scene_Base def command_attack on_enemy_cancel endend...of course I would've had to check to see what the player had equipped before calling "on_enemy_cancel"...
However to disable it when you have no ammo you will indeed need a event or script.
Yeah I believe I might be able to achieve the desired effect with an event or maybe some other database tricks. ;)

without scripts - not that I know of, the base attack skill is set up to make sure that there is always a skill the enemies can use.

However, you might try a workaround with the skill's damage formula:

You can enter any ruby code in the damage formula field, including an IF to see what kind of weapon the current user as equipped.

And in that case reduce the ammo there.

Unfortunately this will result in a used up action if there is no ammo, and the coding in that field would be rather complex - I don't have it right now.
Hmm... well I think I may be able to get it to work with what Clord mentioned above.

Thank you both so much for such quick replies!

Specially thank you Clord for that info, I just cannot believe I didn't think of that.

Edit: I believe I've figured it all out.

Thanks again for the help. This can now be closed.
 
Last edited by a moderator:

Celianna

Tileset artist
Veteran
Joined
Mar 1, 2012
Messages
10,557
Reaction score
5,592
First Language
Dutch
Primarily Uses
RMMV
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,859
Messages
1,017,030
Members
137,566
Latest member
Fl0shVS
Top