Haven't encountered this. Possibly the map was corrupted while uploading? Do you have a copy of the version that broke the banks? If so you should try uploading it with a different name and see if it reproduces the problem :)
I'm pretty sure it's showing as slightly off because the reals are stored as base 16, and as such cannot be represented with perfect decimal precision.
(Actually 12 bit decimal part, see Jademus' post)
So your problem is not your rounding methods, but how the reals are being represented.
For example, if you set a real value to 2.9 and then without doing anything to it, display it with ANY precision, it will show as 2.8999.
So when you convert reals to text in game you should just set the precision to 2 decimal places if you want to show the approximate decimal value. E.g. instead of
UI - Display (Text(real) with Any Precision decimal places)
use:
UI - Display (Text(real) with 2 decimal places)
Maybe changing the mover to fly and unchecking all the collide flags? Do you want to apply it to a whole unit type or to a single unit in a certain situation?
If you are wanting to get the name of the presets into a string, I don't think that is possible. Presets don't actually exist in the galaxy code, the GUI just sets all the preset integers when converting to it.
However to do what you want, you can either:
Give each preset a string value by selecting Custom Script (String) in the preset definition and assigning a string to each preset value.
E.g. for the preset called Helm, set the custom script to "Helm" (Incl. quotations)
Or, you could make a custom function that converts any of your integer preset values into a string.
Merge the regions with Numpad 0 and make the region that you want cut out negative.
For the region within the small cut out portion, it has to be a seperate region. It cannot be merged with the other two or the negative one will cancel it out.
@Terhonator: Go
@SoulTaker916: Go
You can do that but if you want the current number of units you'll have to update the count when a colonist dies as well.
ALSO in your trigger you will need to change the Event: Unit - (Triggering unit) part to "Any Unit"
You could also use this to get the current number of Infested Colonists (But change unit type):
0
Haven't encountered this. Possibly the map was corrupted while uploading? Do you have a copy of the version that broke the banks? If so you should try uploading it with a different name and see if it reproduces the problem :)
0
Déjà vu
0
Thanks for that.
0
@PerAnimus: Go
I'm pretty sure it's showing as slightly off because the reals are stored as base 16, and as such cannot be represented with perfect decimal precision.(Actually 12 bit decimal part, see Jademus' post)So your problem is not your rounding methods, but how the reals are being represented.
For example, if you set a real value to 2.9 and then without doing anything to it, display it with ANY precision, it will show as 2.8999.
So when you convert reals to text in game you should just set the precision to 2 decimal places if you want to show the approximate decimal value.
E.g. instead of
UI - Display (Text(real) with Any Precision decimal places)
use:
UI - Display (Text(real) with 2 decimal places)
0
@TyaStarcraft: Go
If you do that 2.89 would be rounded to 2.8 instead of 2.9 (Would be fine if he wanted to always round down)
0
@Mugen245: Go
Edit: Actually nvm what you are doing should be fine. Just put a semicolon after DualKill()
0
@lemmy734: Go
Maybe changing the mover to fly and unchecking all the collide flags? Do you want to apply it to a whole unit type or to a single unit in a certain situation?
0
@PerAnimus: Go
The "Modulo (real)" function.
0
I'm not sure if you can get a name from a region, but you can get a region from a region name using "Region From Name" function.
0
Something like this also should work (Use Modulo (real) function):
0
Set the unit's minimap radius to 0
0
Lol what happened?
0
@PerAnimus: Go
If you are wanting to get the name of the presets into a string, I don't think that is possible. Presets don't actually exist in the galaxy code, the GUI just sets all the preset integers when converting to it.
However to do what you want, you can either:
Give each preset a string value by selecting Custom Script (String) in the preset definition and assigning a string to each preset value.
E.g. for the preset called Helm, set the custom script to "Helm" (Incl. quotations)
Or, you could make a custom function that converts any of your integer preset values into a string.
Edit: Lol dupe answer basically :D
0
Merge the regions with Numpad 0 and make the region that you want cut out negative.
For the region within the small cut out portion, it has to be a seperate region. It cannot be merged with the other two or the negative one will cancel it out.
0
@Terhonator: Go @SoulTaker916: Go
You can do that but if you want the current number of units you'll have to update the count when a colonist dies as well.
ALSO in your trigger you will need to change the Event: Unit - (Triggering unit) part to "Any Unit"
You could also use this to get the current number of Infested Colonists (But change unit type):