Having issues with go.property and a local function

I’m currently using a go.property to transfer entity data to a local function which has access to self.

I define it in Init and then set it using a msg.post, and then try using it in an if statement. All in the same file

the error says it doesn’t have the property at all, even if I call go.get()

This might have something to do with it being a factory instance, but this hasn’t been a problem so far

image

image

All the calls to go.property() have to be put at the top of the script, outside of any functions.


**

nope still doesn’t work

Hint: Please post text instead of screenshots as it’s really hard to read text like that, and also, we want to keep our forum searchable.

The “/instance2” refers to a game object id, not a script. You need to use a url that refers to the script component.

1 Like

Oh yeah, go.get(".", "Width") should be go.get("#", "Width") instead. "." means the current game object and "#" means the current component.

2 Likes