I am not sure if this is a trigger a leader board or some kind of bank, what i am trying to do is convert the score you get from killing units into a point pool, then from this pool you could use points to buy units. So for instance Player 1 kills a fire bat and gets say 150 points for killing the fire bat, and can then spend 50 points to buy another unit, those 50 points come out of that point pool.
There are a few ways you could do that and it doesn't have to use triggers.
The data way is pretty simple. For each unit, in the field "Combat - Kill Resource", you would set the amount awarded for killing the unit. Then all you need to do is set the cost of the units you are training to equal to the same resource type awarded on the other unit types death.
Using your example, Killing a Firebat awards 150 points. Instead, consider Vespene Gas as the points, so a Firebat would award 150 Vespene Gas when killed. Marines might cost 50 Vespene Gas to train, so you could train up to 3 per Firebat kill.
If you are already using Vespene Gas in the map for something else, consider using Terrazine or Custom Resource as a replacement.
Triggers start getting a bit more complex, but may be necessary if you are using all the resource types already.
I am not quite sure what you mean, but the units arnt really being bought they are being triggered when you bring you summoning dude to a beacon, similar to the old BW mtg maps, i already have the triggers in place to spawn the units when the dude steps on the beacon but i need to have some kinda point pool dictating how much the cost.
Edit each unit's "Combat - Kill Resource" data value to be a certain amount of minerals
When a unit steps in the beacon, run a loop that checks if a player has more than X minerals. If he does, remove X amount of minerals from the player and spawn 1 unit. If you don't want to use minerals, use Terrazine or Custom Resource.
Np :). It sounds like you already have a unit purchasing system worked out, all you really have to do is change it from using score to buy units to a resource.
Actually i cant find that in the data i can see unit cost, unit kill score, unit build score but I cant seem to find the field for combat kill resource im looking in the data editor, am in the wrong place?
Now that I know you have an existing trigger system in place I can be a bit more specific with my answer.
"Kill Resource" is directly under "Kill Experience" which is about 8 fields above "Cost - Cost". Attached is an image showing where it is on the unit's details.
The trigger for purchasing should look something like this:
// Event: Unit - Any Unit Enters a distance of 1.0 from Beacon// Condition: (Minerals for (Owner of Triggering Player)) >= (Minerals cost of Unit Type)// Actions:// Player - Modify player (Owner of Triggering Unit) Minerals: Subtract (Minerals cost of Unit Type)// Unit - Create 1 (Unit Type) for player (Owner of Triggering Unit) at (Wherever) facing (Random angle) degree (No Options)
"Unit Type Cost" allows you to get the resource cost for a unit type, so you don't hard code it in. This will be really useful if you have to balance the cost for the unit later, so you don't have to modify it in the trigger editor.
I am not sure if this is a trigger a leader board or some kind of bank, what i am trying to do is convert the score you get from killing units into a point pool, then from this pool you could use points to buy units. So for instance Player 1 kills a fire bat and gets say 150 points for killing the fire bat, and can then spend 50 points to buy another unit, those 50 points come out of that point pool.
@fattestcat: Go
There are a few ways you could do that and it doesn't have to use triggers.
The data way is pretty simple. For each unit, in the field "Combat - Kill Resource", you would set the amount awarded for killing the unit. Then all you need to do is set the cost of the units you are training to equal to the same resource type awarded on the other unit types death.
Using your example, Killing a Firebat awards 150 points. Instead, consider Vespene Gas as the points, so a Firebat would award 150 Vespene Gas when killed. Marines might cost 50 Vespene Gas to train, so you could train up to 3 per Firebat kill.
If you are already using Vespene Gas in the map for something else, consider using Terrazine or Custom Resource as a replacement.
Triggers start getting a bit more complex, but may be necessary if you are using all the resource types already.
@VoidPotato: Go
I am not quite sure what you mean, but the units arnt really being bought they are being triggered when you bring you summoning dude to a beacon, similar to the old BW mtg maps, i already have the triggers in place to spawn the units when the dude steps on the beacon but i need to have some kinda point pool dictating how much the cost.
@wOlfLisK: Go
Ahhh, thank you for the clarification\education.
@fattestcat: Go
Np :). It sounds like you already have a unit purchasing system worked out, all you really have to do is change it from using score to buy units to a resource.
@wOlfLisK: Go
Actually i cant find that in the data i can see unit cost, unit kill score, unit build score but I cant seem to find the field for combat kill resource im looking in the data editor, am in the wrong place?
Now that I know you have an existing trigger system in place I can be a bit more specific with my answer.
"Kill Resource" is directly under "Kill Experience" which is about 8 fields above "Cost - Cost". Attached is an image showing where it is on the unit's details.
The trigger for purchasing should look something like this:
"Unit Type Cost" allows you to get the resource cost for a unit type, so you don't hard code it in. This will be really useful if you have to balance the cost for the unit later, so you don't have to modify it in the trigger editor.