I have a couple questions about your plugin. #61
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
First of all, how can I update DiscordRPC.start_timestamp and DiscordRPC.details when restarting the room?
I tried typing DiscordRPC.refresh() but it didn't work.
Why doesn't Discord RPC disappear immediately after closing the game? I suspect that this might be why Discord doesn't recognize my game.
Maybe I did something wrong.
godot code:
I forgot to mention that I even reinstalled Discord, but the plugin still might not always work, though Discord responds to other programs/games.
It does disappear directly for everyone who sees your Discord profile but may sometimes take a bit on client side.
And what do you mean by not recognizing your game when the Discord RPC appears (in order to dissappear like you said).
Also did you check Discord settings -> Activity Privacy ?
oh i see you spam refresh on _process never loop stuff that doesnt need to be looped it breaks most stuff or makes it laggy
Thank you very much for the quick response.
Okay, I removed the unnecessary DiscordRPC.refresh() calls; I just thought that every time something changes, I needed to keep calling DiscordRPC.refresh().
Next question about DiscordRPC.start_timestamp, I remember once I also did it and it worked but only for one time and it was not updated anymore.
Also, it's important for me to know how to update DiscordRPC.state = "HP " + str(global.hp) + "/" + "92" and DiscordRPC.small_image as well.
And yes, Discord does see when I launch program, or games.
Okay so you need to make a signal somehow in your game when your health changes: https://docs.godotengine.org/en/stable/getting_started/step_by_step/signals.html#custom-signals
Also yeah you need to call it everytime you change something but you cant spam it or it breaks. Always try to loop as less as possible. And what do you mean the timestamp updated only once? Can you send me some new code?
I don't even spam the button, the timer update works once when I restart the room.
code:
you do
You spam this function every frame with process not any button i never mentioned
also please use
```gdscript
# your code here
```
So its fixed now?
I don't even know how to work with this my hp completely freezes when I restart the room, although I even used the "state" function where there is interaction with hp.
Restarting the timer works once and sometimes discord-rpc can fail i'm only saved by rebooting discord to get my game to pop up.
I just don't know what I'm doing wrong Xd
It certainly displays well as I lose hp but after restarting my hp is not updated
Just never put a DiscordRPC.refresh in a _process function
Okay, then in that case my hp will not be updated at all and will always be static for discord 😌.
??? Just update it when the hp updates or do you use _process for everything? To use this plugin you must understand godot. Sorry if i sound rude
Hello again.
I've fixed that problem :)