Chaos Project

RPG Maker => Event Systems => Event System Requests => Topic started by: yuhikaru on February 26, 2010, 04:01:51 pm

Title: Help with ammo system
Post by: yuhikaru on February 26, 2010, 04:01:51 pm
Hi, people!
I'm using RMXP, and I'm an alright eventer (methinks) but I'm not used to battle eventing, so I suck at it  :^_^':

The thing is I'm trying to make an simple ammo event system. The arrows would be stored in a variable, and you would need a quiver to be able to use the bow.

I don't know if it's easy/possible to do it like this, I'm really clueless :???: :

if (player-weapon is a bow AND quiver is in inventory)
{
    if (number-of-arrows>=1) then 'Enable attack'
    {
          If (player use attack option) then (number-of-arrows -1)
    }
    else 'Disable attack'
}

Of course there is no such option as 'enable attack' (... is there?!?!?!  :O.o:) so I have no idea how to pull that off....
I saw an event system for ammo somewhere, but he forced the defense action, and it would be better if you could still use itens and skills.
So can someone help me, please? If you have a script for it, it'll be nice as well, but I'm looking foward to learn a little of battle events xD

Thanks in advance <3
Title: Re: Help with ammo system
Post by: lilbrudder917 on February 26, 2010, 05:25:21 pm
I remember reading something like this here on the forum, in fact, here's the topic:

http://forum.chaos-project.com/index.php/topic,1249.0.html

EDIT: I really should finish reading posts before I reply. I don't think you can disable attacking without using a script call.
Title: Re: Help with ammo system
Post by: yuhikaru on February 27, 2010, 01:50:54 pm
Yeah, I thought so. Any ideas how to do that?  :naughty:
Oh, and thank you for the topic link! :-* I was looking for that (I saw it on another forum, no idea it would be posted here as well...)
Title: Re: Help with ammo system
Post by: lilbrudder917 on February 27, 2010, 02:19:28 pm
Well, it SHOULD be

@actor_command_window.disable_item(0)


because that disables the first thing on that window, being Attack. Odd enough, (depending on how you call it,) it grays out the word, but you can still select it. I don't know why it doesn't actually disable.
Title: Re: Help with ammo system
Post by: Fantasist on February 28, 2010, 06:23:01 am
Because that's what "disable_item" is supposed to do :p If you notice, the Command_Window class by itself does not handle anything by itself, it's usually done in the scene it's being used.
Title: Re: Help with ammo system
Post by: yuhikaru on March 07, 2010, 07:30:29 am
I'm guessing that's not something simple to do, huh?   :wacko:
Maybe its better to not mess with that if I have no idea of what I'm doing  :^_^':

But I had another idea! Is it possible to make a conditional branch "If actor X choose the 'attack' option", or anything to that effect? Although I'm almost sure it'll have something to do with scripting xD