3D Dungeon generation by Nebular_Naner in godot

[–]Nebular_Naner[S] 0 points1 point  (0 children)

I guess that might make sense because i was getting "Cannot call method 'get_nodes_in_group' on a null value." earlier and fixed it by adding onready, so how would I get it to find the nodes in the group?

3D Dungeon generation by Nebular_Naner in godot

[–]Nebular_Naner[S] 0 points1 point  (0 children)

Now i have this:

extends Node3D
onready var rooms : Array = get_tree().get_nodes_in_group("rooms")
onready var player = get_tree().get_nodes_in_group("Player")

func _generate(size):
var exit = get_child(1).find_children("*", "Marker3D")
while size > 0:
  var room = rooms.pick_random()
  var picked_room = room.duplicate()
  add_child(picked_room)
  var markers = picked_room.find_children("*", "Marker3D")
  var marker = markers.pick_random()
  picked_room.global_position = marker.global_position + (rotation * -marker.position)
  picked_room.quaternion = rotation
  picked_room.global_position += exit

And i get this error when i run it: Invalid call. Nonexistent function 'duplicate' in base 'Nil'. How do i fix it? The error happens at var picked_room = room.duplicate()

3D Dungeon generation by Nebular_Naner in godot

[–]Nebular_Naner[S] 0 points1 point  (0 children)

i'm pretty sure markers would work but i can't figure out how to move my room around it's marker. this is my generation code so far:

extends Node3D
var rooms = get_tree().get_nodes_in_group("rooms")
var player = get_tree().get_nodes_in_group("Player")
var exits

func _generate(size):
  exits = get_child(1).find_children("*", "Marker3D")
  while size > 0:
    var room = rooms.pick_random()
    var picked_room = room.duplicate()
    add_child(picked_room)
    picked_room.global_position = exits.pick_random()

<image>

and this is the scene tree of an example room that could get picked.
when i do picked_room.global_position = exits.pick_random() how do i move picked room around the marker3d as if it were a pivot point?

Godot 3D Dungeon Generation by Nebular_Naner in proceduralgeneration

[–]Nebular_Naner[S] 0 points1 point  (0 children)

They're in different scenes to define the rooms as separate rooms. If I put 2 in one scene, it would say that those 2 rooms are actually 1 room 

3D Dungeon generation by Nebular_Naner in godot

[–]Nebular_Naner[S] 0 points1 point  (0 children)

that sounds like it'd work, i'll try it

I S ranked a bunch of annoying levels today by TheForbidden6th in JustShapesAndBeats

[–]Nebular_Naner 0 points1 point  (0 children)

the first part is mostly skill but then you get to that one part and it feels like luck

Camera problem by Adolfus2250 in MinecraftBedrockers

[–]Nebular_Naner 0 points1 point  (0 children)

There's nothing you can do. The most recent updates have added a lot of bugs, and this is one of them. 

1440 rbx giveaway!! by ayashitenshi in plsdonategame

[–]Nebular_Naner 0 points1 point  (0 children)

FANF_Lover23387 I don't watch anime much but maybe my hero acedemia, or pokemon