#A 'Divide Values' action for Global Values

1 messages · Page 1 of 1 (latest)

storm cedar
#

If we could Divide one global value against another we could use it to get percentages. Percentages for various things like objective completion, time remaining, control of a zone, trigger points for events, etc.

They could even be displayed in your aircraft's MFD objective page in the 'objectives info' section using the 'variables' function to display live percentages. I think they could make new and existing game modes easier to create, and they could be used to relay useful information to a players during a mission.

tender violet
#

and multiplication!!

#

these are basic operations!

storm cedar
#

'multiply value', and 'multiply values' is already there as a global values action

tender violet
#

oh I am really blind damn

#

my bad

storm cedar
#

it's all good dude

tacit quartz
#

Those event actions take inputs and assign the output to a global value. Global values are integers so it would not make sense to assign a divided value to a global value. I understand your desire to show percentages in objective infos though.

tender violet
#

And time

#

Writing timers currently involves making digit-per-digit math

#

Instead, relying on integer division would be great

tacit quartz
#

Do you mean displaying time on an objective info? or something else

tender violet
#

#mission_editor message

#

This was what I had in mind

#

Instead of needing to increment every digit, then making sure it doesn't go over 60, then incrementing the next digit, we could have a single counter, and we could compute the GVs for each digit with a much simpler sequence (that would involve no branching)

tacit quartz
#

it would be simpler to have a %variable% that formats a GV into time