• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

dmg unit if unit enter region

Status
Not open for further replies.
Level 3
Joined
Jun 9, 2008
Messages
36
hiho

i try do to dmg a unit if a enemy reaches a region
it works but the unit has 50 HP and it get demg like 45 - 44 -21 -32
the unit should get 1 dmg if a unit enters "50 - 49 -48 - 47 ....."

i tryed manny things dmg area effect dmg target effect set life ... and so on
but it is not in a row :cry:

need help
 
w00t??
how to make - 1%????????
Unit - Set life of Team Live Generator 0007 <gen> to (Percentage life of Team Live Generator 0007 <gen>)%
 
event: unit enters region

actions:
set life of triggering unit = life of triggering unit - 1

if you want 1% it should be like:

set life of triggering unit = life of triggering unit - (life of triggering unit/100)
 
You will have to make two triggers, the first one will be:

  • Events
    • A unit enters (YourRegion)
  • Conditions
  • Actions
    • Set (DamagedUnit) = Entering Unit
    • Trigger - Turn on (Trigger02)
Your second trigger will look like this:

  • Events
    • Time - Every 1.00 seconds of game time
  • Conditions
  • Actions
    • If (All conditions are true) then do (Then actions) else do (Else actions
    • If - Conditions
    • (YourRegion) contains (DamagedUnit) equal to true
    • Then - Actions
    • Unit Group - Pick every Unit in (Units in(YourRegion)) and do (Unit - Set life of (Picked Unit) to ((Life of Picked Unit) - 1.00)
    • Else - Actions
    • Trigger - Turn off (this trigger)
Remember that "DamagedUnit" is a unit variable and "YourRegion" means the name of the region which will damage the unit. "Trigger02" means the second trigger that you would make.
 
(YourRegion) contains (DamagedUnit) equal to true
found:(Entering unit) equal DamageUnit


Unit Group - Pick every Unit in (Units in(YourRegion)) and do (Unit - Set life of (Picked Unit) to ((Life of Picked Unit) - 1.00)

sorry i cannot find them
only :Einheitengruppe - Pick every unit in (Units in Unit enter <gen>) and do (Einheit - Set life of (Picked unit) to (Leben of (Picked unit)))
 
doesn't work because

Unit Group - Pick every Unit in (Units in(YourRegion)) and do (Unit - Set life of (Picked Unit) to ((Life of Picked Unit) - 1.00) is need and i have:
Einheitengruppe - Pick every unit in (Units in Unit enter <gen>) and do (Einheit - Set life of (Picked unit) to (Leben of (Picked unit))) -1.00 i smissing :( but i cant choose this option
 
choose arithmetic, then click the first field and select "life of triggering Unit", then click the second field and choose "-" then click the third field and select "1"

as you are german obviously i can show you a screenshot
 

Attachments

  • life of unit.jpg
    life of unit.jpg
    53.1 KB · Views: 97
thank you got that part ^^

next problem ...
(YourRegion) contains (DamagedUnit) equal to true

only got
(Entering unit) equal DamageUnit
 
  • Events
    • Unit - a Unit enters <town region>
  • Conditions
  • Actions
    • Unit - set life of "life generator" to life of life generator - 1.00
add conditions where you need them

is that what you want? if yes, it would help if you tell your complete problems next time ;)
 
it woooorks UreDe4D thank you
and thank you other guys for your help :)
i promise to explain the hole situation next time before i ask ^^

*happy*
 
Status
Not open for further replies.
Back
Top