• 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!

Help with 'sucking units nearby' ?

Status
Not open for further replies.
Level 2
Joined
Feb 15, 2009
Messages
12
I am working on my own map,but i am more on terrains things so my triggering experience is not too good thats why i need help for some things.
On my map in the middle there is a big circle where i have a lot of waterfalls.The thing i want to do is to create a trigger when a unit gets close to the waterfalls to be sucked down in the middle and being damaged.Here i go with the begining of my trigger,maybe you can help me with finishing it.

  • WaterfallSucking
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units waterfallregionand) and do (Actions)
        • Loop - Actions
          • Unit - Turn collision for (Random units inwaterfallregion)
 
Before picking all units in a unit-group, you need this line:

  • Custom script: set bj_wantDestroyGroup = true
Then, you want to spam "point offset by distance towards angle" in a periodic trigger, of course both of those points need to be leak cleaned. The angle will be towards the center of the waterfall.

Indicating the "waterfall" has a "middle", do you mean to refer to a "drain" or a "vortex"?
 
Before picking all units in a unit-group, you need this line:

  • Custom script: set bj_wantDestroyGroup = true
Then, you want to spam "point offset by distance towards angle" in a periodic trigger, of course both of those points need to be leak cleaned. The angle will be towards the center of the waterfall.

Indicating the "waterfall" has a "middle", do you mean to refer to a "drain" or a "vortex"?

Well as long as i have no idea what does that custom script do can you make me test map with the full trigger?
What i mean is that they are a lot of waterfalls pointing at the same place some kind of whirlpool and there is a hole in the middle of the waterfalls where i want the units to be sucked when they get closer to the waterfalls.
 
Ok its like you people dont read what i write.I tell u that i cant work with triggers and you give me custom scripts...Its so simple i can explain it with words but i cant make it as a trigger,cant someone make me a testmap.... Every 0.2 seconds pick up every unit it region 'blabla',turn collision for the units in the region OFF,suck them to the center of region 'blabla' and damage them with 5dmg(for example).
 
First of all don't use 0.02 sec period coz it can cause massive lagg after a time.
  • WaterfallSucking
  • Events
  • Time - Every 0.03 seconds of game time
  • Conditions
  • Actions
  • Set Temp_Group = Units in waterfallreion within 1000 range
  • Unit Group - Pick every unit in (Temp_Group) and do (Actions)
    • Actions - Set Temp_Point[1] = Position of Picked unit
      • Set Temp_Point[2] = Center of waterfallregion
      • Set Temp_Point[3] = (Temp_Point[2] offset by (Distance between Temp_Point[1] and Temp_Poin[2] - 15.00) towards (Angle from Temp_Poin[2] to TempPoint[1]) degrees)
      • Unit - Turn off collosion for Picked unit
      • Unit - Move unit instantly to Temp_Point[3]
      • Unit - Turn on collosion for Picked unit
      • Unit - Cause (Picked unit) to damage (Picked unit), dealing 5 damage of attack type Chaos and damage type Normal
      • Custom script: call RemoveLocation (udg_TempPoint[1])
      • Custom script: call RemoveLocation (udg_TempPoint[2])
      • Custom script: call RemoveLocation (udg_TempPoint[3])
  • Custom script: call DestroyGroup(udg_TempGroup)
 
Status
Not open for further replies.
Back
Top