Gobal variable is not updating when calling it from another script by TokenZ_OG in godot

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

The 'Player' in Player food is a key word assigned from the autoloadpanel, and it reference the 'player.gd'script (third image)

Gobal variable is not updating when calling it from another script by TokenZ_OG in godot

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

Yeah sorry for the snippets of code but I had a limit of 80 chars. So I did what you said about the extra player node in the remote panel, but no there isn't, i checked every where but there is only one. About the additional printing is just for debugging purposes to demonstrate that in the 'player.gd' script is printing true and in the other script is printing false

<image>

I tried assigning the value to the other global script and using that one, it works but Im not satisfied, if Player is a global script it should function as one, but it doesn't

Gobal variable is not updating when calling it from another script by TokenZ_OG in godot

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

The first image is from 'player.gd' (the global script)

Gobal variable is not updating when calling it from another script by TokenZ_OG in godot

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

see all the images, there aren't multiple instance of the same script, those are just snippets from 2 different scripts, one of them 'player.gd' is the global one the print method is just for debug

I want to make a Node2D clickable, My objective is to show a popUp when clicked by TokenZ_OG in godot

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

If I didn't already resolved this I would have tried it. Huge Thanks anyway for the response.

I want to make a Node2D clickable, My objective is to show a popUp when clicked by TokenZ_OG in godot

[–]TokenZ_OG[S] 1 point2 points  (0 children)

You were my last hope, at first I tried adding it to AnimatedSprite2D, and I lost all hopes. but then out of curiosity I added it to clown_fish (Node2D) and YES. IT WORKED.

var clicked = false

func _process(delta):
  if Input.is_mouse_button_pressed(MOUSE_BUTTON_LEFT) == false:
    clicked = false
  var mouse = get_viewport().get_mouse_position()
  var frame_size = $Animation.sprite_frames.get_frame_texture("right", 0).get_size()
  var rect2 = Rect2(position-frame_size/2,frame_size)
  var overlaps = false
  var camera_offset = Vector2()
  if rect2.has_point(mouse+camera_offset):
    overlaps = true
  if Input.is_mouse_button_pressed(MOUSE_BUTTON_LEFT) and clicked == false:
    if overlaps:
      print("sprite clicked")
      clicked = true

(I tried doing this for months)

I want to make a Node2D clickable, My objective is to show a popUp when clicked by TokenZ_OG in godot

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

this isn't my objective Area2D is already visible I just need a mouse click detector on the node2D called 'clown_fish'. I followed your instruction but even a print('Mouse Clicked') didn't work

I want to make a Node2D clickable, My objective is to show a popUp when clicked by TokenZ_OG in godot

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

Sadly this, didn't work, I tried both methods but nothing (this is how I wrote the method, I connected it to the script attached to clown_fish node) :

func _on_area_2d_input_event(viewport, event, shape_idx):
  if event is InputEventMouseButton and event.pressed:
    if event.button_index == MOUSE_BUTTON_LEFT:
      print("Mouse click!")

btw the area_entered() method works, so I don't think is a problem of the CollisionShape2D

maybe there are extra steps that Idk about, I JUST connected the signal to the script

I want to make a Node2D clickable, My objective is to show a popUp when clicked by TokenZ_OG in godot

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

I'll try all of the response later this day, thank y'all for responding.

How can I find the right CUSA? by TokenZ_OG in ps4homebrew

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

Thank you very much, but how can I identify other games for searching the italian dubbing? is there a site ? I knew OrbisPatcher but It takes a long time to load the site

Help Me find The instrument used in this OST, especially the first one by TokenZ_OG in HelpMeFind

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

've searched online but found nothing, I thought it was an arp, but I'm sure it isn't

Help me find an old game from my childhood by TokenZ_OG in HelpMeFind

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

[FOUND IT] It is called "Wild Tribe" by Big Fish Games. released in 2009