- Joined
- Jul 19, 2007
- Messages
- 828
Hi. I need help to make a spell who works like a trap that is hidden for enemies and explodes and affects enemies with poison if the walks on it. The poison shall do damage per second. Any idéas how to do this?
Doesnt xecollider call GroupEnum every .025 or .03 sec?
It might be better to use that unit comes in range event thingy.
And I can have dozens of those things flying around in my map at the same time without any problems
Use goblin land mine.
Unit dies, if dying unit is land mine, then pick all units in 300 range of dying unit matching is enemy and alive and use dummy unit to apply poisons.
I have the exact spell but with entangle, so i could send it if you like. Easy as shit, just that i thought it didn't work until i realised that i had turned the trigger off....
Sure send it! Do you mean it has an entangling root effect when it explodes??
Originally Posted by Super-Sheep
Use goblin land mine.
Unit dies, if dying unit is land mine, then pick all units in 300 range of dying unit matching is enemy and alive and use dummy unit to apply poisons.
The map, i place a dummy unit and the trigger inside of it. I suggest you try figuring the rest out ofr your self. So you learn something from this^^
This is from one of my old maps. You can replace the Net Trap ability with a different ability for the effect you want, in this case its poison. So you can give the dummy unit 0-0 dmg and a poison attack and order it to attack the picked unit or use Shadow Strike or any similiar effect.
EDIT
Net Trap
Events
Unit - A unit Dies
Conditions
Or - Any (Conditions) are true
Conditions
(Unit-type of (Dying unit)) Equal to Net Trap
Actions
Set Point1 = (Position of (Dying unit))
Unit - Create 1 Dummy for (Owner of (Dying unit)) at Point1 facing 0.00 degrees
Set Dummy = (Last created unit)
-------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- --------
Unit - Add a 1.00 second Generic expiration timer to Dummy
-------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- --------
Set UnitGroup1 = (Units within 200.00 of Point1 matching ((((Owner of (Matching unit)) is an enemy of (Owner of (Dying unit))) Equal to True) and (((Unit-type of (Matching unit)) Equal to Mountain King) and (((Matching unit) is alive) Equal to True))))
Set UnitGroup2 = (Random 1 units from UnitGroup1)
Unit Group - Pick every unit in UnitGroup2 and do (Unit - Order Dummy to Orc Raider - Ensnare (Picked unit))
-------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- --------
Custom script: call RemoveLocation(udg_Point1)
Custom script: call DestroyGroup(udg_UnitGroup1)
Custom script: call DestroyGroup(udg_UnitGroup2)
Dont use OR in the conditions and UnitGroup2 is unnecessary it will just make your trap to work on one unit only.
Yes it works.
If you dont undestand anything just quit it.
Yeah sorry. You need "Pick all units in UnitGroup1 and do actions - Create 1 dummy, order dummy to cast to picked unit, add expiration timer". Now it should work on multiple units.
http://www.hiveworkshop.com/forums/pastebin.php?id=7rdvy4
To make more levels you can create new traps and name them as Trap lvl 1, 2, 3 and 4. And then use If/Then/Else actions to check if the unit was level 1, 2, 3 or 4 and then create the corresponding dummy.