Created
October 13, 2023 16:30
-
-
Save mrosati84/0de21875e501078904184e2e17b1bf92 to your computer and use it in GitHub Desktop.
server_fire.gd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@rpc("any_peer") | |
func fire(): | |
var sender_id = multiplayer.get_remote_sender_id() | |
var sender = get_node("/root/Multiplayer/SpawnPoint/" + str(sender_id)) | |
var b = bullet.instantiate() | |
b.name = str(sender_id) + str(seq) | |
seq += 1 | |
b.transform = sender.transform | |
spawn_point.add_child(b) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment