| 04-14-2004, 10:08 PM | #1 |
HI! Well im having some difficulties with a trigger of mine that (trust me) is impossible to do properly in the GUI; therefore, whoever can give me the JASS code for this... it would be much apreciated. I need this as an EVENT (if possible): 5 units ARE IN a (region), and are all (a particular unit) After that I think i can do the rest. It would be greatly appreciated if a person who is familiar with JASS can give me the JASS code. Thx guys |
| 04-14-2004, 11:03 PM | #2 | |
Quote:
Code:
Untitled Trigger 001
Events
Unit - A unit enters Region 000 <gen>
Conditions
(Number of units in (Units in Region 000 <gen> matching ((Unit-type of (Matching unit)) Equal to Footman))) Equal to 5
Actions
|
| 04-15-2004, 12:05 AM | #3 |
... well... it is an approach i have never tried before... and i thatnk you for the response very much... but when i add my actions, nothing happens; so i think ill share my whole story.. lol MarineComboRed Events Unit - A unit enters RED MERGE <gen> Conditions (Number of units in (Units in RED MERGE <gen> matching ((Unit-type of (Matching unit)) Equal to Rifleman))) Equal to 5 Actions Unit - Explode (Triggering unit) Unit - Explode (Matching unit) Unit - Create 1 Marine for Player 1 (Red) at (Center of RED HERO EXIT <gen>) facing Default building facing degrees this means its sorta a 5 for 1 tradeoff. there NEEDS to be 5 RIFLEMEN (nothing more, nothing less, or nothing else for that matter) THX AGAIN! |
| 04-15-2004, 12:09 AM | #4 | |
Quote:
"Unit - Explode (Matching unit)" there is no matching unit. you need to use a pick all units action for it to work, the condition is fine. |
| 04-15-2004, 12:12 AM | #5 |
Which is basically 'Pick all units of type X in region Y' 'Explode picked unit' |
| 04-15-2004, 12:57 AM | #6 |
OOpps... true... i missed that... but i have changed that part. still nothing happens |
| 04-15-2004, 01:16 AM | #7 | |
Quote:
post your trigger, you probably missed something minuet. I always do. |
| 04-15-2004, 07:52 PM | #8 | |
Quote:
MarineComboRed Events Unit - A unit enters RED MERGE <gen> Conditions (Number of units in (Units in RED MERGE <gen> matching ((Unit-type of (Matching unit)) Equal to Rifleman))) Equal to 5 Actions Unit Group - Pick every unit in (Units in RED MERGE <gen>) and do (Actions) Loop - Actions Unit - Explode (Triggering unit) Unit - Explode (Picked unit) Unit - Create 1 Marine for Player 1 (Red) at (Center of RED HERO EXIT <gen>) facing Default building facing degrees well.... thats it. Thx again |
| 04-15-2004, 07:58 PM | #9 | |
Quote:
Here is my trigger: Code:
Enter
Events
Unit - A unit enters Region 000 <gen>
Conditions
And - All (Conditions) are true
Conditions
(Unit-type of (Entering unit)) Equal to Footman
(Number of units in (Units in Region 000 <gen> matching ((Unit-type of (Matching unit)) Equal to Footman))) Equal to 4
Actions
Unit - Explode (Entering unit)
Unit Group - Pick every unit in (Units in Region 000 <gen> matching ((Unit-type of (Matching unit)) Equal to Footman)) and do (Unit - Explode (Picked unit))
Unit - Create 1 Knight for Player 1 (Red) at (Center of Region 000 <gen>) facing Default building facing degrees
|
| 04-15-2004, 08:32 PM | #10 |
Hey thx 4 the triggers... but im still having the same problem (nothing is happening)... would the fact that a beacon is inside the region have anything to do with it? ... because a beacon is recognised as a unit. confusing... lol thx again |
| 04-15-2004, 08:39 PM | #11 |
I'm guessing there are more than 5 units in the region...? If so, change the condition to "Is equal to or greater than" 5 |
| 04-15-2004, 08:53 PM | #12 | |
Quote:
I had no troubles with my trigger, I had 1 knight and 4 footmen in it, and then had a footman enter the region, and the footmen died and spawned a knight. all I can do now is say that you sould copy my triger right over, or lemme see your map |
| 04-21-2004, 12:25 AM | #13 |
hey guys thx 4 all ur help. sorry 4 not responding. was away a while. But yeah i got the trigger working. the reason was i had set it to 5 guys in the region with 1 walking in. thats 6 (i think...lol). So all that frustration over 1 number. just needed to be set to 4. so THANK YOU 4 THE HELP! |
| 04-21-2004, 08:25 PM | #14 |
well, why didn't you use periodic events that checks if there's 5 riflemen in a region ? and this isn't even considered "hard triggering" :) |
