About 'Computers and Combinations'!

In this video (objectives)…

1 Create a Computer Scene 2 Using find_node() to get a node by name 4 Ask CombinationGenerator for a random combinations 5 Display that combination to the Player in a Popup

After watching (learning outcomes)…

Using a returned value from one script to change the contents of another

(Unique Video Reference: 23_HM_GDT)

We would love to know…

  • What you found good about this lecture?
  • What we could do better?

Remember that you can reply to this topic, or create a new topic. The easiest way to create a new topic is to follow the link in Resources. That way the topic will…

  • Be in the correct forum (for the course).
  • Be in the right sub-forum (for the section)
  • Have the correct lecture tag.

Enjoy your stay in our thriving community!

I had a bit of a time with this one. I had to have two goes at it. I’m not sure what I did different but it worked the second time.

I have trouble making the Computer popup screen to work:

I get this error:

Invalid call: non-existent PoolStringArray constructor

code looks like this:

extends Popup



func set_text(combination):
	$NinePatchRect/CenterContainer/NinePatchRect/Label.text = (
				"Here is the passcode for the door: " 
				+ PoolStringArray(combination).join(" ")
				+ "This is the last time I give it to you. Stop forgetting it!")

It’s like it does not recognize combination as an array.

[EDIT} never mind I fixed it. Problem was that it did not recognized combination as an array from the Computer.gd script, because it was not assigned anything there, so I assigned the CombinationGenerator.generate_combination(combination_length) to it and everything works like a charm

1 Like

nice one, glad you got it sorted :+1:

Privacy & Terms