Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | DavidPeterWorks |
I have built in script in Catcher. I have sepeareted script for Bunny.
I got an error because Catcher is a packedScene. Bunny is a script.
How can I use ‘is’ expression with built-in scripts?
var Bunny = preload("res://Scenes/Bunny.gd")
var Catcher = preload("res://Scenes/Catcher.tscn")
#I have no .gd for Catcher.
if (myObject is Bunny or myObject is Catcher):
doThigns()
You declared a variable as var Bunny
. What is that Const.Bunny
? What is Const
in other words?
johnygames | 2019-08-04 10:43
Fixed. Removed Consts.
DavidPeterWorks | 2019-08-04 10:48