hi
i made this map. when i bring Jim Raynor(m) in location 0, it gives me the barracks and when jimmy is not at location 0, it must return the barracks to neutral but it doesn't do it.
i cannot understand where is the problem
Trigger("All players"){
Conditions:
Command("Current Player", "Any unit", At most, 0);
Actions:
Defeat();
}
//-----------------------------------------------------------------//
Trigger("All players"){
Conditions:
Command("Non Allied Victory Players", "Buildings", At most, 0);
Actions:
Victory();
}
//-----------------------------------------------------------------//
Trigger("Player 1","Player 2"){
Conditions:
Bring("Current Player", "Any unit", "Location 0", Exactly, 1);
Actions:
Give Units to Player("Player 12", "Current Player", "Terran Barracks", 1, "Location 1");
}
//-----------------------------------------------------------------//
Trigger("Player 1","Player 2"){
Conditions:
Command the Least At("Jim Raynor (Marine)", "Location 0");
Actions:
Give Units to Player("Current Player", "Player 12", "Terran Barracks", 1, "Location 1");
}
//-----------------------------------------------------------------//
Attachments:
Post has been edited 1 time(s), last time on Apr 28 2009, 7:57 pm by melnikov.
None.
I'm not exactly a master mapper but for something as small as this maybe you should jsut post the triggers pertaining to it. Some people are lazy to actually have to dl it.
None.
Command the Least At("Jim Raynor (Marine)", "Location 0");
Change to Bring("Current Player", "Jim Raynon (Marine)", "Location 0", Exactly, 0)
None.
Quote from name:TassadarZeratul
Command the Least At("Jim Raynor (Marine)", "Location 0");
Change to Bring("Current Player", "Jim Raynon (Marine)", "Location 0", Exactly, 0)
He's right, this is the issue, to explain it, when everyone brings 0 units to the location, no one has the least units there, so unless you have another Jim Raynor at that location for every other player as well, this trigger won't work.
None.
Quote from name:TassadarZeratul
Command the Least At("Jim Raynor (Marine)", "Location 0");
Change to Bring("Current Player", "Jim Raynon (Marine)", "Location 0", Exactly, 0)
i tried it but it doesn't work. when jimmy is not at location 0, the barracks are again mine.
None.
We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch
Look, the triggers are really easy: 2 brings
<Player owning the raynor>
C: Current Player brings at least 1 raynor to beacon
A: Give All Barracks at barracks owned by Neutral to Current Player
<Player owning the raynor>
C: Current Player brings at most 0 raynor to beacon
A: Give All Barracks at barracks owned by Current Player to Neutral
You can add a condition "Current Player brings at least 1 barracks to barracks" to the 2nd trigger to avoid unnecessary trigger firing, but that's optional.
We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch
It does. Do it EXACTLY like the triggers I posted.
There's no magic to it, triggers do what you're telling them.
If you tell the trigger to give the barracks from current player to neutral when 0 raynor are at the beacon location, then it will do just that.
Make sure though there's no other triggers interfering. For example, another player other than Current Player grabbing the Barracks. If you need that I can adjust the trigger accordingly.
now when i bring Jimmy at location 0(beacon), i cannot get the barracks.
why?
Attachments:
None.
We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch
You use Neutral Players instead of Neutral.
Do it EXACTLY like the triggers I posted.
Except add a preserve trigger.
Post has been edited 1 time(s), last time on Apr 29 2009, 9:29 pm by NudeRaider. Reason: removed wrong correction
None.
i added a preserve trigger and it works.
arigato, mr. Pigy_G
None.
We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch
Just to make sure you understand it:
Preserve trigger prevents triggers from getting deleted from memory after they have run once.
So if you need it to fire only one time for the whole duration of the map, you can leave it.
If the triggers should fire every time the condition becomes true, then you need the 'preserve trigger' action.
When triggers are posted it's usually assumed that you know that and add it on your own if it's necessary.
Do it EXACTLY like the triggers I posted.
Except add a preserve trigger.
The trigger will work just fine without it, but only once.