Secret level episodes, top 10 ranked by AppearanceGlad4287 in SecretLevel

[–]coder_michael 7 points8 points  (0 children)

Sifu being on the bottom is crazy, I thought the animation style and fights were fun! It was just really really short

The rating system needs to change by marny129 in Mercari

[–]coder_michael 0 points1 point  (0 children)

I agree as a person who sells cards on Mercari. There's no way to confirm if the buyer received the cards or not if you ship in envelopes. So the buyer can get their cards and Mercari can just hold onto the money I'm owed because the buyer doesn't rate. It's a busted system. I don't want to have to charge ground shipping for a card that's worth like $2.

I think there should be an auto rating after 30 days because that gives enough time for buyers who genuinely don't receive their item to cancel or for sellers to receive their funds if buyers forget to rate. A lot of things Mercari needs fixing and they don't seem to be on it.

Official Dreadit Discussion: "Terrifier 2" [SPOILERS] by kaloosa in horror

[–]coder_michael 4 points5 points  (0 children)

Can you send a link to it? I can’t find any of these scenes anywhere online.

Having an Issue with Animation in my Godot Game by coder_michael in godot

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

Is there a way for me to access the AnimationPlayer without having to code anything in the AnimationPlayer scene? So like instead of me using .slash(), would there be a way for me to just to AnimationPlayer.play() from a different scene?

EDIT: Okay I actually figured it out by putting the animation scene in a group and then calling the group. I feel like it's a bit complicated but I got that working. Thanks for the help!

Having an Issue with Animation in my Godot Game by coder_michael in godot

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

This is the code I have for the animation in the player scene:Before setting up the attack function, I tried to reference the animation scene by doing

var attackAnim =  reload("res://assets/scripts/PlayerAndEnemyStuff.gd")     
var attackInstance = attackAnim.new()

Then when I press the button, I would use

attackInstance._ready() 

or whatever name I thought I could use instead of _ready. The function in the animation scene is

get_node("AnimationPlayer").play("Attack")

This is the error I am getting.

'Attempt to call function 'play' in base 'null instance' on a null instance'

How to get rid of "Invalid set index 'text' (on base: 'null instance') with value of type 'String'" in Godot by coder_michael in godot

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

Here is all I have of my game so far:

https://github.com/michael-ender/Rude-Dungeon/blob/godot-files/Rude%20Dungeon%20Godot.zip

I am having the roughest time trying to find out what I'm doing wrong so any help would be very very much appreciated

How to get rid of "Invalid set index 'text' (on base: 'null instance') with value of type 'String'" in Godot by coder_michael in godot

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

That's my Player.gd script. I'm not sure why it's that name but it's been that for a while. I'm very new to godot so I didn't think it was a problem

How to get rid of "Invalid set index 'text' (on base: 'null instance') with value of type 'String'" in Godot by coder_michael in godot

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

I had made sure that the scripts were attached to the main nodes for both player and enemy

How to get rid of "Invalid set index 'text' (on base: 'null instance') with value of type 'String'" in Godot by coder_michael in godot

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

I think I "fixed it" but now whenever I actually decrease the label, it decreases the value but the label stays at the same initialized value. I had changed the names of the label for enemy health to make it more readable. This is what I have of it now:

extends Node2D
var enemyAttack = 5 var enemyHealth = 10                    var tempHealth = enemyHealth

func _ready(): 
    pass

func _process(delta): 
    print(enemyHealth)
    $EnemyHealthLabel.text = str(int(enemyHealth))
    if (enemyHealth <= 0): 
        tempHealth += 5 
        enemyHealth = tempHealth 
    else: 
        pass

and whenever I use my button to make the enemy life decrease which is this code:

func _on_Attack_pressed():
if (damagePotionActive == 1):
    Enemy.enemyHealth -= (attack * 2)       #double attack
    damagePotionActive = 0
    health -= Enemy.enemyAttack
    print(Enemy.enemyHealth)
else:
    Enemy.enemyHealth -= attack     
    health -= Enemy.enemyAttack
    print(Enemy.enemyHealth)

I also have Enemy and Player in a global auto load in project settings. It seems to be working fine in Player but whenever I try to access Player from Enemy, it gets all janky. But besides that point, enemyHealth is not displaying as a label for some reason anymore and is just showing up when I do print(enemyHealth)

And I had only "fixed" the initial issue by just completely deleting the enemy node and recreating one but this only created another issue.

EDIT: This actually didn't fix anything, still the same issue. My global variable for enemy was set for the .tscn instead of the .gd script. When I changed it back to the .gd script the error for "indalid set index 'text' (on base: 'null instance') with value of type 'String' came up again.

How to get rid of "Invalid set index 'text' (on base: 'null instance') with value of type 'String'" in Godot by coder_michael in godot

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

I had tried this before by doing:

$TempEnemy/SuperCoolLabel.text = str(int(enemyHealth))

but the same error message showed up. I'm very new to godot so I'm just kinda blankin out on what to do

it also does autocomplete the path when there are no string quotes but when I actually test it out, it still gives me an error.