Stupid question,
I got a loop, let's say I got two values x1=50, x2=50 and I wana add them togheter to equal 100 or whatever they make togheter whenever they change... How should I do that..
To me the logic thing to do is
(remember this is a loop)
local total:int = x1 + x2
local container:int=total:int
so container should always be 100 until either x1 or x2 changes... bvasicly I wana contain the addition of x1 + x2 into a variable and it needs to be in the loop because x1 and x2 can change.
I tried it but it seems to always keep adding +100 to the container..? I somewat confused.
I got a loop, let's say I got two values x1=50, x2=50 and I wana add them togheter to equal 100 or whatever they make togheter whenever they change... How should I do that..
To me the logic thing to do is
(remember this is a loop)
local total:int = x1 + x2
local container:int=total:int
so container should always be 100 until either x1 or x2 changes... bvasicly I wana contain the addition of x1 + x2 into a variable and it needs to be in the loop because x1 and x2 can change.
I tried it but it seems to always keep adding +100 to the container..? I somewat confused.