Skip to content

Variable displays different value than it actually has. #5044

Open
@Quidney

Description

@Quidney

Expected Behavior

When I assign a value to a variable, it should display it correctly.

Actual Behavior

It's actual value and displayed value on 'debug'/'display variable' are different.

Steps to Reproduce

HERE'S My project where it happened, because I couldn't reproduce it.

But here's briefly how I discovered it:
I got this problem while creating a 'DeltaTime'.
0- Create variables, "_previousTick", "_currentTick", "DeltaTime", "_deltaTimeClone"
1- Create a callable function, lets call it 'StartLoop'

when I receive "StartLoop"
reset timer
forever
	set _currentTick to timer
	set DeltaTime to (_currentTick - _previousTick)
	set _previousTick to _currentTick
	set _deltaTimeClone to DeltaTime
end

1a- Enable visibility for variable 'DeltaTime'
2- broadcast "StartLoop"

Results:
When done in newly created project, it works as expected. But maybe because I have lots of methods running with the program, in the linked project it doesn't work as expected.

DeltaTime is shown on the play screen inbetween "0.020" and "0.040"
_deltaTimeClone is shown on the screen as 0.
When used in any operation, both act as 0, so DeltaTime is actually 0, but it is displayed as having value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions