- Joined
- Sep 3, 2006
- Messages
- 940
Here's a trigger I'm making for a spell called Spider Sense (on request):
I don't see why this shouldn't work :S Something to do with unit-groups within player-groups, maybe?
-
SpiderSenseGUI
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Spider Sense
-
Actions
- Set SECaster = (Triggering unit)
- Set SECasterLoc = (Position of SECaster)
- Set SECasterOwner = (Owner of SECaster)
- Set SEEnemyPlayers = (All enemies of SECasterOwner)
-
Player Group - Pick every player in SEEnemyPlayers and do (Actions)
-
Loop - Actions
-
Unit Group - Pick every unit in (Units owned by (Picked player)) and do (Actions)
-
Loop - Actions
- Unit Group - Add (Picked unit) to SEGroupEnemies
-
Loop - Actions
-
Unit Group - Pick every unit in (Units owned by (Picked player) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
-
Loop - Actions
- Unit Group - Add (Picked unit) to SEGroupHeroes
-
Loop - Actions
-
Unit Group - Pick every unit in (Units owned by (Picked player)) and do (Actions)
-
Loop - Actions
-
Unit Group - Pick every unit in SEGroupEnemies and do (Actions)
-
Loop - Actions
- Unit - Grant shared vision of (Picked unit) to SECasterOwner
-
Loop - Actions
-
Unit Group - Pick every unit in SEGroupHeroes and do (Actions)
-
Loop - Actions
- Unit - Create 1 Dummy Unit for SECasterOwner at SECasterLoc facing Default building facing degrees
- Unit - Add a 10.00 second Generic expiration timer to (Last created unit)
- Unit - Add Spider Sense (Dummy Ability) to (Last created unit)
- Unit - Order (Last created unit) to Human Sorceress - Slow (Picked unit)
-
Loop - Actions
- Wait 8.00 seconds
-
Unit Group - Pick every unit in SEGroupEnemies and do (Actions)
-
Loop - Actions
- Unit - Deny shared vision of (Picked unit) to SECasterOwner
-
Loop - Actions
- Unit Group - Remove all units from SEGroupEnemies
- Unit Group - Remove all units from SEGroupHeroes
- Custom script: call RemoveLocation(udg_SECasterLoc)
-
Events
Variable Name | Variable Type | Initial Value |
SECaster | Unit | - None - |
SECasterLoc | Point | - None - |
SECasterOwner | Player | - None - |
SEEnemyPlayers | Player Group | Empty Player Group (Default) |
SEGroupEnemies | Unit Group | Empty Unit Group (Default) |
SEGroupHeroes | Unit Group | Empty Unit Group (Default) |
I don't see why this shouldn't work :S Something to do with unit-groups within player-groups, maybe?
Attachments
Last edited: