pixels
08-30-2005, 11:24 AM
Currently I have it set as such:
Trigger("enemy"){
Conditions:
Switch("Switch1", set);
Actions:
Create Unit("Current Player", "Terran Marine", 1, "espawn1");
Order("Current Player", "Any unit", "espawn1", "end", move);
Wait(1000);
Preserve Trigger();
Comment("espawn 2");
}
But as I add more of these (theres several enemy spawn points) they all begin to lag behind. I have a set of hyper triggers, but they arent helping. I'm wondering if I made a 'timekeeper' zergling to move back and forth over a small area to trigger spawns would work instead.
http://www.warboards.org/attachment.php?attachmentid=2053
The zergling would move from the left and rightmost locations, and each time he's in the middle, a switch is set which allows units to spawn. Should work, right?
Another problem:
Trigger("defenders"){
Conditions:
Kill("Current Player", "Any unit", At least, 1);
Actions:
Set Resources("Current Player", Add, 1, gas);
Set Score("Current Player", Add, 1, Custom);
Preserve Trigger();
Comment("kill +");
}
Whats wrong with this? I want it to award for each kill, but as soon as I kill one unit it just keeps adding. I'm horrible with triggers: whats the right way to do this?
pixels
08-30-2005, 9:39 PM
Yeah, like LordofNukes said you need to do something else other than use the "wait" command. The timekeeper Zergling is a good idea, but I would modify it slightly, because I don’t know if I would trust StarCraft to detect the Zergling when it goes through such a small location. Whenever the Zergling reaches one end of your timekeeping strip, you’re going to make it turn around and go to the other end right? What I would do there is, at one end, not only would the Zergling be ordered to move to the other end but the switch would also be set in the same trigger. That way the triggers can’t miss the Zergling because the location is too small, because the Zergling will just sit at the end location until that it is ordered to the other side and the switch is set.
it works. i had to make the zergling area a bit bigger, but it works. besides, i could, if i wanted to, speed it up and slow it down with other units per round :p
As for the kills to minerals one, it sucks that you have to create one trigger for each kill value, I know. There are systems people have made, but if you know PHP you could get it to generate SCMDraft 2 triggers for you which would do something on each kill. That’s the main reason why I love TrigEdit triggers.
can i steal the script? :)
pixels
08-30-2005, 9:55 PM
If I had one, yes. But... I haven't got one yet. I thought you knew PHP so you could make your own.
Hi UED77 and Dark_Soul74! (since you're reading thist thread)
Oh, me? No I'm HORRID with code. Which is why I'm asking for help with triggers. I'm trying to use this one from SEN.. but I cant get it to work either.
Trigger("Player 1"){
Conditions:
Most Kills("Men");
Command("Player 8", "Terran Civilian", Exactly, 0);
Actions:
Comment("Most Kills");
Preserve Trigger();
Create Unit("Player 8", "Terran Civilian", 1, "7");
Set Resources("Current Player", Add, 1, gas);
Set Score("Current Player", Add, 1, Custom);
Create Unit("Player 8", "Terran Civilian", 1, "2");
Create Unit("Player 8", "Terran Civilian", 1, "3");
Create Unit("Player 8", "Terran Civilian", 1, "4");
Create Unit("Player 8", "Terran Civilian", 1, "5");
Create Unit("Player 8", "Terran Civilian", 1, "6");
}
//-----------------------------------------------------------------//
Trigger("Player 2"){
Conditions:
Most Kills("Men");
Command("Player 8", "Terran Civilian", Exactly, 0);
Actions:
Comment("Most Kills");
Preserve Trigger();
Create Unit("Player 8", "Terran Civilian", 1, "7");
Set Resources("Current Player", Add, 1, gas);
Set Score("Current Player", Add, 1, Custom);
Create Unit("Player 8", "Terran Civilian", 1, "1");
Create Unit("Player 8", "Terran Civilian", 1, "3");
Create Unit("Player 8", "Terran Civilian", 1, "4");
Create Unit("Player 8", "Terran Civilian", 1, "5");
Create Unit("Player 8", "Terran Civilian", 1, "6");
}
//-----------------------------------------------------------------//
Trigger("Player 3"){
Conditions:
Most Kills("Men");
Command("Player 8", "Terran Civilian", Exactly, 0);
Actions:
Comment("Most Kills");
Preserve Trigger();
Create Unit("Player 8", "Terran Civilian", 1, "7");
Set Resources("Current Player", Add, 1, gas);
Set Score("Current Player", Add, 1, Custom);
Create Unit("Player 8", "Terran Civilian", 1, "1");
Create Unit("Player 8", "Terran Civilian", 1, "2");
Create Unit("Player 8", "Terran Civilian", 1, "4");
Create Unit("Player 8", "Terran Civilian", 1, "5");
Create Unit("Player 8", "Terran Civilian", 1, "6");
}
//-----------------------------------------------------------------//
Trigger("Player 4"){
Conditions:
Most Kills("Men");
Command("Player 8", "Terran Civilian", Exactly, 0);
Actions:
Comment("Most Kills");
Preserve Trigger();
Create Unit("Player 8", "Terran Civilian", 1, "7");
Set Resources("Current Player", Add, 1, gas);
Set Score("Current Player", Add, 1, Custom);
Create Unit("Player 8", "Terran Civilian", 1, "1");
Create Unit("Player 8", "Terran Civilian", 1, "2");
Create Unit("Player 8", "Terran Civilian", 1, "3");
Create Unit("Player 8", "Terran Civilian", 1, "5");
Create Unit("Player 8", "Terran Civilian", 1, "6");
}
//-----------------------------------------------------------------//
Trigger("Player 5"){
Conditions:
Most Kills("Men");
Command("Player 8", "Terran Civilian", Exactly, 0);
Actions:
Comment("Most Kills");
Preserve Trigger();
Create Unit("Player 8", "Terran Civilian", 1, "7");
Set Resources("Current Player", Add, 1, gas);
Set Score("Current Player", Add, 1, Custom);
Create Unit("Player 8", "Terran Civilian", 1, "1");
Create Unit("Player 8", "Terran Civilian", 1, "2");
Create Unit("Player 8", "Terran Civilian", 1, "3");
Create Unit("Player 8", "Terran Civilian", 1, "4");
Create Unit("Player 8", "Terran Civilian", 1, "6");
}
//-----------------------------------------------------------------//
Trigger("Player 6"){
Conditions:
Most Kills("Men");
Command("Player 8", "Terran Civilian", Exactly, 0);
Actions:
Comment("Most Kills");
Preserve Trigger();
Create Unit("Player 8", "Terran Civilian", 1, "7");
Set Resources("Current Player", Add, 1, gas);
Set Score("Current Player", Add, 1, Custom);
Create Unit("Player 8", "Terran Civilian", 1, "1");
Create Unit("Player 8", "Terran Civilian", 1, "2");
Create Unit("Player 8", "Terran Civilian", 1, "3");
Create Unit("Player 8", "Terran Civilian", 1, "4");
Create Unit("Player 8", "Terran Civilian", 1, "5");
}
//-----------------------------------------------------------------//
Trigger("Player 7"){
Conditions:
Command("Player 1", "Any unit", Exactly, 0);
Actions:
Remove Unit At Location("Player 7", "Men", All, "1");
Preserve Trigger();
}
//-----------------------------------------------------------------//
Trigger("Player 7"){
Conditions:
Command("Player 2", "Any unit", Exactly, 0);
Actions:
Remove Unit At Location("Player 7", "Men", All, "2");
Preserve Trigger();
}
//-----------------------------------------------------------------//
Trigger("Player 7"){
Conditions:
Command("Player 3", "Any unit", Exactly, 0);
Actions:
Remove Unit At Location("Player 7", "Men", All, "3");
Preserve Trigger();
}
//-----------------------------------------------------------------//
Trigger("Player 7"){
Conditions:
Command("Player 4", "Any unit", Exactly, 0);
Actions:
Remove Unit At Location("Player 7", "Men", All, "4");
Preserve Trigger();
}
//-----------------------------------------------------------------//
Trigger("Player 7"){
Conditions:
Command("Player 5", "Any unit", Exactly, 0);
Actions:
Remove Unit At Location("Player 7", "Men", All, "5");
Preserve Trigger();
}
//-----------------------------------------------------------------//
Trigger("Player 7"){
Conditions:
Command("Player 6", "Any unit", Exactly, 0);
Actions:
Remove Unit At Location("Player 7", "Men", All, "6");
Preserve Trigger();
}
//-----------------------------------------------------------------//
Attached is the sample map... I tried replicating that but its not working :(
vBulletin® v3.7.2, Copyright ©2000-2008, Jelsoft Enterprises Ltd.