unit hp help

mariopoop

New Member
Reaction score
1
how do you make the unit's hp 1, but the hp does not show when you click on it? how do you make it have a visible attack value but it wont attack?
 

mapguy

New Member
Reaction score
46
well, lets go by parts.

the attack way
Code:
a unit is attacked

attacker unit equal to the unit you dont want to attack

order unit to stop

the HP part
-set the HP of the unit to 999999999999
-and then, when the unit takes any damage you kill it:
Code:
your unit takes damage

damage taken greater than or equal to 1

kill your unit


ARE YOU MAKING A MAP STYLE LIKE:
ARE U A RETARD?
 

Azylaminaz

Vox Populi
Reaction score
91
Sadly, the only reason why a unit's HP wouldn't show is if the added numbers is greater than that can fit. This means you can give the unit a very high max and then, by use of triggers, give it one HP.
I tried with 1,000,000,000... but when I gave it one HP it just died. :p

To give a unit and make it not attack you would give it a classification check of Worker. If you never want it to attack... well... Not sure that is possible.

You can set minimum range to something higher than range, but this is only effective against AoE attackers... and if you specifically target a unit it'll ignore minimum range.

Or you can do the above.. Simple triggers were never my style. :p
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
One day I looked to the sky and said:
"If it can be done in a simple way and still work fine. why not?"

your trigger will only work for the actual attack, the unit will still aquire targets and follow them.

@mariopoop: please explain better what exactly you want, if you just want the unit to not being able to actually attack a unit do what mapguy said, if you dont want your unit to aquire or follow targets do the trigger mapguy posted and set its aquisation range to 1.00, this way the unit will only be able to attack units to which the player ordered it.
 

Necrach

You can change this now in User CP.
Reaction score
62
how do you make it have a visible attack value but it wont attack?

Alternative 1
Make the attack able to attack only Wards or Trees or something. Set the classification to Worker.

In Gameplay Interface, change the text "Can only target Wards" to blank.

This way it will still have the attack icon, but at least it cannot attack anyone. Eg, you can have an attack with dmg, dmg type, speed etc displayed without the unit actually being able to attack the normal way.

Alternative 2
Set the "Weapon Type" for the unit's attack to NONE. This way, the unit will actually be able to attack, but it the attack will deal no damage (no matter how high the attack damage is set to) Good alternative if your unit doesn't have any attack animation
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
Alternative 1
Make the attack able to attack only Wards or Trees or something. Set the classification to Worker.

In Gameplay Interface, change the text "Can only target Wards" to blank.

This way it will still have the attack icon, but at least it cannot attack anyone. Eg, you can have an attack with dmg, dmg type, speed etc displayed without the unit actually being able to attack the normal way.
[...]

the first method is nice but as far as i know setting the targets allowed to trees only will hide the attack icon, the peasant for example got 2 attacks but only a single visible because the second does only target trees.
targeting wards however should work well.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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