What is the params for MMOItems on proximity update ?

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

genar
Posts: 137
Joined: 13 Jul 2017, 11:49

What is the params for MMOItems on proximity update ?

Postby genar » 27 Mar 2018, 18:26

Hey there !

Im spawning some MMOItems server side and wanted to make them visible to clients... i get the notification that the proximity event is called when i spawn them... but i have no idea whats the param for them, to acess those spawned MMOItems... any idea ?
User avatar
Lapo
Site Admin
Posts: 22999
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: What is the params for MMOItems on proximity update ?

Postby Lapo » 28 Mar 2018, 07:40

HI,
take a look at the addedItems List passed in the SFSEvent.PROXIMITY_LIST_UPDATE event.

I am not sure which client type you're using. Supposing it's Unity here's the specific doc page:
http://docs2x.smartfoxserver.com/api-do ... 484859.htm

It also works for all others supported platforms. Essentially the PROXIMITY_LIST_UPDATE always sends you 4 lists that may contain data:
- addedUsers
- removedUsers
- addedItems
- removedItems

Hope it helps
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: Baidu [Spider] and 40 guests