I'm working on a map where I want to assign different values to different types of units killed each time one is killed. Keep in mind this is not a mass killing type of map and therefore reaction speed for triggers isn't that important.
I want to assign 10 ore to a kill for a marine, or ghost, or missile turret, etc. The ways I have tried to do this are as follows, but the preserve trigger function makes it continually fire and I continue to get money past the one kill:
Failed trigger 1:
Player 1-
Conditions:
Current player's razings score is at least 1
Actions:
Modify score for current player: Subtract 1 razings.
Modify resources for current player: Add 3 ore.
Preserve Trigger.
Failed trigger 2:
Player1-
Conditions:
Current player kills one Turret
Actions:
Modify resources for current player: Add 3 ore.
Preserve Trigger.
On the second trigger I experimented with adding switches to the point where I got it to add 3 ore and not add anymore, but it would not fire again if I killed another turret... for some reason I couldn't get the switches to set or clear, or whatever so they would refire. If anyone could help me with this I would greatly appreciate it...
Another question I have is how to make a trigger to automatically fill a missile silo with a nuke for a human player. Does anyone know how to do this?
I need trigger help
-
- Terran Settler (Unemployed)
- Posts: 2
- Joined: Thu Jun 21, 2007 5:00 pm
- Lavarinth
- Xel'naga Administrator
- Posts: 6539
- Joined: Wed Aug 16, 2006 5:21 pm
- Location: His Ashworld Planet
Re: I need trigger help
Try this.
Switch triggers:
Condition:
Whatever it was to start at beginning of map.
Action:
Set TURRET to Off.
Condition:
Player kills Turret.
TURRET Switch is Off.
Action:
Change TURRET to On.
Wait 1 second.
Preserve trigger.
Condition:
TURRET Switch is On.
Action:
Modify resources for current player: Add 3 ore.
Change TURRENT to Off.
Preserve trigger.
Downfall: Will only work every 1 second, so if you kill more than one within that time, I don't think it'll work.
Switch triggers:
Condition:
Whatever it was to start at beginning of map.
Action:
Set TURRET to Off.
Condition:
Player kills Turret.
TURRET Switch is Off.
Action:
Change TURRET to On.
Wait 1 second.
Preserve trigger.
Condition:
TURRET Switch is On.
Action:
Modify resources for current player: Add 3 ore.
Change TURRENT to Off.
Preserve trigger.
Downfall: Will only work every 1 second, so if you kill more than one within that time, I don't think it'll work.
- - Lavarinth
Campaign Creations Administrator
Campaign Creations Administrator
Re: I need trigger help
You know, the more I look at SCs switch system the more it reminds me off VBs boolean system. Actually the triggering system in general reminds me of VB, but I think it has more to do with both requiring you to jump through hoops to get something simple done.
-
- Terran Settler (Unemployed)
- Posts: 2
- Joined: Thu Jun 21, 2007 5:00 pm
Re: I need trigger help
Lavarinth: here's what I put in for those three triggers, but it still continues to fire and I get 3 ore every two seconds or so. It won't stop giving money...
Condition:
Always
Action
Clear TURRET
Condition
Current player kills exactly 1 missile turret
TURRET is cleared
Action
Set TURRET
Wait 1000 milliseconds
Preserve Trigger
Condition
TURRET is set
Action
Modify resources for current player: add 3 ore
Clear TURRET
Preserve trigger
Like i said, it continues to add three ore instead of just the 3 and stopping... damn SC triggers are annoying.
Any other ideas? I'm fresh out... by the way, any clue on a trigger to auto load a nuclear missile silo?
Condition:
Always
Action
Clear TURRET
Condition
Current player kills exactly 1 missile turret
TURRET is cleared
Action
Set TURRET
Wait 1000 milliseconds
Preserve Trigger
Condition
TURRET is set
Action
Modify resources for current player: add 3 ore
Clear TURRET
Preserve trigger
Like i said, it continues to add three ore instead of just the 3 and stopping... damn SC triggers are annoying.
Any other ideas? I'm fresh out... by the way, any clue on a trigger to auto load a nuclear missile silo?
- Lavarinth
- Xel'naga Administrator
- Posts: 6539
- Joined: Wed Aug 16, 2006 5:21 pm
- Location: His Ashworld Planet
Re: I need trigger help
No idea on the auto-load, however, the reason it's doing that is because now it has EXACTLY one Silo kill, if it gets TWO kills it'd probably stop, try messing with the less than, equal to, more than. Try setting it more than 0. Though, it'd probably have the same effect. Honestly, I'm rusty, and I've yet to look at StarEdit while typing all this out. I'll look and mess with, when I get home. I'm at work at the moment. If all else fails, look at other maps that do similar things and look at their triggers.
- - Lavarinth
Campaign Creations Administrator
Campaign Creations Administrator
- Freakohollik
- Terran Barracks Laundry Master
- Posts: 36
- Joined: Fri May 25, 2007 11:49 pm
Re: I need trigger help
The problem is that both triggers are going off here. I'll refer to the trigger with turret is cleared in its conditions as trigger 1 and the trigger with turret is set as trigger 2. Okay, so you kill a turret. Trigger 1 goes off. TURRET is set. Trigger 2 goes off and clears TURRET. You have still killed one turret and and TURRET is clear. So trigger 1 goes off. There is your loop.reggielew wrote: Lavarinth: here's what I put in for those three triggers, but it still continues to fire and I get 3 ore every two seconds or so. It won't stop giving money...
Condition:
Always
Action
Clear TURRET
Condition
Current player kills exactly 1 missile turret
TURRET is cleared
Action
Set TURRET
Wait 1000 milliseconds
Preserve Trigger
Condition
TURRET is set
Action
Modify resources for current player: add 3 ore
Clear TURRET
Preserve trigger
Like i said, it continues to add three ore instead of just the 3 and stopping... damn SC triggers are annoying.
Any other ideas? I'm fresh out... by the way, any clue on a trigger to auto load a nuclear missile silo?
I haven't used staredit in years so I'm not totally sure whats going wrong with failed trigger 1 in your first post. It looks like it should work though. There's probably some weird staredit issue that I am not aware of that makes it not work.
- Mucky
- Protoss Khalai Missionary
- Posts: 1014
- Joined: Thu Aug 24, 2006 10:35 pm
Re: I need trigger help
So, is this map for single player or multiplayer?
If this is a single player map, you can do this:
As far as I know, it's impossible to set an individual bounty for each unit killed using this method. Since SC runs triggers every 2 seconds or so, it's very easy for points to accumulate above set unit values and achieve undesired effects. Also, many units have the same amount of points, and will therefore overlap.
I saw a document on this site a few years back that contained all the values for every unit and building. No idea if it's still up, so I've included it as an attachment.
If this is a single player map, you can do this:
The flaw with this trigger is that you can't detect who actually killed the turret. However, in single where there's only one player involved, it's unnecessary. In multiplayer, it's a different story. In that case, you're limited to using this method:Conditions:
- Player 2 has suffered at least 1 deaths of Terran Missile Turret.
Actions:
- Modify death counts for Player 2: Subtract 1 for Terran Missile Turret.
- Modify resources for Player 1: Add 3 Minerals.
- Preserve trigger.
Basically, divide the "score is at least" number by 2, and keep going until you get down to '1'. If you don't want to give so many minerals, you can divide the amount awarded down, but you need to keep a constant ratio.Conditions:
- Current player Razings score is at least 1024.
Actions
- Modify score for Current player: Subtract 1024 Razings.
- Modify resources for Current player: Add 1024 Minerals.
- Preserve trigger.
Conditions:
- Current player Razings score is at least 512.
- Current player Razings score is at most 1023.
Actions
- Modify score for Current player: Subtract 512 Razings.
- Modify resources for Current player: Add 512 Minerals.
- Preserve trigger.
These triggers are subtracting score and awarding minerals on a 4:1 ratio. You can go even further and use a 8:1 ratio, which would be 128 minerals for 1024 points, 64 for 512, etc. You'd stop until the amount of minerals awardable is at 1. You'll have some score points left over, but you can't do anything with them, so don't worry about it.Conditions:
- Current player Razings score is at least 1024.
Actions
- Modify score for Current player: Subtract 1024 Razings.
- Modify resources for Current player: Add 256 Minerals.
- Preserve trigger.
Conditions:
- Current player Razings score is at least 512.
- Current player Razings score is at most 1023.
Actions
- Modify score for Current player: Subtract 512 Razings.
- Modify resources for Current player: Add 128 Minerals.
- Preserve trigger.
As far as I know, it's impossible to set an individual bounty for each unit killed using this method. Since SC runs triggers every 2 seconds or so, it's very easy for points to accumulate above set unit values and achieve undesired effects. Also, many units have the same amount of points, and will therefore overlap.
I saw a document on this site a few years back that contained all the values for every unit and building. No idea if it's still up, so I've included it as an attachment.
You do not have the required permissions to view the files attached to this post.