• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

"Attack Ground"

Status
Not open for further replies.
Level 10
Joined
Nov 28, 2008
Messages
655
I am currently using a splashing attack on an invisible dummy unit created at a point that the mouse clicks.


This is horribly NOT the best way to do this.


Has anyone found any way to attack a point?
Weapons seem to only follow the "attack" ability, and that can only be used on units, not points.

And I know about the ID identifier thing, but I can't find any abilities that take a random point to try to add "attack" to...
 
Level 9
Joined
Sep 6, 2008
Messages
477
Need the same thing, doin a 3rd person zombie survival and trying to get an attack system working, damn hard.
 
Level 9
Joined
Sep 6, 2008
Messages
477
I think i know how to do it, gonna go test it for a few hours and see if i can get it to work.
 
Level 3
Joined
Aug 7, 2008
Messages
32
Maybe make a spell then if you use the spell on a point, use the triggers to create a unit at the point, then order the castor to use attack on the unit, with splash...
 
Level 1
Joined
Feb 24, 2010
Messages
62
Create an action, go to 'Environment' and then pick 'Create Effect At Point/Unit (From Unit/Player)'. The effect should be set to a damaging effect, which will then display the effect (also a missile if included) and deal damage to the target / point. (AoE also works.) No need for a dummy unit then.

  • Environment - Create Archon - Archon Damage at (Center of (Entire map)) from (Triggering unit)
This is what I'm using at my map, and so far it works.
 
