Main Menu
  • Welcome to The RPG Maker Resource Kit.

Conditional for Weapons

Started by Blazer-X, May 09, 2008, 12:59:24 AM

0 Members and 1 Guest are viewing this topic.

Blazer-X

Basically, for Scene_Battle 3 code, I want to create a conditional for the "Attack button" option so that when you are using certain weapons, it would have another effect, such as attacking all enemies or attacking more than once. The problem is that I don't know how to reference which weapon a character is equipped with, and therefore would like to know how I would go about writing this conditional.
Thank you in advance.

Tsunokiette

Something like

@active_battler.weapon_id

Should work.

I can't remember if it's active or current though.
"The wonderful thing about Tiggers
Is Tiggers are wonderful things
Their tops are made out of rubber
Their bottoms are made out of springs

They're bouncy, trouncy, flouncy, pouncy
Fun, fun, fun, fun, fun!
But the most wonderful thing about Tiggers
Is I'm the only one, I'm the only one."

Blazer-X

#2
Thanks, that works. But now I have ANOTHER request, that is somewhat related, and since I already have this thread, might as well as post it here too.

Basically, I want to create a slight change to the equipment system that allows the character to equip two weapons (similarly to how its done in RPG 2k3 and RPG VX) except that I would prefer if weapon 1 and weapon 2 slots are kept as separate categories (one for swords and one for guns). In addition, I would like to create an extra in-battle option option that allows you to attack with the second weapon (so that you basically have: Attack1, Attack2, Skill, Item, Escape) as oppose to the double attack system used in RPG 2k3 and RPG VX.

I've tried messing around with the equip options on the "actor" script, but I didn't get anywhere, and I have absolutely no clue how to add an extra battle option into the game.

Thank you in advance.

Edit: Resolved, but I got a new case:

Basically, I wish to know what I could write to change the actor's class in RGSS script (as opposed to using conditionals).

My main reason in doing this is because I want to stimulate multiple skill lists (ex: have more than 1 battle option that links to skill menu), using conditionals on weapons and which battle option I choose to change the class (which would also change the skill list). If someone has a better way of doing this (or have even created an entire script that stimulates multiple skill lists), please inform me.

Thank you in advance.

Tsunokiette

$game_party.actors
  • .class_id = y

    Or something like that.
"The wonderful thing about Tiggers
Is Tiggers are wonderful things
Their tops are made out of rubber
Their bottoms are made out of springs

They're bouncy, trouncy, flouncy, pouncy
Fun, fun, fun, fun, fun!
But the most wonderful thing about Tiggers
Is I'm the only one, I'm the only one."

Blazer-X

Just wondering, would changing the class remove the skills that you didn't put in the class skill list?
If not, how would I remove the skills that don't belong in the skill list?

Tsunokiette

Don't know. Give it a test and see what happens. :x

As for removing skills that don't belong, it should be very similar to how the system adds skills. It should be somewhere in Game_Actor ( I think ). Just read it and try to reverse engineer it (sort of). If you need any help with it just ask. ^_^
"The wonderful thing about Tiggers
Is Tiggers are wonderful things
Their tops are made out of rubber
Their bottoms are made out of springs

They're bouncy, trouncy, flouncy, pouncy
Fun, fun, fun, fun, fun!
But the most wonderful thing about Tiggers
Is I'm the only one, I'm the only one."