• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[Trigger] Grond Damage

Status
Not open for further replies.

breeder

B

breeder

Hi! i have a problem with this :
aoelocks.png

I wont to damage all units that are not in region. But this trigger only damages target that leaves regeon las. Or, sometimes don't damage at all.
Ty for help.
p.s. i want to make a map like warlocks, if you'll help me with this trigger i'll be very happy =)
 
Well, can't you use as an event " Unit - A unit leave <region> and as condition <what unit leaves the region> and as action <damage (triggering Unit)> ?

Well when not, your trigger must be like this:

  • Untitled Trigger 001
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup == true
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Region 000 <gen> contains (Picked unit)) Equal to False
            • Then - Actions
              • Unit - Cause (Picked unit) to damage (Picked unit), dealing 500.00 damage of attack type Spells and damage type Normal
            • Else - Actions
 
I have number of regeons in the middle of the map. 1 is active. and i need to damage all units that are not in this regeon. I can't use "unit leave regeon" because every 15 seconds i make another regeon active. and it has less size. so if player stayed in last regeon, but now it stays out of next he'll don't take damage because he isn't e leaver of this regeon
but i'll try now your advice, ty.
 
it works! Thank you very much!
Can you give me another advice? How to remember all units names at the beggining of the game?
I have an array. And i create small regeon under every unit. When unit leave this regeon i write it's name in array with index=number_of_player. Maybe i can use any easier way?
 
you're right!)
yeah, new. decided to make a map :) i'm a bit newbie but i'll learn)
and another question, when player buy a hero in tavern, how can i create this hero not near tavern but in another place?
 
In general you can do this:

  • test
    • Events
      • Unit - A unit Sells a unit
    • Conditions
    • Actions
      • Set TempPoint = (Center of (Playable map area))
      • Unit - Remove (Sold unit) from the game
      • Unit - Create 1 (Unit-type of (Sold unit)) for (Owner of (Sold unit)) at TempPoint facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_TempPoint)
or this (better):

  • test
    • Events
      • Unit - A unit Sells a unit
    • Conditions
    • Actions
      • Set TempPoint = (Center of (Playable map area))
      • Unit - Move (Sold unit) instantly to TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
In the conditions, you can add for WHAT units this should happen and the TempPoint is the point, where unit is created.
 
works :) but if i have 8 players i need to do 8 triggers? because each player has his own temppoint
 
  • test
    • Events
      • Unit - A unit Sells a unit
    • Conditions
    • Actions
      • Unit - Remove (Sold unit) from the game
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Selling unit)) Equal to Player 1 (Red)
        • Then - Actions
          • Set TempPoint = (Center of (Playable map area))
          • Unit - Create 1 (Unit-type of (Sold unit)) for (Owner of (Sold unit)) at TempPoint facing Default building facing degrees
          • Custom script: call RemoveLocation(udg_TempPoint)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Owner of (Selling unit)) Equal to Player 2 (Blue)
            • Then - Actions
              • Set TempPoint = (Random point in (Playable map area))
              • Unit - Create 1 (Unit-type of (Sold unit)) for (Owner of (Sold unit)) at TempPoint facing Default building facing degrees
              • Custom script: call RemoveLocation(udg_TempPoint)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Owner of (Selling unit)) Equal to Player 3 (Teal)
                • Then - Actions
                  • Set TempPoint = (Rally-Point of (Triggering unit) as a point)
                  • Unit - Create 1 (Unit-type of (Sold unit)) for (Owner of (Sold unit)) at TempPoint facing Default building facing degrees
                  • Custom script: call RemoveLocation(udg_TempPoint)
                • Else - Actions
...and so on > Well you have to set the TempPoint now to each rect ^^
 
Status
Not open for further replies.
Back
Top