| 04-16-2007, 11:19 AM | #1 |
OK...I know u all had enought of me...but I really need help with my map. QUESTION: How to make trigger like this. Event: Unit Dies Condition: Dying unit equal to TempleOfTides Action: (THIS PART I DUNNO BUT IT MUST LOOK SOMETHING LIKE THIS) Remove 1 unit of type Necropolis and remove it from triggering player. This is idea i got so i cant cheat system so he thinks that my TempleOfTides is TownHall (coz i already tried classification ang gameplay constants.....nothing worked). Trigger idea is when TempleOfTides dies, Necropolis is removed from game too. PLEASE HELP........BEG BEG |
| 04-16-2007, 12:23 PM | #2 |
unit group - pick all units of type necropolis and do if owner of picked unit = owner of dying unit then unit remove picked unit woohoo. Not that hard. |
| 04-16-2007, 09:35 PM | #3 |
Well Much THX :D EIDT: Can u maybe modify this trigger so it doesn't remove all units of type, only 1 random unit of that type. |
| 04-16-2007, 10:38 PM | #4 |
Bump |
| 04-16-2007, 11:38 PM | #5 |
Like I posted on TheHiveWorkshop.com, Trigger: Took the actions from iNfraNe's input. EDIT: Oops. You want 1 random Necropolis. Edited the trigger. |
| 04-16-2007, 11:51 PM | #6 |
Trigger: Pretty easy to do, even for a total beginner. Next time don't give up so easily. ![]() |
| 04-16-2007, 11:52 PM | #7 |
That won't work if the unit picked is not owned by the player. Instead, change it to: Trigger: Set Leak_Group = (Random 1 units from (Units of type Necropolis owned by (Owner of (Triggering Unit))))Edit: Referring to Daxtreme's post |
| 04-16-2007, 11:52 PM | #8 |
Weird...I didn't see Dax's post until RIGHT after I posted... |
| 04-16-2007, 11:54 PM | #9 |
Btw why would you make the trigger so long..doesn't mine work too? |
| 04-16-2007, 11:55 PM | #10 |
Your triggers achieve the same results, but without the leak removal. |
| 04-17-2007, 01:40 AM | #11 |
So wait. Omg if that leaks then do all triggers leak unless I put that in them? Oh my lord. :O |
| 04-17-2007, 02:07 AM | #12 |
Triggers themselves don't leak, but their actions might. Let's analyze the leak there: Trigger: Unit - Remove (Random unit from (Units owned by (Owner of (Dying unit)) of type Temple of Tides)) from the gameThe answer is that it goes nowhere. The group exists, but we're NEVER going to use it again. Thus, it leaks. On a side note: is it possible to create enough leaks that all the handle indexes would be used? Would the game just crash, or is that even possible? |
| 04-17-2007, 03:03 AM | #13 | |
Quote:
Also, to destroy a group, you can do this: That line of custom script will destroy the next group created within the GUI picking scheme. Be careful though, cause if you call that and don't create a group, you may destroy a group you never intended to. |
| 04-17-2007, 01:12 PM | #14 |
Radament: Please read our rules regarding bumping of threads and double posting. PsycoMarauder: Ditto about the double posting. |
| 04-17-2007, 04:19 PM | #15 | |
Quote:
|
