• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Character Attacks in certain Directions

Status
Not open for further replies.
Level 5
Joined
Jun 8, 2009
Messages
101
I want to Make A Smash TV Style map, but a good one not a crappy :D

My question is how would i go about making a trigger that will tell a unit to attack in a certain direction... for ex. is player and [QWEADZXC] are directions and buttons to attack that way

[Q] [W] [E]
-----\ ! /
[A]-- --[D]
-----/ i \
[Z] [X] [C]

I want an attack based by what normal attack they have (which will be a machine gun rapid fire that does 1 damage). I'm pretty sure i can work the animations and damage but not too sure how to put all this together. any help would be appreciated
 
Level 5
Joined
Jun 8, 2009
Messages
101
Its alright, i guess ill have to start basic and do just left right up and down :D

This brings me to a new Question

Using Player Pushes Left arrow Key. How do i make a unit thats moving attack to the immediate left of it? I want to do somehting that makes it look like its burst firing and dealing damage to all units from where it is to the end point of the level area.

I was thinkin it would have to be something like a shockwave but that may be too large i dono running through these triggers this looks hard as ****
 
Level 5
Joined
Jun 8, 2009
Messages
101
I wanted it like mass carnage lol, having 30 units coming at you from just one side that you can mow down in a couple of seconds i wanted to recreate that feeling. kinda difficult cause wc3 all attack individually, buuut, i think ill take what you said into consideration, Ill try everything with abilities and see how it works out.
 
Level 19
Joined
Feb 25, 2009
Messages
2,004
That thing from #1 post is not quite impossible. You could detect where the unit stands at the moment of when it deals damage then set a few locations around it, pick units in a small range and damage them if they are enemies.

All tho, it might cause a critical error if the trigger runs too much times at a given time.

Otherwise, you could make a dummy with cleaving attack, and add a cleaving attack to the hero, then when he deals damage, create a dummy that faces the opposite of the hero and order it to attack, but you must save the damage from the hero, then detect which unit is hit by the dummy and deal the damage to them as well. In the way you'll damage both sides in a cone.
 
Level 13
Joined
May 11, 2008
Messages
1,198
mortar is on to sumthn here w the dummy unit idea imo. you can group the unit along a trajectory i guess and spawn a dummy unit for each and make the dummy attack those units. them using fan of knives might work out ok.

if you're going to the left, get the unitx of the trigger unit and minus a certain amount, and check for units within a small range, then minus another amount, and do it again. just make sure don't overlap and let units get hit multiple times. in fact you probably don't even need dummy units for this unless you need them for graphics...should be able to make the triggerunit damage the units to the left of him.

going to the right, get the unit x and add a certain amount...
going up, get the unit y and add a certain amount, going down, get the unit y and minus a certain amount...combine these mthods logically in order to shoot in 8 directions

i recommend...using replacement method.
make 3 abilities
these could also be items of course, or one being item and two being ability, or vice versa.

2 abilities rotate the fire zone. so if you're facing up(90 degrees by map making rekoning)...press buton left twice then middle button once to fire. then it takes another 4 buttons either left or right to shoot right again (0 degrees by map making reckoning)

the idea is that, everytime you press the rotate left or rotate right abilities, the shoot ability changes. so when you click on it, it shoots in a different direction.

another option of course, is to say screw all that...and just make one ability that detects the facing angle of the triggerunit and shoot the weapon in that direction...but it didn't soundlike that was what you were going for.

i think you wanted to press one button to shoot in one direction, not 2-5 as my solution presents...but you perhaps also did not want to rotate the unit by clicking on the ground as i understood it. those are the only two things i can think of. consider which is the greater evil. dota traditionally uses the latter method. whatever direction the hero is facing...the projectile goes there. of course....it's an easy matter to point and click(after one hotkey button) and then the hero could should in that direction...but it sounded like you didn't want that either.
 
Status
Not open for further replies.
Top