It's what it says on the tin really. I've been trying to make this work unsuccessfully for a while now. I've found you lads from someone mentioning the forum on the official SC2 mapping forum. Anyway...
1) Period Timer, Units in Region...
I tried initially using entering and leaving region events, which switched on or off an int. This int was then checked in another trigger, which dispensed a reward if it was on. However this system doesn't account for the possibility of any units that happened to enter the area getting shot to pieces. Units in Region, or Units in Region Matching Conditions... might... but I havn't been able to get them to work, something about In Region not liking the fact the trigger does not have a unit based event, and then Matching Conditions doesn't like the fact a unit group is not involved. Eh, help! It's probably something simple too.
2) Get Unit Mineral Value...
The second issue I found was trying to make a responsive kill reward trigger. The default trigger works fine, that is, a unit any unit dies event, killing player condition, reward actions. Fair enough, but I want the reward to be relative to the mineral cost of the killed target. Otherwise a default kill reward value will encourage players to not use lower or higher end units, for fear of unfair rewards one way or another.
To top that little conundrum, I was wondering if there was a way (no doubt, with the mathematical triggers) to reduce this stated value a bit, so the reward is half or so, but not 100% of the killed target's worth.
i dont understand ur first question, explain it better please
your second question is really simple. Click on the parameter where u choose how much minerals, and go to functions, choose "Unit type cost". and set the unit type to (go to function again) "unit type of unit" and choose triggering unit. it will look like this:
i dont understand ur first question, explain it better please
your second question is really simple. Click on the parameter where u choose how much minerals, and go to functions, choose "Unit type cost". and set the unit type to (go to function again) "unit type of unit" and choose triggering unit. it will look like this:
duplicate the action and change the minerals to vespene gas
Hope this helped!
Okay, first off...
I want a trigger with a per second time event to check if any unit of a player is in a region.
I tried to do this using three triggers. One of them checked if a unit had entered, and another if a unit had left the region. Upon entering the region, an action set a variable to "1", a third trigger checked if this is so, and then proceeded to every second, grant the player minerals. If any units left the region, the variable was set to "0". If a unit was killed whilst standing inside of the region, the trigger did not consider that they had "left" the region, and continued to grant resources, as if one was still there. That was how I tried to do the triggers for the above problem.
The second issue is not as you suggested, I'll try and explain again.
Every time a player makes a kill, the value of that kill should in part be rewarded back to them in minerals. So, if they kill a marine, they earn 50, if they kill an ultralisk, they earn 300. I want to reduce the amount earnt too, so the reward is perhaps half... so if they kill a marine they earn 25 minerals, and an ultralisk warrants 150 minerals.
Half of the two problems are fixed! Someone helped on the main SC forum with...
<<quote>>@nodgene,
Hey there.
Personally, I would probably set the condition out like this:
- Number of units in unit group
- Type: living
- Unit group: [A function] Units in region matching condition
- <your options here, defaults are probably fine for what you're doing, except you may need a trigger for each player>
- is greater than
- 0
That should work, as far as I know, and shouldn't require a unit event.
It's what it says on the tin really. I've been trying to make this work unsuccessfully for a while now. I've found you lads from someone mentioning the forum on the official SC2 mapping forum. Anyway...
1) Period Timer, Units in Region...
I tried initially using entering and leaving region events, which switched on or off an int. This int was then checked in another trigger, which dispensed a reward if it was on. However this system doesn't account for the possibility of any units that happened to enter the area getting shot to pieces. Units in Region, or Units in Region Matching Conditions... might... but I havn't been able to get them to work, something about In Region not liking the fact the trigger does not have a unit based event, and then Matching Conditions doesn't like the fact a unit group is not involved. Eh, help! It's probably something simple too.
2) Get Unit Mineral Value...
The second issue I found was trying to make a responsive kill reward trigger. The default trigger works fine, that is, a unit any unit dies event, killing player condition, reward actions. Fair enough, but I want the reward to be relative to the mineral cost of the killed target. Otherwise a default kill reward value will encourage players to not use lower or higher end units, for fear of unfair rewards one way or another. To top that little conundrum, I was wondering if there was a way (no doubt, with the mathematical triggers) to reduce this stated value a bit, so the reward is half or so, but not 100% of the killed target's worth.
Thanks in advance.
@nodgene: Go
i dont understand ur first question, explain it better please
your second question is really simple. Click on the parameter where u choose how much minerals, and go to functions, choose "Unit type cost". and set the unit type to (go to function again) "unit type of unit" and choose triggering unit. it will look like this:
duplicate the action and change the minerals to vespene gas
Hope this helped!
Okay, first off...
I want a trigger with a per second time event to check if any unit of a player is in a region.
I tried to do this using three triggers. One of them checked if a unit had entered, and another if a unit had left the region. Upon entering the region, an action set a variable to "1", a third trigger checked if this is so, and then proceeded to every second, grant the player minerals. If any units left the region, the variable was set to "0". If a unit was killed whilst standing inside of the region, the trigger did not consider that they had "left" the region, and continued to grant resources, as if one was still there. That was how I tried to do the triggers for the above problem.
The second issue is not as you suggested, I'll try and explain again. Every time a player makes a kill, the value of that kill should in part be rewarded back to them in minerals. So, if they kill a marine, they earn 50, if they kill an ultralisk, they earn 300. I want to reduce the amount earnt too, so the reward is perhaps half... so if they kill a marine they earn 25 minerals, and an ultralisk warrants 150 minerals.
Does this help? :)
@nodgene: Go
second, you can just do algebra with value 1 as (what he said) than divide by (i think in ge its /) 2
first, do when a unit dies, do a check for all units in the region. if the count is 0, set variable to 0.
@illidans911: Go
How do I check for the unit count in the region?
Half of the two problems are fixed! Someone helped on the main SC forum with...
<<quote>>
@nodgene,Hey there.
Personally, I would probably set the condition out like this: - Number of units in unit group - Type: living
- Unit group: [A function] Units in region matching condition- <your options here, defaults are probably fine for what you're doing, except you may need a trigger for each player> - is greater than- 0That should work, as far as I know, and shouldn't require a unit event.
Good luck!<</quote>>
Okay, last issue fixed. Issues resolved.
I managed to use a series of actions to get it working as I'd like it. As I wanted something relative to build cost.
Event...Unit - any unit dies
(Killing player) == 1
-Var Set "VarX" = (Mineral cost of (Unit type of (triggering unit))) -Var Set "VarX" = (VarX / 2) -Player - Modify player "1" Minerals: "VarX"
:) Seems to work!