Ok here it goes, it's hard to explain:
I'm doing 2 different units that sprite wise are different but behaviourwise are kind of similar.
one is a Spartan hoplite unit and the other is an Athenian hoplite unit.
I want both 2 units to be able to carry different weapons(artifacts) that create different sprites and attacks depending on the one they are using at the time.
The units have chance of using spear(spear thrust), sword(sword thrust) and unarmed(shield bash).
I did all the sprites and animations, and created the artifact for spear, and sword.
When I use this with 1 unit(spartan) it works perfectly.
when he picks up sword he converts into the spartan sword monster and same with spear and sprites change to showing him carrying the weapon.
the questions is:
I would love to make also the Athenian capable of picking up the SAME sword or spear that the Spartan uses and change too...
but as in artifacts you have to select the unit that artifacts convert into when picking up, let's say I say "when picking up spear> convert unit to spartan with spear...."
then : how can I make the same spear on the ground change the Athenians to Athenians with spear, and the Spartans to Spartan with spear..?
Without having to create 2 different artifacts that look the same(spears) and be guessing when you play if the spear that's on the ground is athenian or spartan.......
uhh sorry, it's really hard to explain....
any ideas?
thanks!
Artifacts and units question - how to assign an artifact to...
I'm almost certain you can't do this by changing the artifacts themselves, so 1.5.1's artifact switching features will be useless if you want two different units to pick up the same artifacts.
So you'll have to do it the old fashioned way. Ever played the Bushido solo? The hero of that campaign does exactly the sort of thing you will need to do. You will have to script the unit so that when he picks up the weapon he will be replaced by a unit with that weapon. Say you have an unarmed (shield bash) hoplite. He walks over and picks up a sword, and you make a Move Marker script that replaces the unarmed unit with the sword unit. You could give him a special attack that makes him drop the sword, and then another Move Marker script would replace the sword unit with the original shield unit.
If you are having problems, you could always extract the Bushido campaign using topaz and look at their script to see how they did it.
A-Red
So you'll have to do it the old fashioned way. Ever played the Bushido solo? The hero of that campaign does exactly the sort of thing you will need to do. You will have to script the unit so that when he picks up the weapon he will be replaced by a unit with that weapon. Say you have an unarmed (shield bash) hoplite. He walks over and picks up a sword, and you make a Move Marker script that replaces the unarmed unit with the sword unit. You could give him a special attack that makes him drop the sword, and then another Move Marker script would replace the sword unit with the original shield unit.
If you are having problems, you could always extract the Bushido campaign using topaz and look at their script to see how they did it.
A-Red
On second thought...
Now that I think about it, this would be a lot harder to pull off for you than it was in Bushido. You would have to script each hoplite separately, which means a tremendous amount of script just for the item-switching. You may still be able to pull it off, but I think Myth levels can only take a certain amount of scripting. You may actually be better off just having separate artifacts for each unit, even if it means they can't pick up each other's stuff. It's hard to say which is less problematic, but give the MOMA thing a try and see what you think.
A-Red
Now that I think about it, this would be a lot harder to pull off for you than it was in Bushido. You would have to script each hoplite separately, which means a tremendous amount of script just for the item-switching. You may still be able to pull it off, but I think Myth levels can only take a certain amount of scripting. You may actually be better off just having separate artifacts for each unit, even if it means they can't pick up each other's stuff. It's hard to say which is less problematic, but give the MOMA thing a try and see what you think.
A-Red
I've been thinking about it and it would be really painful in extreme to do so for each unit.
specially when maybe I'll have 150 units on 1 side, and 100 on the other + fifty of the other...
it could turn up in insane scripting.
I'll use the 3 weapon feature for maps that require it to make it fun(like thermopylae pass battle where in reality spartans fought until their weapons broke and had to fight with hands and teeth)
but for other maps I'll keep that feature(to be able to use different weapons) for spartans only.
You convinced me, hehehe
thanks A-RED!!!!!!!!!!
specially when maybe I'll have 150 units on 1 side, and 100 on the other + fifty of the other...
it could turn up in insane scripting.
I'll use the 3 weapon feature for maps that require it to make it fun(like thermopylae pass battle where in reality spartans fought until their weapons broke and had to fight with hands and teeth)
but for other maps I'll keep that feature(to be able to use different weapons) for spartans only.
You convinced me, hehehe
thanks A-RED!!!!!!!!!!
Here is a very obscure but awesome 1.5.1 trick taught to me by Jagman.
Create two different sets of artifact and projectile tags - one set each for the the Athenian and Spartan. The projectiles should use the same graphic sequence, and they should be non-destroyable.
In the projectile tag, in the promotion box, set the projectile promotion for the Athenian projectile to be the Spartan projectile, and in the Spartan projectile tag, set the promotion to be the Athenian projectile.
Now you can place either one of the projectiles on your map, and if the Athenian picks it up, it will act as the Athenian artifact. If the Spartan picks it up, it will act as the Spartan artifact. Even if one unit type drops their artifact, the other unit type can still pick it up and it will work correctly.
Enjoy.
Edited By ChrisP on 1115753829
Create two different sets of artifact and projectile tags - one set each for the the Athenian and Spartan. The projectiles should use the same graphic sequence, and they should be non-destroyable.
In the projectile tag, in the promotion box, set the projectile promotion for the Athenian projectile to be the Spartan projectile, and in the Spartan projectile tag, set the promotion to be the Athenian projectile.
Now you can place either one of the projectiles on your map, and if the Athenian picks it up, it will act as the Athenian artifact. If the Spartan picks it up, it will act as the Spartan artifact. Even if one unit type drops their artifact, the other unit type can still pick it up and it will work correctly.
Enjoy.
Edited By ChrisP on 1115753829