The function you just used is "Integer(0.6)" which convert a real number 0.6 into an integer, which is 0. Minerals and other resources are integer type so your best solution is to multiply all by 100, like award 125 minerals and 60 minerals.
I was also haveing a problem similar to this (adding varing points dependent of unit type). Try this. Not tested yet.
They are all in attachements
One shows the 3 global variables that I used.
UnitKilledType assigns a value, (however many points you want) to UnitTypePoints and a unit type to UnitType
This one feels kind of barbaric, as I used a monstrous if then statement. Whenever a unit dies, it runs a integer loop from 1-64 (1- however many units types you have). Then it runs a check saying if the unit type in UnitType[spot number of check] = unit type of killed unit, then add the amount of points in UnitTypePoints[spot number of check] to PlayerPoints[killing player]
It shouldnt be to hard to instead add the number to the players mineral count.
I've ended up taking the easy route and using integers although this may mess up some of the balance I had created for the map.
I don't see why they just didn't allow reals, especially since they had to for supply.
You know you could just create a new variable
PlayerScore (type:real array:[0-15]
and use this to increment the rewarded value then you do a
then create a forumla for calculating if the new playerscore has increased in its "1's" positional value or higher and if it has reward the player money.
if it has only increased in the decimal range .01 or something then dont give them money and just increment the player score
Rollback Post to RevisionRollBack
Skype
KageNinpo = SN
My Libraries
DialogLeaderboard & TeamSort
My Projects
SPACEWAR Tribute
Infinite TD
To post a comment, please login or register a new account.
Is it possible to reward the killing players with a REAL number of minerals?
For example, is it possible to award a player with 1.25 minerals for killing a marine and 0.6 minerals for killing a zergling?
I've tried the trigger trigger, but it does not work even though I used convert real to integer
Player - Modify player (Killing player) Minerals: Add (Integer(0.6))
@gorang: Go
The function you just used is "Integer(0.6)" which convert a real number 0.6 into an integer, which is 0. Minerals and other resources are integer type so your best solution is to multiply all by 100, like award 125 minerals and 60 minerals.
@gorang: Go
I was also haveing a problem similar to this (adding varing points dependent of unit type). Try this. Not tested yet.
They are all in attachements
One shows the 3 global variables that I used.
UnitKilledType assigns a value, (however many points you want) to UnitTypePoints and a unit type to UnitType
This one feels kind of barbaric, as I used a monstrous if then statement. Whenever a unit dies, it runs a integer loop from 1-64 (1- however many units types you have). Then it runs a check saying if the unit type in UnitType[spot number of check] = unit type of killed unit, then add the amount of points in UnitTypePoints[spot number of check] to PlayerPoints[killing player]
It shouldnt be to hard to instead add the number to the players mineral count.
Good luck
FYI data has native support for this, specified as kill resource.
Edit, only as integers tho, but don't see the need for floating point values as ratios can be adjusted to whatever you require.
I've ended up taking the easy route and using integers although this may mess up some of the balance I had created for the map.
I don't see why they just didn't allow reals, especially since they had to for supply.
You know you could just create a new variable
then create a forumla for calculating if the new playerscore has increased in its "1's" positional value or higher and if it has reward the player money.
if it has only increased in the decimal range .01 or something then dont give them money and just increment the player score