| 06-13-2009, 09:31 AM | #1 |
Hello Im new to this forum, Ive been playing with the editor for a few months but have come across a problem I want to create a combat system where your unit doesnt attack by themselves (Ive firgured out this non auto aquire part) But instead need to be ordered to attack by pressing a key. Ive searched around for similar resources, the closest was one where you press 'a' and select the target But I want a system where you (say-for) click 's' and your unit deals 'x' amount of damage in front of him regardless of whether an enemy is there; So there woul;d be no targeting. So im guessing im Im looking for something like the battista ability in Battleship Pro V1.99 If all that was too confusing, I want to make my unit attack when i press an assigned button; Like a hack-n-slash or platform fighter Any (and i do mean any) help would be appreciated Thanks in advance Noobo^^ |
| 06-13-2009, 11:56 AM | #2 |
Well, one possibility might be to make the key (something other than "s", that is already reserved for stop) a hotkey for a summoning spell that summons an invisible dummy unit with 0.01 seconds life duration and a damage-on-death ability. Whenever you press the hotkey, the unit will cast this summoning spell, thus creating the dummy unit right in front of it (you can even regulate where by modifying the spell's area of effect) which will then immediately die and deal damage. Give the spell an attack animation and if that doesn't work, force the animation with triggers when the unit begins casting the spell. An alternative would be to use triggers for the entire attack effect. You'd still use an ability to detect when the player pressed the hotkey and then you'd do some math to figure out around which point to look for enemies and then pick all enemy units in a small area around that point and damage them, or damage just the nearest one if you want it like that. |
| 06-14-2009, 12:02 PM | #3 |
Ohk Thank you! I tried the first method and it was effective to a certain degree The only problem is that the damage is in radius and can damage enemies behind the unit, it also means that the damage can be offsided if the an enemy is where the "supposed" spawn area is Could you please go into the second method with more detail? I wish for my system to have a more accurate attack Thankyou and Thankyou again ^^ |
| 06-17-2009, 08:58 AM | #5 |
Wow! Thankyou! Extremely useful! Exactly what I needed! ty for the illustration as well Im gonna apply this along with triggers im "studdying" from a map I downloaded Thankyou both of you! Nice to see an Aussie here in the forums! ^^ |
