| 06-29-2005, 11:22 AM | #1 |
Why do i use WEU!? I am trying to use a loop to create a hero dependant on which region was entered as follow [code] Events Unit Enters one of the 24 regions Condition (Unit-type of (Entering unit)) Equal to Wisp Actions For each (Integer A) from 1 to 24, do (Actions) Loop - Actions If ((Get triggering region) Equal to (Convert Hero_region[(Integer A)] to a region)) then do (Unit - Create 1 hero_type[(Integer A)] for (Owner of (Entering unit)) at (Center of (Playable map area)) facing Default building facing (270.0) degrees) else do (Do nothing) Set Player_hero[(Integer A)] = (Last created unit) can someone explain why that doesn't work!? Edit: Wait a sec, just realized i havnt put on Advanced triggers :S Close thread please realised the problem hadnt got advnaced triggers on |
| 06-29-2005, 03:48 PM | #2 |
Convert (rect) to region, seems like a type cast for me, I doubt it would work at all. In fact, you are doing it all wrong. You have to add the rect to a new region on map initialization then add the event for that region to that trigger. Then you just compare the Triggeirng Region with the region variable you used |
