| 10-08-2003, 12:04 AM | #1 |
I want to have a unit (Its only 1 unit per person, rpg style) that has two things. Its defualt attack is melee but when it uses a skill it instead uses a ranged attack (simply put, able to switch between range and melee) preferably an autocast thing so when its off hes in melee mode except it costs no mana. The unit can switch (Melee <---> Ranged) at anytime free of charge, but ranged does less damage. How Do I do this? |
| 10-08-2003, 12:17 AM | #2 |
the main way I have seen this done is to use a morphing skill such as bear form, have both forms be identical except for the attack type/range/damage |
| 10-08-2003, 12:52 AM | #3 |
ok, but I forgot to mention that the unit will have 1 selected skill at first, but when the unit buys an item he gains a random new skill that has to be kept even when melee --> range. |
| 10-08-2003, 01:05 AM | #4 |
Use a "Deactivate Attack" and "Reactivate attack" action, I think these r real lol. Tell me if they are I could use them.... |
| 10-08-2003, 05:12 AM | #5 |
if you are adding skills to a unit during the game, that you will want to keep between morphs, you will need to store the ability to a variable, and then each time the unit morphs you will have to issue an trigger to add the ability to the unit. |
| 10-08-2003, 05:56 AM | #6 |
I think the easiest way to do what your asking would be to make "attack 1" the melee attack, and "attack 2" the ranged attack. Have 2 dummy spells, 1 called "Melee" one called "Ranged" Code:
Event:
Unit casts a spell
Condition:
Or (any of the conditions are true)
Spell being cast is "Melee"
Spell being cast is "Ranged"
Action:
If
Conditions
Spell being cast is "Melee"
Actions
Remove ability "Melee" from unit(casting unit)
Add ability "Ranged" to unit(casting unit)
Disable "attack 2" for unit(casting unit)
Enable "attack 1" for unit(casting unit)
If
Conditions
Spell being cast is "Ranged"
Actions
Remove ability "Ranged" from unit(casting unit)
Add ability "Melee" to unit(casting unit)
Disable "attack 1" for unit(casting unit)
Enable "attack 2" for unit(casting unit)That should work fine... If you want it done a different way... here is an Idea. 1 Make a spell called "Ranged" based of the Searing Arrow ability. 2 Make said ability use no mana 3 Set the range for the ability to what you want units ranged attack to be 4 Set the "Damage Bonus" for the ability to a NEGATIVE so when its used it reduces the damage of each attack by a certain number. Because its based off of "Searing Arrows" it will be able to have the autocast set to on or off, which is what you wanted. DISADVANTAGES TO THIS METHOD: 1. If the unit does less damage then the Negative value you have it set at it will actually HEAL the attacked unit. 2. When the hero gets to higher levels they will be able to do ALOT of damage via ranged attack despite the negative. |
| 10-08-2003, 06:35 AM | #7 |
I am curious, disable and enable attack, these actions are from the UMSWE? Or are they actually in the normal TFT editor, I can't find them in the normal editor. |
| 10-08-2003, 07:07 AM | #8 |
Weird... I thought it was possible, but I don't see it in the normal WE either, thats where I thought it was... Could've swore I seen it before... I don't have UMSWE, but I do have WEU (they are similar, but different World editors.) But WEU doesn't have that function either... Maybe I am just stupid and was seeing things.. But there IS a trigger in WEU that lets you change the range and BASE damage of unit, so you could just lower the base damage and increase the range when they choose a ranged attack, and then raise the base damage and lower the range when they chose melee. It would be easier to adjust damage if there was a trigger to change "Primary Attribute" then you could just change the primary attribute to Agility when they change to ranged attack, and have it set to Strength when they have it on melee. But unfortunatly Neither the Regular WE or WEU have that fuction. But I don't know about UMSWE. Anyway, my appologies for wasting your time with something that appearently isn't possible. |
| 10-08-2003, 09:03 AM | #9 |
Using the Attack 1 / Attack 2 thing seems most practical.. But, as far as I can tell, Heroes have some signifigant coding that prevents their Attack 2 from ever showing, so you never see the hero's second attack when they have an orb, for example.. Since Orbs activate Attack 2, it would have bad collisions if they exist in your map. Even if the hero is forced to drop them, it could cause issues.. |
| 10-08-2003, 10:50 AM | #10 |
Saethori has a point, orbs activate the second attack... The reason the hero only attack flying units with the ranged attack is because the orb ability is set so that Air units are the only valid target, but if you were to make an orb ability that could target any unit with a ranged attack, then instead of the "enable/disable" attacks trigger above, you would instead make it so that when they cast "Ranged" it would add the orb ability to the unit, and when they cast "Melee" it would remove the ability. That would work. AND I'm sure its possible this time emote_sweat |
