![]() |
GMAP Variables
Would it be possible to allow to make gmap variables?
It is currently possible to create level.variables (Correct?) But what about variables global to the gmap? Would be nice for Mana Realms since each gmap is a new area and I could have an npc somewhere that sets variables like: NPC Code: This would purely be for convenience.. but would be better (in my opinion) than having to create a database (either on file browse or as DBNpc) to manage this information. Also, now as I am typing I am pretty sure I tested level.vars out (also local.vars) and they didn't work properly. Are there no longer local to the level variables? Would be good for a day/night system to have something like: NPC Code: Could be done with strings (ie: client.disabledaynight=true) but would sometimes cause bugs if player warps out somehow. (ie: using warpto or some type of warping spell) This would also have to cause me to put an npc in all levels connected to the level disabling day/night in order to enable it again. Just a suggestion, any feedback is welcome (as long as its positive) |
I get what you're saying, but it seems like it isn't really vital. There is always the option of grabbing the data on the serverside, or if you're really wanting to handle it all on the client you could have it create client.level.<levelname>.vars during onActionPlayerOnline(). Either way, checking onplayerenters for what to do in that level has been what I've always done in the past. I'm not sure about level.vars anymore, but it's easier to administrate such things via a database NPC anyway.
|
I wouldnt at all say its easier.
It would be much easier to have a single npc that says gmap.var="varvalue"; than to have to set a string on every player. Its cluttered and unorganized. |
Quote:
|
Gmap-wide variables:
On serverside you cannot access the map parts anyway, so level.vars are always gmap-wide. On clientside the next version will have a new variable 'object.gmap' for accessing the whole map. The 'level.' var is directing to the map part for compatibility reasons. Synchronization of serverside and clientside: it might be possible to add level.clientr.vars and level.client.vars, sending level attributes from server to client is needed anyway for the new tile layers thingy |
So setting a level.variable serverside will set a variable LOCAL to the gmap?
Can this variable be read clientside is all I really need. ie: a npc anywhere on a gmap that does: NPC Code: And then can I access it in a CLIENTSIDE script (like a weapon) using: NPC Code: Because this is the most important thing about it.. that it can be read clientside. If level variables work like I imagine they do, I'm sure they can.. because its just like reading a server.variable clientside.. (which I didn't think you could, but I am told you can) only its for the level only. If not, you will have to explain to me how I can do this. |
Would be level.clientr.areaname
|
Hmm, would level. variables still work the way they already are? I have been using them without problems for awhile, wouldn't be very nice if they were suddenly changed and things I made were broken.
|
You are able to use them simply as level.varname??
Because I have tried that and unfortunately it has not worked. I tried it with my time system (to disable day/night locally in levels) and it doesnt work. |
Quote:
|
ah... the variable needs to be set serverside or has to read serverside (or both, of course)
|
Quote:
|
| All times are GMT +2. The time now is 08:09 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.