How to handle a map when referencing a variable from another Verse file?

When you want to use and reference a variable handled in File A from File B,
you import the module in File B and make the Verse device usable.

If you’re saving values like AgentMap in File A,
what needs to be added so that those values can be referenced from File B?

Please let me know.

Well you would have to directly reference the device

so if you had your player map saved in my_player_map_device you would have to eg on your game manager do something like
@editable PlayerMapDevice : my_player_map_device = my_player_map_device{} and then do PlayerMapDevice.PlayerMap[Agent]

Thank you very much.
Although some parts are omitted, based on the flow shown in the attached image, could you please tell me where I should reference the map?


The referencing seems correct ig have you connected it to the other device in the uefn editor? and what error does it give if any.

I made a mistake.

The part indicated by the arrow in the attached image is set to ScoreCount.
I’m trying to reference the score stored for each player in A_VerseFile,
but when I do it this way, the value change isn’t being shared across the session.

In other words, no matter how much score is earned,
the log just shows: Score : 0.

I’ve already confirmed through other features that the score is actually increasing.

Have you connected in your D_Device the actual instance of the B_Device? Because if you haven’t it will “create” its own by itself make sure you have selected the b_device

1 Like

By linking it with the device, I was able to successfully output the referenced value using the Print function.
Thank you as always for your guidance!

1 Like