I was trying to create an pattern in Godot that has 3 scene patterns, so I've created the array with preload()
, and with a function i've putted this code to start the ramdom select of the pattern:
var new_pattern = patterns[randi()%patterns.size()].instance()
but how these patterns are platforms I've put this code:
`new_pattern.position.x = initialPatterns.back().position.x + 1024`
so I've received this error:
Invalid get Index 'position' (on Base: PackedScene)