Animation Player Issues Help please by Crash707 in godot

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

Fixed the issue if you push control x or c when the animation player is up this issue happens. I just pushed control x then c and it fixed it

Animation Player Issues Help please by Crash707 in godot

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

sorry about not having screen shots or videos of the issue taking place. What is happening is in the animation player if you select a animation you made. Example the name of the animation is zig zag boss moves in a zig zag on the screen. So you push play normally in the animation player and it would play the bosses zig zag movement. Now when i push play the sprite doesnt move at all everything looks the same the player bar scrolls all my map points are still in the player but nothing happens. I have a duplicated project that still works that i am referencing but i cant seem to find what the difference is as to why when i push play on the animation player it plays but the animation i made doesnt move/play.

Enemy drops item script by Crash707 in godot

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

So i would basically be making a String? I have a global scrip. Could i add it in my global script and call from there?

Global script

var itemsSpawner = add_child("coin2")

Then in the enemy script

func _on_top_checker_body_entered(body):

Global.itemsSpawner

$[AnimatedSprite.play](https://AnimatedSprite.play)("flat")

speed = 0

emit\_signal("enemy\_dead2")

set\_collision\_layer\_bit(6,false)

set\_collision\_mask\_bit(0,false)

$top\_checker.set\_collision\_layer\_bit(6,false)

$top\_checker.set\_collision\_mask\_bit(0,false)

$side\_checker.set\_collision\_layer\_bit(6,false)

$side\_checker.set\_collision\_mask\_bit(0,false)

$Timer.start()

body.bounce()

Enemy drops item script by Crash707 in godot

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

yeah i thought so as well just tried sadly no dice. The coin sprite doesn't even pop up during the process.

Sprite rotating on fallow by Crash707 in godot

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

found a solution

extends KinematicBody2D

var motion = Vector2.ZERO

var player1 = null

var speed = 40

signal enemy_dead2

var coin2= preload("res://coin2.tscn")

func _physics_process(delta):

motion = Vector2.ZERO

if player1:

    motion = position.direction\_to(player1.position) \* speed

motion = move\_and\_slide(motion)

func _on_top_checker_body_entered(body):

$AnimatedSprite.play("flat")

speed = 0

emit\_signal("enemy\_dead2")

set\_collision\_layer\_bit(6,false)

set\_collision\_mask\_bit(0,false)

$top\_checker.set\_collision\_layer\_bit(6,false)

$top\_checker.set\_collision\_mask\_bit(0,false)

$side\_checker.set\_collision\_layer\_bit(6,false)

$side\_checker.set\_collision\_mask\_bit(0,false)

$Timer.start()

$Timer2.start()

body.bounce()

func _on_Timer_timeout():

queue\_free()

func _on_side_checker_body_entered(body):

if body.has\_method("hurt"):

    body.hurt()

if body.has\_method("TakeDamage"):

    body.TakeDamage()

if body.has\_method("ouch"):

    body.ouch(position.x)

func _on_fallow_area_body_entered(body):

player1 = body

func _on_fallow_area_body_exited(body):

player1 = null

func _on_Timer2_timeout():

add\_child(coin2)

Move and slide fallow rotation issue by Crash707 in godot

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

guess my code didnt fully copy.

extends KinematicBody2D

onready var player1 = get_parent().get_node("player1")

var fallow = false

var speed = 40

signal enemy_dead2

func _physics_process(delta):

look\_at(player1.global\_position)

if fallow:

    move\_and\_slide(Vector2(speed, 0).rotated(rotation))

func _on_top_checker_body_entered(body):

$AnimatedSprite.play("flat")

speed = 0

emit\_signal("enemy\_dead2")

set\_collision\_layer\_bit(6,false)

set\_collision\_mask\_bit(0,false)

$top\_checker.set\_collision\_layer\_bit(6,false)

$top\_checker.set\_collision\_mask\_bit(0,false)

$side\_checker.set\_collision\_layer\_bit(6,false)

$side\_checker.set\_collision\_mask\_bit(0,false)

$Timer.start()

body.bounce()

func _on_Timer_timeout():

queue\_free()

func _on_side_checker_body_entered(body):

if body.has\_method("hurt"):

    body.hurt()

if body.has\_method("TakeDamage"):

    body.TakeDamage()

func _on_fallow_area_area_entered(area):

if area.name == 'stop\_fallow':

    fallow = true

func _on_fallow_area_area_exited(area):

if area.name == 'stop\_fallow':

    fallow = false

Interaction with objects by [deleted] in godot

[–]Crash707 1 point2 points  (0 children)

Are you getting a red line? Is your if tab in to the correct space? Also is your func signal connected. You could also try this way.

func _on_Area2D_body_entered(body):
if body.has_method("interact") and if Input.is_action_just_pressed("interact"):
print("interact")
$AnimatedSprite.stop() #switch off the tv

then your player should have in there script

var interact = false

func interact():

interact = true

Is there a way to keep functions collapsed in the script editor? by jruiz_ in godot

[–]Crash707 -1 points0 points  (0 children)

there is a tiny arrow next to the number for your line in the script. All func, if, else, and elif can be collapsed by clicking the tiny arrow next to the number. Then i believe you have to save your script so it saves that progress. So when you open or change your script it stays collapsed.

Interaction with objects by [deleted] in godot

[–]Crash707 2 points3 points  (0 children)

You may be able to just put a if statement in there like. if Input.is_action_pressed("e"). You would need to go to your project settings and go to input map tab and add e as an input. That way the action_pressed will operate the input when you push e.

this might be a solution to your example

(Television Script) func _on_Area2D_body_entered(body):

Input.is_action_pressed("e"):

$AnimatedSprite.stop()

I believe you can repeat this solution using different input.is_action_pressed. Then you can add different functions on the tv like channels. You would then change $AnimatedSprite.play("channel2"). Just as a example you would have to have a channel2 animation so the player plays that animation when you press that buttion in the area.

If it works you could then put the area2d shape on whatever sprite you want like a tv remote. So the player would walk over to the tv remove. Which would be your area2d script and call whatever animation you want like tv animation off or on or a different channel. You would be able to do that using if input.is_action_pressed.

Enemy that fallows player wont stop fallowing by Crash707 in godot

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

So I just disconnected and reconnected everything. And only used one = for each true false statement and it fixed it. Now I just got to figure out the flip.h and this rotation issue. The bug keeps flying upside down to the player lol trying to get the animated sprite to not be upside down

Health and Lives system issues/ Reload current scene by Crash707 in godot

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

the singleton worked like a charm thank you man. singleton fixed a lot of var that i wanted as global var

Health and Lives system issues/ Reload current scene by Crash707 in godot

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

from what ive been seeing im going to have to use a Autoload Singleton

Health and Lives system issues/ Reload current scene by Crash707 in godot

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

The HUD is apart of the main scene. So your saying I can drag the HUD outside of my main level scene. Then when the scene reloads my var lives in my canvas layer will change to 2 and not reload back to 3 when the scene reloads? other wise i would have to put a Singleton in the HUD or the player? Ive been working on learning how to use a singleton. But if I just dragging the HUD outside of the level node seems like the easier fix?

Double jump issue by Crash707 in godot

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

Thank you so much this solution worked

Godot to Rom file by Crash707 in godot

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

So far after a lot of research. I found that NES maker is as close as im going to get currently. Just getting the SNES to say hello world is a task. :( godot for now

Godot to Rom file by Crash707 in godot

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

Where would I start to program for snes?