Attacking Ground

Mythes

Member
Reaction score
7
Is there an ability to make a unit attack ground? (Like catapults do in some games)
That is, the unit attacks the ground, and not a specific target.
Or must this be triggered?


Myt.
 

xkid4ditya

New Member
Reaction score
13
Ummm.....I dont know there is an ability for that, but you can set Combat Attack Weapon type of your unit to "Artillery" in Object Editor.

Hope usefull;)
 

hopy

Active Member
Reaction score
64
Is there an ability to make a unit attack ground? (Like catapults do in some games)
That is, the unit attacks the ground, and not a specific target.
Or must this be triggered?

If you want a unit to be able to attack the ground (giving them the ability to 'attack ground'), you'll need to make sure their 'Combat - Attack 1 - Weapon Type:' is set to 'Artillery'. Also I believe only ranged units have the ability to attack ground, even if set as Artillery, though I'm not sure about this. So make sure the units fits those conditions.

Now if you want a unit to attack the ground you will have to either:
1. Manually click the 'Attack Ground' button in game.
2. Force the unit to attack the ground by trigger, which isn't hard.
Since I wasn't sure what you wanted from your main post (I didn't fully understand if you wanted to know how to make a unit able to 'Attack Ground', or if you wanted a unit to be forced to attack ground without having to order him manually).

The trigger would look a bit like this (make sure the unit is able to attack ground!):
Trigger:
  • Attack Ground
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacked unit)) Equal to Demolisher
    • Actions
      • Set Point = (Position of (Attacked unit))
      • Set Point2 = (Point offset by (Random real number between 100.00 and 600.00) towards (Random real number between 0.00 and 359.00) degrees)
      • Unit - Order (Attacked unit) to Attack Ground Point2
      • Custom script: call RemoveLocation (udg_Point2)
      • Custom script: call RemoveLocation (udg_Point)

- Point, and Point2 are both point variables.
What this trigger does is it forces the 'Catapult' to attack a random point within 600 range everytime it's attacked. Now this would ofcourse look a bit silly because of the slow attack speed of the 'Catapult', but it's just an example. :D

Please do let me know if this didn't fix your problem.
 

Mythes

Member
Reaction score
7
Kind of fixed it hopy..
I just needed the unit to keep attacking the ground, so all I need is a timing trigger.
In place of "unit is attacked", just put "Time - Every 1.5 seconds in-game."
Being 1,5 the cooldown of my catapult.

Is the ability for attacking ground "Atack Ground" ?
Or does it have another name?

Thanks for the help =)


Myt.
 

evilwolf

Member
Reaction score
11
This action...
Code:
Unit - Order (Last created unit) to Attack Ground (Center of (Playable map area))
Unit - Issue Order attacking a point...
To attack ground the unit has to have SPLASH damage and artillery missile, this might be optional though.
 

hopy

Active Member
Reaction score
64
I just needed the unit to keep attacking the ground, so all I need is a timing trigger.
In place of "unit is attacked", just put "Time - Every 1.5 seconds in-game."
Being 1,5 the cooldown of my catapult.
I believe that when you order a unit to 'Attack Ground' in a trigger it will continue to attack ground until death, or a different order is given.
So if the Catapult will not be controled by any player or AI just giving the comand once is enough.

The 'When a unit is attacked' is just for example, if you want it to attack all the time it's better to use '5.00 seconds afther the start of the game' or something. Giving the order every 1.5 seconds seconds isn't needed and is more laggy.

Is the ability for attacking ground "Atack Ground" ?
Or does it have another name?

Thanks for the help =)
I cant remember this exactly, you could try and search (Ctrl+F) in the Object Editor and search for 'Attack Ground'.
However I think 'Attack Ground' is the same as the 'Attack' button on normal units, so just a command button rather then a ability.

Happy to help.

======EDIT======
This action...
Code:
Unit - Order (Last created unit) to Attack Ground (Center of (Playable map area))
Unit - Issue Order attacking a point...
To attack ground the unit has to have SPLASH damage and artillery missile, this might be optional though.
From what I remember 'Artillery Missile and Ranged attack', I'm not sure about the splash. Since it's a Catapult firing at the same place all the time I assume Splash is active though.

Also:
(Center of (Playable map area))
is a leak.
======/EIDIT======
 

Mythes

Member
Reaction score
7
Will test this tonight..
Yeah, I noticed "point of attack" leaks..
No problem, customscript fixes it...
 

evilwolf

Member
Reaction score
11
"I cant remember this exactly, you could try and search (Ctrl+F) in the Object Editor and search for 'Attack Ground'"
You can't! thats not an ability! Try it yourself!
A unit will automatically come with the attack ground ability if it has splash damage and artillery missile type.
 

hopy

Active Member
Reaction score
64
I cant remember this exactly, you could try and search (Ctrl+F) in the Object Editor and search for 'Attack Ground'.
However I think 'Attack Ground' is the same as the 'Attack' button on normal units, so just a command button rather then a ability.
Do read all please.
 

Mythes

Member
Reaction score
7
I think I understand what everyone said, and took in consideration leaks and other stuff..
I'll be making the ability tonight and posting here what went right / wrong.
rep+ everyone who posted here (cause every1 helped :p)


Thanks again everyone,
Myt.
 

Mythes

Member
Reaction score
7
Ok it worked... partially...
I wanted the unit to attack anypoint in the map for a certain time... But the unit doesn't attack ground if the target is further than 800 range (more less) even if I set it's attack range to 20000....
Ideas here? Or must I use "damage point" ?
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • WildTurkey WildTurkey:
    is there a stephen green in the house?
    +1
  • The Helper The Helper:
    What is up WildTurkey?
  • The Helper The Helper:
    Looks like Google fixed whatever mistake that made the recipes on the site go crazy and we are no longer trending towards a recipe site lol - I don't care though because it motivated me to spend alot of time on the site improving it and at least now the content people are looking at is not stupid and embarrassing like it was when I first got back into this like 5 years ago.
  • The Helper The Helper:
    Plus - I have a pretty bad ass recipe collection now! That section of the site is 10 thousand times better than it was before
  • The Helper The Helper:
    We now have a web designer at my job. A legit talented professional! I am going to get him to redesign the site theme. It is time.
  • Varine Varine:
    I got one more day of community service and then I'm free from this nonsense! I polished a cop car today for a funeral or something I guess
  • Varine Varine:
    They also were digging threw old shit at the sheriff's office and I tried to get them to give me the old electronic stuff, but they said no. They can't give it to people because they might use it to impersonate a cop or break into their network or some shit? idk but it was a shame to see them take a whole bunch of radios and shit to get shredded and landfilled
  • The Helper The Helper:
    whatever at least you are free
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top