#New problem for my card game

1 messages · Page 1 of 1 (latest)

subtle pecan
#

Hi guys, i have a new problem on my card game. After the giant cards problem, only my card, or the dealer cards are visible, and the are in the wrong position, if you want i can give you the script, or all the node in the scene, thanks for the help guys!

#

sorry for my bad english

brittle solstice
#

please provide script and scene always when asking for help relating thoses, otherwise we can't really help

#

my first thought seeing your message is either:

  • position the container scene/node2d/3d/control that are holding the card in the right position on the screen
  • and/or anchor them to the correct place
subtle pecan
#

Alr im gonna do this wait a sec

#

this is the script for the game table

#

class_name Carta
extends Control

@onready var immagine_carta = $ImmagineCarta

func mostra_carta(percorso_texture: String):
if FileAccess.file_exists(percorso_texture):
immagine_carta.texture = load(percorso_texture)
else:
var etichetta = Label.new()
etichetta.text = "MANCA\nIMMAGINE"
etichetta.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
etichetta.vertical_alignment = VERTICAL_ALIGNMENT_CENTER
etichetta.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)
add_child(etichetta)

#

This one is the script that i use in the scene to show the card

brittle solstice
#

the scene ?

#

are their z-indexes correct ?

subtle pecan
#

ya

brittle solstice
#

can you show the problem

subtle pecan
#

of curse

#

This is the problem, only 1 card is visible, and it's in the wrong place

brittle solstice
#

Can I see the scene ?

#

Not the node, but the actual 2D scene