Yep there is an onPlayerDisconnectEvent but nothing to do with the GUI in there
Here's an example of how I have done the set attribute
Code
Defo a weird one, it's like the event listeners gets garbage collected when a player disconnects.
Yep there is an onPlayerDisconnectEvent but nothing to do with the GUI in there
Here's an example of how I have done the set attribute
Defo a weird one, it's like the event listeners gets garbage collected when a player disconnects.
Yep that's what I have done, everything works normally (panels buttons etc for all users), but when a player logs off the listener for clicks (for all remaining users) stops working I'm just about to start another one from scratch. See if I can see where I was going wrong.
And yes - good advice on the onSpawn rather than onConnect - my onConnect method contained a lot! Moved it all to onSpawn instead
Hope you get this sorted! Sharks suggestion sounds promising.
Hmm my code albeit different does indeed use unique attribute name for labels, which are unique for each player (the set attribute in part uses the players UID).
Only thing different is my labels are added to panels and then the panels added to the players gui.
I think I'll rewrite the whole GUI (starting with something super super simple) and see if I can stop the listeners from unregistering / being garbage collected.
It will probably turn out I've missed a "new" constructor somewhere.
danke vielmals!
Thanks Red that's awesome!!
Just thought I would mention this in case it's what you are after; Medieval Realms is a survival server.
Ore is set to a lower than standard amount. Items like the ore detector, mining drill, and other modern day items are locked out so players can't use them. Fly mode is disabled, there are no teleports (apart from one SOS one - sometimes we just get stuck). So if you want to travel, you need to travel!
The server also has a ranking system in place for things like "survival time". Current record for someone surviving without dying is just under four days (so a challenge there to beat the record!)
It is however, a themed server - so medieval period builds only.
Welcome to join us if you like.
p.s. There are other survival servers available too
Thanks for letting me know, that's a real shame. Has kind of scuppered a lot of my "workaround" plans. But at least I won't be wasting time trying to work it out only to fail!
Even more need now for the API functions!
Hmm the problem there is that giving access to *every* spawnnpc command, allowing players to spawn not just the "dummies"
I had wanted to control the amount on an individual (automated) basis.
Tbh I would like to have console access or at least all the console commands available through the API too.
I totally agree there!
I would also like to map certain commands to keys, like setr/setl/setp that you mentioned. Would be so time saving when building with planks and beams using a key press rather than typing in setr 1 setr15 all the time (which I seem to be doing more and more often).
I *think* it may be possible to do what I'm asking with direct database writes to the main world database ( x1000 ) . . . but that will require a LOT of work and LOT of testing on a none-live server before I would even consider adding it to a live world.
Hopefully @red51 will heed our calls and add API calls for all the console commands in the near future
It would be great to have some kind of access the games console via the API.
I'm imagining something like this sudocode:
Why? Well I would like to let people spawn NPCs dummies into their builds, but I want to *limit* this (depending on game time). I don't want to allow a new player, who may just be on the server to cause chaos to go around spawning 100's (if not 1000's) of NPCs (which someone could do with a script if blanket access was allowed).
I would also like to be able to easily write a plugin to spawn NPC animals. I've had a look at the API and I can't see any calls in there that would allow me to do this. The only way round I can see is to directly add new NPCs via the main database. Something I don't like doing hence my own database and own tables for Medieval Realms!
Something like this would be great!
P.s. I know this is sudocode; I'm not sure how you can spawn anything with an ID number as I've not looked into it yet, but we'll defo need ID numbers on the spawns if we are to keep track of them
Thanks for the code snippets Minotorious! I will digest what you have suggested and see if I can add implement it!
No worries about the delay pal - I've been busy pondering animal spawning; it looks to me like there is no API call so a direct database write is in order. Much testing and experimentation will need to be done!
Hello,I have a problem with animals Walking through blocks or objects and a fence. Would it fix it?
A "workaround" for this is to make a glass wall inside the "real wall", that way the NPCs get stuck on the glass wall and don't look like they are disappearing into solid materials!
Are you running anything else at the same time? You might want to try running the Rising World in Safe Mode with networking (just to test).
I have found on my rig that Rising World will fail to start if I'm using Window Media player when it is playing certain video files with certain codecs.
Conflict of resources. . .
Just an idea you could try whilst waiting for the expert!
Thanks Minotorious! I'm guessing every player needs their own listener object or something like that? But I can't for the love of it work it out!
Your log files say "WARNING: Selected display mode: 1920 x 1080 x 0 @0Hz" that may be your problem?
There is a config file in the games root that contains settings where you can change the resolution.
If you're not comfortable editing config files I would suggest uninstalling the game, deleting any leftover files (particular the config file), reboot, and reinstall.
Or you could wait to see what Red says.
P.s. when deleting files it's always best practice to rename the file to filename.extension.old - just in case you need to reverse what you did!
Hope that helps.
Are you putting fuel in the furnace? There isn't a furnace bug as far as I'm aware.
A simple solution to this (for server owners) is to log the chat messages and include the name and UID. My server does this and if someone is using inappropriate language and is reported by another player a simple log search will reveal the offenders UID.
Cheers!
How do you remove someone from a group? I'm talking about the "invite to group" via the in game menu?
Something odd is happening. Probably relating to my lack of understanding.
This works fine, but it appears that when someone logs off, everyone's labels stop being clickable.
Does anyone have a complete mini/simple example of how I should be using "clickable labels" ?