- Joined
- Nov 1, 2006
- Messages
- 1,612
Hopefully PurplePoot can help me with this one,
Everything (I haven't doubled checked though) is how I want it. I am pretty sure that I made up DestroyForce() so it would help if someone could give me the correct way to destroy a force too.
My problem is though that I need to convert the line where TempGroup is set (not as a global but as a local) to be able to fit into this trigger. Is it doable?
If anyone can spot a way to make this a more efficient trigger (PurplePoot ) let me know. Also I would like this ward to also trap any units that come within range of it once it is summoned, but I don't know how to do this (except I've heard you can create triggers within triggers, and then I think it could be done. Can I have help with that too?)
Finally, I also want this ability to pull the trapped units closer to the ward until they're 100 distance away, but I am virtually clueless as how pull units. Thank you.
-
Real
-
Events
- Unit - A unit Spawns a summoned unit
- Conditions
-
Actions
- Custom script: local unit TempUnit
- Custom script: local location TrapPoint = GetUnitLoc(GetSummonedUnit()
- Custom script: local force TempGroup
-
For each (Integer A) from 1 to 10, do (Actions)
-
Loop - Actions
- Set TempGroup = (Units within 600.00 of (Position of (Summoned unit)) matching ((((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True) and ((((Matching unit) has buff Trapped ) Equal to False) and (((Matching unit) is A structure) Equal to Fals
- Custom script: set TempUnit = GroupPickRandomUnit(TempGroup)
- Unit - Create 1 Dummy for (Owner of (Triggering unit)) at TrapGlobalPoint facing Default building facing (270.0) degrees
- Custom script: call CreateNUnitsAtLoc( 1, 'h00G', GetOwningPlayer(GetTriggerUnit()), TrapPoint, bj_UNIT_FACING )
- Unit - Turn collision for (Last created unit) Off
- Unit - Add Trap Rope to (Last created unit)
- Custom script: call IssueTargetOrderBJ( GetLastCreatedUnit(), "drain", TempUnit )
- Unit Group - Remove all units from TempGroup
- Custom script: call GroupClear( TempGroup )
- Custom script: set TempUnit = null
- Custom script: call DestroyForce(TempGroup)*
- Custom script: set TempGroup = null
-
Loop - Actions
- Custom script: call RemoveLocation(TrapPoint)
- Custom script: set TrapPoint = null
-
Events
Everything (I haven't doubled checked though) is how I want it. I am pretty sure that I made up DestroyForce() so it would help if someone could give me the correct way to destroy a force too.
My problem is though that I need to convert the line where TempGroup is set (not as a global but as a local) to be able to fit into this trigger. Is it doable?
If anyone can spot a way to make this a more efficient trigger (PurplePoot ) let me know. Also I would like this ward to also trap any units that come within range of it once it is summoned, but I don't know how to do this (except I've heard you can create triggers within triggers, and then I think it could be done. Can I have help with that too?)
Finally, I also want this ability to pull the trapped units closer to the ward until they're 100 distance away, but I am virtually clueless as how pull units. Thank you.
Last edited: