Charas-Project

Game Creation => Requests => RPG Maker Programming => Topic started by: matu159 on May 15, 2006, 04:59:04 PM

Title: Different weapons for different jobs
Post by: matu159 on May 15, 2006, 04:59:04 PM
I really don't understand how can you do it.
When I want to put the animation of the weapon, I can only use the heroes, not the jobs.

Sorry if you don't understand what I meant, it's just too hard to explain it...


thanks in advance
Title:
Post by: WarxePB on May 15, 2006, 05:10:24 PM
As long as all of your characters have the same attacking animation (if you're using the default battle characters, or edits of them, then they do), then it doesn't really matter.
Title:
Post by: matu159 on May 15, 2006, 05:17:21 PM
When I try to add weapon items I can't put their correct animation...that's my problem...
Title:
Post by: WarxePB on May 15, 2006, 05:24:29 PM
You can't set weapon animations for specific classes, unfortunately. You'll have to set the weapon animation for the hero, then make sure that all of the hero's possible classes has the same attacking animation. Either that, or make multiple types of every weapon and a common event that changes the weapon depending on the hero's class.
Title:
Post by: matu159 on May 15, 2006, 06:12:11 PM
alright, I think I'll program everything...the problem is that i have over 40 classes with 10 different classes of weapons...
one more thing and I'm done... =)
can somebody explain me a little bit about the last choice?
making multiple types of every weapon and a common event that could change the weapon depending on the hero's class...

anyway
thanks a lot PhoenixBlade :)
Title:
Post by: WarxePB on May 15, 2006, 08:09:11 PM
Let's see if I can explain it further.

Say you have a weapon called Iron Sword. One class attacks in a vertical slash, but another class slashes horizontally. The second class can't use the same animation as the first, because it won't look right.
The solution, then, is to create two weapons, each having the same stats but different animations. The first sword would have the vertical animation, but the second has a horizontal one. To make it easy to distinguish, the first is Iron Sword 1 and the second is Iron Sword 2.
The coding for this is pretty easy, actually. In a Common Event (with a trigger of Parallel Process), create a Conditional Branch that checks if a hero has the Iron Sword 1 equipped. If s/he does, and they're supposed to attack horizontally, use two Change Equipped Items commands to unequip Iron Sword 1 from that hero, then another to equip Iron Sword 2 to that same hero. Afterwards, use an Item Management command to remove a single Iron Sword 1 from your inventory.

The code should look like:

<>Branch if Hero 1 Iron Sword 1 Equipped
<>Change Equipment: Hero 1 Weapon Unequip
<>Change Equipment: Hero 1 Iron Sword 2 Equip
<>Item Management: Iron Sword 1 1 Remove
<>
<>Else Handler
<>
<>End
<>

Of course, you'll have to do that with every hero, and for every equippable weapon too. It's a lot of work.

Let me know if the code works for you.
Title:
Post by: matu159 on May 15, 2006, 08:47:46 PM
it worked :)
thank you a lot phoenix  :bend: