Page 1 of 1

Set room properties for room ext init method to see them

Posted: 01 Jul 2013, 16:59
by grhwood
Hi,

I was wondering if there is a way to set room properties when creating room so that I can get the properties in room extension init method ? Right now Im using

Room room = createRoom(owner, gameSettings);
room.setProperty(key, value);

but I can not get the property in extension init method.

Thanks,

Re: Set room properties for room ext init method to see them

Posted: 01 Jul 2013, 19:46
by Lapo
You can use hidden room variables (not transmitted to the client), but not properties, unless you change the logic a bit:

1) Create the Room
2) Set the properties
3) Invoke a specific method on your Extension, such as go() or start() or whatever else

hope it helps

Re: Set room properties for room ext init method to see them

Posted: 03 Jul 2013, 10:43
by grhwood
I fill a feature wishlist here: viewtopic.php?f=32&t=16213

Re: Set room properties for room ext init method to see them

Posted: 03 Jul 2013, 10:57
by Lapo
Thanks.