• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Real values without decimals and caster upgrade texts

Status
Not open for further replies.
Level 7
Joined
Feb 10, 2011
Messages
133
Hello,
I tried to make a quest, in which its number change so I put String + String(convert from real in format) + string
all the needed things, I formated so that there would be [Real] 0 0 but it still shows the decimal numbers, any ideas how to deal with it?

Also, I wanted to give my units special caster upgrades text that wouldn't read ''increased hit points, mana points, mana regeneration and attack damage'' at its bottom but what I want, I searched everything that could possibly have it (gameplay constants and gameplay interface along with all caster upgrade upgrades) but none of it showed any interaction with it.
Any idea how to deal with that?
 
Level 12
Joined
Feb 22, 2010
Messages
1,115
1)Convert real to integer first, then convert integer to string at the end.Also what number are you trying to convert, is it a real number naturally?

2)Where is this text exactly?
 
Level 7
Joined
Feb 10, 2011
Messages
133
1)Convert real to integer first, then convert integer to string at the end.Also what number are you trying to convert, is it a real number naturally?

it is natural number, it counts 0,1,2,3,4 and 5

2)Where is this text exactly?

when you have a caster (priest lets say) and he has his caster upgrade (initiate, adept and master), when you hoover above that icon it shows
Rank:

Name: Adept/Master
Upgrade: Priest Adept/Master Training

Spells:
- Heal
- Dispel Magic
(- Inner Fire)

Increased mana pool, mana regeneration and hit points.

How can I remove the ''Increased mana pool, mana regeneration and hit points.'' text?
 
Level 7
Joined
Feb 10, 2011
Messages
133
If you add up 2 reals, and then use it as integer it will round up to usable number.

2.1 + 2.1 = 4.2 (40)



I don't know which event you want to use here, but once upgrade is applied add 3 custom abilities to the unit, one for damage, one for hp, one for mana. Pretty simple actually.

I am not sure that I understand the first part but it doesnt mazzer, I've solved that already

What about the second part? I dont understand a single thing of that that would help my problem
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
If you add up 2 reals, and then use it as integer it will round up to usable number.

2.1 + 2.1 = 4.2 (40)



I don't know which event you want to use here, but once upgrade is applied add 3 custom abilities to the unit, one for damage, one for hp, one for mana. Pretty simple actually.

it gets truncated, not rounded, that means that everything after decimal is ommited.

R2I(4.99) is still 4
 
Status
Not open for further replies.
Top