Civitar
Adventurer
For my Warhammer mod I want to represent a feature of certain units: they are armed with both hand weapons (usually spears/swords) and bows/crossbows.
I was thinking I could do two graphics for the unit (example High Elf Sea Guard), one carrying spear and shield with bow and quiver slung over the elf's back, and the other carrying the bow with spear and shield slung over his back. Then the spear-wielding version could be the default version, but when the player clicks on the ranged attack button the artdefines is swapped from ART_DEF_UNIT_HIGH_ELF_SEA_GUARD_SPEAR to ART_DEF_UNIT_HIGH_ELF_SEA_GUARD_BOW. Then when the ranged attack is finished the graphics change back. When the unit is attacked, though, the spear version remains.
I only have the very barest understanding of what Lua can do, so it seems like I need something like "When player clicks Bombard for Sea Guard change UnitArtInfo from spear to bow, when bombard finished change back". That's really all I'm looking for.
So please, can somebody provide the Lua necessary to do this?
Thanks for any help given.
I was thinking I could do two graphics for the unit (example High Elf Sea Guard), one carrying spear and shield with bow and quiver slung over the elf's back, and the other carrying the bow with spear and shield slung over his back. Then the spear-wielding version could be the default version, but when the player clicks on the ranged attack button the artdefines is swapped from ART_DEF_UNIT_HIGH_ELF_SEA_GUARD_SPEAR to ART_DEF_UNIT_HIGH_ELF_SEA_GUARD_BOW. Then when the ranged attack is finished the graphics change back. When the unit is attacked, though, the spear version remains.
I only have the very barest understanding of what Lua can do, so it seems like I need something like "When player clicks Bombard for Sea Guard change UnitArtInfo from spear to bow, when bombard finished change back". That's really all I'm looking for.
So please, can somebody provide the Lua necessary to do this?
Thanks for any help given.