Okay, here’s the situation:
I have a simple script that (in theory) should load up a GUI image onto the bottom-left of the screen.
I’ve got it working fine offline, but online it seems to only want to show for the current leader of the map.
Example: I log in, image shows up. Another player logs in, they don’t see the image.
When I leave the level or disconnect, the other player then can see the image, but when I come back, then I can’t see it.
I’m still learning various ways to do things serverside, and I’m sure it’s just missing something simple.
I guess I’m really just needing to know how to put it in gScript to make the GUI appear for every player and not just the leader.
Here’s the script:
// NPC made by Zazenora
if (playerenters||isweapon) {
toweapons -RPGUI;
timeout=0.05;
}
Timeouts are, by default, limited to the “leader” of the level. At least pre-NPC-server. To make a timeout run on every client individually, you need the “timereverywhere” “command” to be executed, so generally in a “created” or “playerenters” event.
How the fuck do I remember this shit after not dealing with it for over a decade?
I see, thanks for clearing that up for me. I remember seeing that command before but wasn’t sure what it did. I’m slowly learning through trial and error, and the occasional luck of my current internet connection being strong enough to then, have the luck of a player popping up that I can use to test things lol. I may as well be using dial-up right now
Ethereal Odyssey - I usually keep the server running while I’m working on anything, but there are some issues with me hosting my own server at the moment.
My internet connection goes in and out because of the wifi distance, so that probably attributes to not being able to log in at times. A few people’ve been on it
today though, so at least I know there’s no port forwarding issues.
When I get enough content finished, I’ll worry about better server hosting though. If you can’t connect, give it a little bit and try again, something as small as someone standing in front of my laptop for even a minute or so can cause me to lose connection… (Better days are coming ;D)
I have my actual GUI image cooperating now, and it’s displaying properly online, for me anyway. I used your suggestion Codr, and I’ll definitely keep it in mind with future scripts.
Thanks!
My base GUI is now fully functional! Now all that’s left is making the appropriate icon sizes to fit in the slots.
It’s taken quit a bit of trial and error, but I’m getting the hang of it. Thanks for the help
Thanks :D, I still have a few edits to make regarding the slot sizes as each row, as they differ by just a pixel or two in length. (Thinking of going with 32x32)
I’ll let you know when everything’s set in stone.
[QUOTE=Zazenora;n189487]
My base GUI is now fully functional! Now all that’s left is making the appropriate icon sizes to fit in the slots.
It’s taken quit a bit of trial and error, but I’m getting the hang of it. Thanks for the help
[USER=“5637”]tricxta[/USER] Thanks, I’ll definitely put this to use. I was looking into the changeimgzoom command earlier.
Also for images such as the lightsaber shown, I think it would help to rotate the icon by 90(degrees) to make it fit better.
Also, while I was fixing this up, I seemed to have conflicting weapons messing with the gui keeping it from updating. I finally figured out simply deleting the -RPGUI weapon and reloading fixed this problem.
Gratz, although the gui does seem pretty intrusive. I would recommend perhaps trying to seperate both boxes, maybe your health and money can go in the bottom left, and your key assignments in the bottom right?
I agree with tricxta. Could rock a hotkey type position, with the weapon, glove and such in the center and the hp, etc in the same spot. The only other thing is perhaps having the UI go semi transparent when you’re at the bottom, bottom left of the screen. So not to obscure the player.
Shouldn’t be too much trouble. I noticed it is intrusive especially at its native resolution, it gets in the way of the message box. I’ll try out your suggestions, thanks ^^
[QUOTE=Codr;n189342]
Timeouts are, by default, limited to the “leader” of the level. At least pre-NPC-server. To make a timeout run on every client individually, you need the “timereverywhere” “command” to be executed, so generally in a “created” or “playerenters” event.
How the fuck do I remember this shit after not dealing with it for over a decade?
[/QUOTE]
Okay, but don’t do this because it’s a weapon and isn’t affected by other players. You would use timereverywhere if it were a level NPC.
Can’t remember but aren’t you able to drop it into the weapons folder and then define it as a weapon in the default player?
Also if you want it to be less intrusive you could try breaking up the elements and place them in different corners. AP is measured by the player’s name, so I wouldn’t say it’s a necessary bar. Adds clutter to an already cluttered area of the screen.
As for the multiple players thing, I have two accounts for this kind of problem. Graal isn’t a very demanding game so running two clients is pretty easy. I do recommend getting used to resetting this character to default after each test though.