how do I multiply two reals?

cowmenace

New Member
Reaction score
22
In the arithmetic function, I have to convert the real to an integer, which will fuck up the value
 

Squirel

New Member
Reaction score
13
Can you be more specific? Some triggers use a real some use an integer. If yours uses an integer you might not be able to do anything about it.
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
Huh he needs to multiply to real and integers can multiply but not sure about reals
 

D.V.D

Make a wish
Reaction score
73
What are you talking about? Reals multiply and if you want to multiply real by integer, convert the integer to a real and then multiply, then do whatever you want. Here's a example:

Trigger:
  • Melee Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Visibility - Disable fog of war
      • Visibility - Disable black mask
      • Set rea[0] = 1.20
      • Set rea[1] = 9.00
      • Set rea[2] = (rea[0] x rea[1])
      • Game - Display to (All players) the text: (String(rea[2]))


Answer is 10.8. Do it on your calculator if you think its wrong.
 

cowmenace

New Member
Reaction score
22
I understand... When trying to do an arithmetic where the answer should be used as an integer in the action, then you have to have two integers, but if the outcome has to be a real to work in the action, then it lets you put two reals in the arithmetic. Solved it by setting a real[3] to (real[1] x real[2]) just as you did. Thanks =)
 
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