HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

More. Trigger. Misery.

02-07-2009, 07:21 PM#1
holyadvocate
Trigger:
Take
Collapse Events
Unit - A unit enters (Region centered at (Position of Forest Troll Hut 0000 <gen>) with size (300.00, 300.00))
Unit - A unit leaves (Region centered at (Position of Forest Troll Hut 0000 <gen>) with size (300.00, 300.00))
Collapse Conditions
(Number of units in (Units in (Region centered at (Position of Forest Troll Hut 0000 <gen>) with size (300.00, 300.00)) matching ((Owner of (Matching unit)) Not equal to (Owner of Forest Troll Hut 0000 <gen>)))) Greater than (Number of units in (Units in (Region centered at (Position of Forest Troll Hut 0000 <gen>) with size (300.00, 300.00)) matching ((Owner of Forest Troll Hut 0000 <gen>) Equal to (Owner of (Matching unit)))))
Collapse Actions
Unit - Change ownership of Forest Troll Hut 0000 <gen> to (Owner of (Random unit from (Units in (Region centered at (Position of Forest Troll Hut 0000 <gen>) with size (300.00, 300.00)) matching ((Owner of (Matching unit)) Not equal to (Owner of Forest Troll Hut 0000 <gen>))))) and Change color
Unit - Change ownership of Forest Troll Hut 0000 <gen> to Player 1 (Red) and Change color

I assume this should be working, but it isnt, so obviously it shouldnt be, right?


It is supposed to do something similar to the Illidan Cage scenario in TFT, the only way to take over the cage was to have the largest number of units in the area around the Cage. Here, the object is a building....

also... do the Melee Init triggers ignore other triggers, so that they dont work?
02-08-2009, 02:37 AM#2
DioD
What this trigger should do?
02-08-2009, 03:02 AM#3
mobofone
Well first of all, tell people what the trigger should do, and here i think this should work. Change the condition to something else eh? xD but try unit Condition - (Number of units in (region centerd at (position of (triggering unit)) with size (###.## , ###.##)))) Greater than or equal to # | im to lazy to type the rest, but u should get where i am going. u might have to simplify your condition also. i have same problems also >.<
02-08-2009, 06:20 AM#4
ShadowWolf
This is really poorly coded. You really need to clean this up and remove all the leaks. The condition is over complicated, which makes it hard to pinpoint what is wrong. It seems the events dont match what you're trying to accomplish. If the trigger isn't firing at all (you can test with debug messages) then the fault lies within the condition.
02-11-2009, 03:12 AM#5
holyadvocate
This is the first attempt at doing something like this, so i have no experience here at all. Thought i said what it did in the op, my bad.

It is supposed to do something similar to the Illidan Cage scenario in TFT, the only way to take over the cage was to have the largest number of units in the area around the Cage. Here, the object is a building....
02-11-2009, 03:31 AM#6
ShadowWolf
Seeing as the troll hut is preset, why don't you make the region preset as well? It would make the trigger a lot easier to read and fix. Also try to clean up the leaks.
02-12-2009, 12:03 AM#7
holyadvocate
This is supposed to be copied for multiple bases, i was trying to make this function as smoothly as possible with as little work as possible, it does, unfortunately, look as if ill have to use regions...
02-12-2009, 12:23 AM#8
WILL THE ALMIGHTY
Uhm

The problem is the trigger changes the owner to the player who entered/left the region but then changes it to Player 1 Red right after. You need two triggers for this, one for entering, one for leaving.

EDIT: Also, your first action is way too complicated. just use "Change owner of (forest hut 0000) to (Player - Owner of Triggering unit)". Triggering unit can also be Entering unit or Leaving unit.