Insert whole class into MMOItemVariables ?

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

Insert whole class into MMOItemVariables ?

Postby genar » 29 Nov 2020, 22:33

Till now i only saw examples where you put in single values into MMOItemVariables like health, or bools.

What is we wanna insert a whole position or rotation ?
Do we need to atomize those into x,y,z or can we put the whole class into it ? Like a serialized vector class ?

Code: Select all

   var pos = new MMOItemVariable("pos", new Vector3(10,10,10));
   
   instead of
   
   var posX = new MMOItemVariable("px", 10);
   var posY = new MMOItemVariable("py", 10);
   var posZ = new MMOItemVariable("pz", 10);
User avatar
Lapo
Site Admin
Posts: 22999
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Insert whole class into MMOItemVariables ?

Postby Lapo » 30 Nov 2020, 08:31

Hi,
yes you need to send the individual elements. Serialized classes are not supported in server Variables.

Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 40 guests