I've noticed that youtube in particular can play audio in the background and it doesn't matter what tab I'm on. My own godot game stops running if I switch tabs. Is there any way to keep a tab active like youtube does? I've read some suggestions that maybe you can create javascript that opens the so...
Has anyone dealt with this error? I have some code that is using text to speech, and from what I've read its supposed to be supported on HTML5 exports too. I read that it could be slow because it calls to a service to do the TTS generation. However, this message appears, and I don't hear anything. D...
I'm working on a godot websocket client in Godot 4.3. I'm using the demo app websocket-chat from godot-demo-projects. What I'm observing is that it makes a connection to my websocket server, it sends a request that looks like: GET / HTTP/1.1 Host: 192.168.64.2:4223 Upgrade: websocket Connection: Upg...
I was playing around with exporting an APK for Android TV (NVidia Shield Pro) and noticed that it didn't appear in the list of apps due to it missing a banner image. I noticed there is a spot to specify some icons in the exporter for Android, but they mention the dimension being 192x192 or 432 x 432...
I have a title screen with a menu, and once the user selects the start game option, the menu disappears and a shader is applied to the background Sprite2D in order to create a dissolve effect that is a vertical wave with a gradually increasing amplitude and speed. It should look like the dissolves u...
You may need to be more specific on what issues you're having. Designing a whole feature from scratch is probably not something you can effectively get help with on reddit.
It looks like Driver San Francisco lets you go into a possess mode where you fly around with a semi-transparent overlay effect on your video while you target another car. So its an alternative movement mode, with its own unique controls, combined with some f/x to make it look cool. Its probably pretty advanced to architect if you're starting out, but you can break it down to:
- switch control states into the possess mode where you control your character with different rules
- reposition the camera to some relative distance above the playing field
- add a screen-sized overlay with an appropriate animated effect, or possibly a full-screen shader
- Ray test against your other objects as you navigate to see if the player selects an NPC
- If another NPC is selected, find their object and use that as the target for your movement code until such time as the time has expired.
How to code all of that is beyond what I think anyone could help with on reddit. It will require a lot of code and a design that enables your NPCs to switch control interfaces from an NPC to PC.
I think that only retrieves nodes that are child nodes of the node your script is attached to. You may need to do GetParent().GetNode<AnimationPlayer>(“anim”) if the AnimationPlayer node is a peer of the node the script is attached to. (At the same level in the tree)
I'm not that familiar with the C# interfaces, however I think you may need to retrieve the AnimationPlayer reference in your ready method. In the code you listed, anim will not be initialized with a value. I cannot tell you the methods in C#, but in GDScript you can do something like `anim = get_parent().get("anim")` assuming the name in the tree is "anim".
If you are ok with a fade in and fade out (by adjusting the alpha values of the pixels) for your ghosts then it’s pretty easy to do. In fact, you don’t need to change the pixels directly- you can either adjust the alpha on the sprite directly in your own timer, use AnimationPlayer to change the alpha, or create a simple shader that does it. Are you using AnimatedSprite2D for your animation or are you using Sprite2D with AnimationPlayer?
You may need to be more specific on what issues you're having. Designing a whole feature from scratch is probably not something you can effectively get help with on reddit.
It looks like Driver San Francisco lets you go into a possess mode where you fly around with a semi-transparent overlay effect on your video while you target another car. So its an alternative movement mode, with its own unique controls, combined with some f/x to make it look cool. Its probably pretty advanced to architect if you're starting out, but you can break it down to:
- switch control states into the possess mode where you control your character with different rules
- reposition the camera to some relative distance above the playing field
- add a screen-sized overlay with an appropriate animated effect, or possibly a full-screen shader
- Ray test against your other objects as you navigate to see if the player selects an NPC
- If another NPC is selected, find their object and use that as the target for your movement code until such time as the time has expired.
How to code all of that is beyond what I think anyone could help with on reddit. It will require a lot of code and a design that enables your NPCs to switch control interfaces from an NPC to PC.
Perhaps try:
anim = GetTree().GetNode("/Player/CameraPivot/Camera3D/Control/Ui-sheet").GetNode<AnimationPlayer>("anim")
I think that only retrieves nodes that are child nodes of the node your script is attached to. You may need to do GetParent().GetNode<AnimationPlayer>(“anim”) if the AnimationPlayer node is a peer of the node the script is attached to. (At the same level in the tree)
I'm not that familiar with the C# interfaces, however I think you may need to retrieve the AnimationPlayer reference in your ready method. In the code you listed, anim will not be initialized with a value. I cannot tell you the methods in C#, but in GDScript you can do something like `anim = get_parent().get("anim")` assuming the name in the tree is "anim".
If you are ok with a fade in and fade out (by adjusting the alpha values of the pixels) for your ghosts then it’s pretty easy to do. In fact, you don’t need to change the pixels directly- you can either adjust the alpha on the sprite directly in your own timer, use AnimationPlayer to change the alpha, or create a simple shader that does it. Are you using AnimatedSprite2D for your animation or are you using Sprite2D with AnimationPlayer?