| 11-28-2007, 08:48 PM | #1 |
Hello people, this is my first post and i'm not sure if this is the right category but i decided give it a try. My english is not sharp enough, so sorry if miss type something. My idea is to do a map in which the hero when equip a weapon play an X animation of the model. Example if the hero picks a two handed weapon he will play the animation for that weapon ( the animation is already on the model, the blade master's movements ) By the way i'm using the AAAInventory System, thanks to Blade.dk I have seen a map, something like combat system but i'm not sure. I would be grateful if you send some jass code send it commented i'm a complete newbie in that stuff. |
| 11-28-2007, 11:45 PM | #2 |
Rename the attack animations to this: (this is an example) Attack 1 This is the onehand attack Attack 2 Attack 1 Alternate This is the two hand attack Attack 2 Alternate Attack 1 Gold This is the bow attack Attack 2 Gold Attack 1 Lumber This is the dual attack Attack 2 Lumber When your units equip a weapon set the units animations tag to that tag your units need for the weapon. For exampel if your unit equip a bow set the tag to "Lumber". JASS:AddUnitAnimationProperties(unit,"Lumber",true) I hope you understand what I mean. Tell me if you want me to make a sample map for you. |
| 11-29-2007, 12:23 AM | #3 |
That would be great, i tried what you said, but didn't work may miss typed something ? Code:
function Trig_CambiarAnimacion_Actions takes nothing returns nothing
call AddUnitAnimationProperties(gg_unit_E001_0079,"Lumber",true)
endfunction
//===========================================================================
function InitTrig_CambiarAnimacion takes nothing returns nothing
set gg_trg_CambiarAnimacion = CreateTrigger( )
call TriggerAddAction( gg_trg_CambiarAnimacion, function Trig_CambiarAnimacion_Actions )
endfunctiongg_unit_E001_0079 is an unit already in the map. Thanks for the quick reply |
| 11-29-2007, 09:08 AM | #4 |
Have you remembered to rename the animation of the models? I will make the map for you when I come home from school. Do you want the sample to be in GUI or Jass? |
| 11-29-2007, 11:08 AM | #5 |
GUI please, yet can't understand jass, i know java, c# , etc. and can't understand jass T_T, i always do programs in object oriented languages, so i think i that is not going to be easy. By the way any good tutorial of jass for a newbie ? a pdf or something like that ? Thanks |
| 11-29-2007, 11:11 AM | #6 |
LOL WUT. If you have a programming background(Java and C# are way harder) then JASS wouldn't be a problem to you. You also said you made programs so.. W-T-F, JASS ain't any harder, you don't need a 2-inch-thick manual to understand JASS. I think you are lying. How can this: JASS:public struct MyClass unit rawr method ROAOAOAR takes nothing returns nothing endmethod endstruct Code:
public partial class MyClass
{
public void SomeMethod()
{
// implementation
}
}Code:
public class Hello {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
} |
| 11-29-2007, 11:29 AM | #7 |
Learning the API is a pain, and that's what you really need to understand something. And all the ways we've messed up and abused Jass to simulate OO, etc. Syntax probably takes all of 10 minutes to learn. |
| 11-29-2007, 12:11 PM | #8 |
Here is the map. I have renamed the model animations, and the new model is in the map. Just export it. Pick up an item, use it, and then attack a unit. Then you can notice the attack animations change after what kind of weapon you use. You can get problems when you want your unit to use a bow, because there isnt any good way to change a units attack range. I would use the ability Chaos to transform the unit to a copy of the unit, just with a longer attack range. What map are you making? - Singleplayer RPG? |
| 11-29-2007, 12:15 PM | #9 |
That model could be quite helpful to some people. Just change the animation names to things like "Attack 1 Sword", "Attack 1 Dual Wield" and such. Then you could advise people to use AnimationTransfer on their desired model. |
| 11-29-2007, 12:42 PM | #10 |
You cant use "Sword" or "Dual Wield" as animation tag. Only them there are in the game like: Alternate Defend Lumber Gold |
| 11-29-2007, 01:07 PM | #11 |
The main idea is develop the system, then use it in the future maps, right now i'm thinking in a hero defense type, i think those are easier to start. Malf, may be you are right and i'm just scared about the sintax, but i'm not lying, actualy i'm studying that. Thanks for the help, lets try the map. |
| 11-29-2007, 01:28 PM | #12 |
You are welcome. I was also working on an equipment/attack system where you were able to use onehand, twohand, bow and crossbow weapons. But I never finished, but maybe now I got the will-power to do it. I updated the model again, now it have: - VillagerMans Attack - VillagerMans Stand Ready - Onehand Attack - Onehand Stand Ready - Twohand Attack - Twohand Stand Ready - Dual Attack - Dual Stand Ready - Bow Attack - Bow Stand Ready - Crossbow Attack - Crossbow Stand Ready Now it just need Magic attack, and a Staff attack. The Stand Ready animations was a need, else it looks wrong every time the unit attack. Try downloading this model and replace it with the one in the map, and see the different. |
| 11-29-2007, 01:31 PM | #13 |
Could it be posible that it wouldn't be nesesary use the item ? i mean just be equip it in the inventory, lets supose that a hero can carry just one type of weapon. |
| 11-29-2007, 01:36 PM | #14 |
Yes its possible. I just made this "equipment" system, to show how it works. |
| 11-29-2007, 02:41 PM | #15 |
Sweet stuff right there. You should probably submit it as a resource, and if people don't like the model they/you could just transfer the anims to a different model. |
