Can you convert (Agility of Hero) to (0.(Agility of Hero))?

Chilling

New Member
Reaction score
1
Is there a way to just add the 0. before the (Agility of (So-and-so Hero))? In other words, if the agility was 25, make 0.25 instead of 25.
Thanks!
 

Sajin

User title under construction.
Reaction score
56
divide their agility by 10, 100, 1000, etc depending on the number you want ex. dividing by 100 would move the decimal over 2 places so 45 would become 0.45 and if you divide by 1000 it move 3 spots making 45 = 0.045 (in essence every 0 move your decimal over to the left 1 spot

so it would be something like set agility of (triggering unit) = to ((agility of (triggering unit)) / 100)
 

Sajin

User title under construction.
Reaction score
56
its fine :) its something most people I know overlook in math class ;)
 

vypur85

Hibernate
Reaction score
803
Not sure if I get you correctly.
Hero attributes are set in integer values. Such division will just return 0.

Not sure if hero attributes can be set in fractions via trigger. Don't think it's possible.
 

Mythes

Member
Reaction score
7
Integers can become real
integer = 3
so integer -> real, real = 3

Real CAN become integer
real = 3,501
real -> integer, integer = 4

real = 3,500
real -> integer, integer = 3

^^
 

HydraRancher

Truth begins in lies
Reaction score
197
It will display Zero, but Attributes are actually real values I believe. That's why they allow decimals in the fields "Strength per level", etc.
 

vypur85

Hibernate
Reaction score
803
Real CAN become integer
real = 3,501
real -> integer, integer = 4

The program will not round up the values for you. Conversion of 3.501 will return 3.

Same goes for the attribute thing. A value of 0.989, for example, will be converted to 0 as integer.
Then again, I'm not too sure if I understand what the thread poster really wants.
 

Chilling

New Member
Reaction score
1
All I wanted was an acceleration for a flying/driving trigger. I used Move (Picked Unit) instantly to (Position of (Picked Unit) offset by (((Real((Agility) of (Picked Unit) (Include) bonuses)) / (100)) towards (Facing of Picked Unit) degrees.
I couldn't have 50 agility or it would be insanely fast, so I needed a way to put it to 0.50, etc.
It's working wonderfully now and I'm quite satisfied with it :)
 

DioD

New Member
Reaction score
57
The program will not round up the values for you. Conversion of 3.501 will return 3.

false, it will round from 404\405, value less is 0 value more is 1, this is reason for units to die when health drop below 405
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top