I believe this is either a bug in Verse or something that isn’t documented.
Sometimes, for whatever reason, you can’t refer to a class field as-is - you need to pass it in via an instance. This usually happens when you use concurrency but it also happens without in the case of props.
You should be able to solve it by passing Self
as a parameter to Close
, and then calling Self.DoorLeft.MoveTo
rather than just DoorLeft.MoveTo
. This should work.
Alternatively you can pass DoorLeft itself as a Param but it’s easier to just throw Self around when you’ve got a lot going on.
Like I said I think this is either a bug in Verse, or maybe an issue with our ignorance on effect specifiers. I know, for example, that you should always use a Setter method when updating a var - and that Setter method needs <transacts>
effect, otherwise the variable update may not be visible in other scopes (e.g. event subscriptions, concurrent tasks, etc.). But still even with this, I need to thow “Self” around to avoid IsDisposed error for vars for some reason… but I digress, that’s a thing with vars - not @editable constants. But kinda related to the theory that this is a “bug” in Verse. Or us not using it correctly
EDIT: Fixed missing <transacts>
effect above, would have been confusing. Also I remembered that at first I was making my @editable props var
- do NOT do this, it may cause issues and there’s no point making an @editable var
anyway.