Level 9
Joined
Sep 6, 2008
Messages
477
Problem with using point functions is that you can't shoot into the sky or hit people, it goes directly to the ground. Hell, its super super easy to make a shooting system that hits the ground man. Spawn a temporary damaging unit at Mouse clicked X in the world, Mouse clicked Y in the world, and Mouse clicked Z in the world. Theyre functions in the editor. But this doesn't allow for spraying your gun (they all spawn in the same place as the first mouseclick if you're holding it down) and you cant shoot into the sky. I need a function that projects a line from the user to wherever the crosshair is pointing then when you click it shoots a projectile following that line, any ideas?
 
Level 1
Joined
Feb 24, 2010
Messages
62
Following the pitch of the camera? That should be do-able, I guess. Not sure of the projected line, though, but I could give it a try.

Just a few things I need to know: you need to be able to aim horizontally and vertically, and the projectiles just follow a straight line (meaning: they don't fall down to earth anymore)?

Also, for the aiming part: I use a simple image in the center of the screen which represents the crosshair of where you're firing at, which works just fine for me.
 
Level 22
Joined
Feb 4, 2005
Messages
3,971
Im using another way but have to fix it cause it is not complete:

Whenever a mouse button is pressed, a unit some distance in front of YourUnit is created. The created unit has model of a target/Terran AOE circle. Your unit is ordered to attack the last created unit and an action sets the life of units within the created unit to lose life... In this case it doesnt target a point but again a unit.

Speaking of which how can I create a unit XX distance in front of my unit, whatever direction my unit is facing. (At position of my unit offset by what?)
 
Level 1
Joined
Feb 24, 2010
Messages
62
By using Point with Polar Offset, like this:

  • Variable - Set TempPoint = ((Position of (YOUR UNIT)) offset by (DISTANCE YOU WANT) towards (Facing of (YOUR UNIT)) degrees)

Also coming back on that aiming system: it's not working out, can't really get it to working. I'll look back at it later, sorry.
 
Level 10
Joined
Nov 28, 2008
Messages
655
Problem with using point functions is that you can't shoot into the sky or hit people, it goes directly to the ground. Hell, its super super easy to make a shooting system that hits the ground man. Spawn a temporary damaging unit at Mouse clicked X in the world, Mouse clicked Y in the world, and Mouse clicked Z in the world. Theyre functions in the editor. But this doesn't allow for spraying your gun (they all spawn in the same place as the first mouseclick if you're holding it down) and you cant shoot into the sky. I need a function that projects a line from the user to wherever the crosshair is pointing then when you click it shoots a projectile following that line, any ideas?

When you set the point that the effect is created at, just give it a point from XYZ, instead of just XY, and make it like .5-ish. That will be roughly a good size for a marine.

The damage effect has the actor attached to it, as well as the which thing the actor goes from. For example, if you used the archon beam as the effect, the archon beam actor dictates a beam from caster to target. Therefore it will come from the marine's gun to the target point. Then just make it AoE and you are set.
 
Level 9
Joined
Sep 6, 2008
Messages
477
When you set the point that the effect is created at, just give it a point from XYZ, instead of just XY, and make it like .5-ish. That will be roughly a good size for a marine.

The damage effect has the actor attached to it, as well as the which thing the actor goes from. For example, if you used the archon beam as the effect, the archon beam actor dictates a beam from caster to target. Therefore it will come from the marine's gun to the target point. Then just make it AoE and you are set.

This won't work because there is no coordinates in the sky, its 0,0,0. I'v already tested this. just letting you know.
 
Level 1
Joined
Aug 9, 2009
Messages
275
I'm just using something like Creating a baneling and ordering it to explode, if you need explosions.
 
Level 10
Joined
Nov 28, 2008
Messages
655
I suspect Attack Ground is a function that has not been implemented in GE yet. Just wait for future patches and hope the SC2 team is smart enough to add it in before everyone riots.

No there won't.

There is no damage unit, and there is no attack unit.

This is because it is all done via "create effect" triggers.


They want us to create an effect at the target. The actors (models and visual effects) are attached to the effects, not the units.

This means you have to use your math skills and the Point XYZ functions to get the actor(aka model or effect) to go from your dude to the point you want it to.

I had a marine shooting an archon beam out of his rifle at the left click of the mouse yesterday, and the beam hit other marines right in the chest when clicked on their feet. If you clicked on a hill it went up the hill and hit where a marine's chest WOULD be if one was standing up on the hill. Oh, and he stood still and played his attack animation.

So don't say this stuff needs different functions.


It is done in a different fashion than the War3 and Star1 editors, and we all just need to get used to the "new" way that we have to do things.
 
Level 9
Joined
Sep 6, 2008
Messages
477
It seems we are going to have to do this without mouse click XYZ coordinates because it's simply impossible to click into the sky. I'm guessing we need to use our units XY coordinates, their facing angle, and camera pitch to form the information we need. Think about it. If you click the left mouse button and create a bullet at the position of the unit, then send it forward following the facing angle of our unit we're good. Then the last thing is the height, set the bullet height to some transformation of the camera pitch. I'll work on it today and hopefully figure it out.
 
Level 11
Joined
Aug 1, 2009
Messages
963
Not especially hard.

Basically, you just create a new ability of type Effect - Target. Then, create a Persistent effect and put it in the Effect field of your ability. Change the period count of your persistent effect to -1 (infinite) and change the period duration to the interval between firing. Additionally, make the periodic effect something to deal AoE damage or do whatever the hell you want it to. Also, add the "Channeled" flag to your persistent effect, and change the range to something reasonable.

However, the animations will be all screwed up, so you need to fix that. To do this, you must go look at the actor for your unit (I am using a marine for this). Look at the events field, and add in two new events: both with type Effect and sourcename being the name of your Search effect that is applied after each period. Leave the subname blank. Notice that below each of your events is a thing that looks like actions on triggers. For the first one, change it to "Animation Play", make the name Attack, set the Time Type to duration, and Time Variant to 1.0. This will make your marine play his attack animation constantly! Now, move on to the second event and change the type to "Create". Change the Name to "SoundEmitter". Before you change the Content field, you must figure out what sound you want to use - go look in the Sound tab on your object editor and pick out one, then copy the name of it and paste it into the Content field.


And yay, now you have attack ground!
 
Level 2
Joined
Nov 12, 2004
Messages
14
if you make a completely new ability, that uses the effect from the weapon, but make it able to target a point, if you add the 'issue command' effect, with a duration of refire (like 3 seconds) when you use the ability on the ground it will auto attack over and over until told otherwise. this is just like a separate 'attack ground' button from wc3. the only difference is you would need to make the 'attack ground' able to target a point, and do AOE dmg, as its not targeting a specific unit. but if you make it a small enough area and a dmg max of 1 and not -1 it will simulate the same exact dmg as the regular attack and attack the ground.
 
Status
Not open for further replies.
Top