Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (shooting and not prev_shooting):
- # just pressed
- var shot = preload("res://shot.scn").instance()
- #use the position3d as reference
- shot.set_pos( get_node("shootfrom").get_global_pos() )
- #put it two parents above, so it is not moved by us
- get_node("../..").add_child(shot)
- #play sound
- get_node("sfx").play("shoot")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement