First game upload v0.3.1


Hey there, Its Bhavya

This is my adventurous devlog

Things were going good Until! i added mobile controls and they aren't good anymore AND it went wrong it said :

E 0:00:05:0392 Mobile_controls.gd:25 @ _physics_process(): Error calling from signal 'use_move_vector' to callable: 'CanvasLayer(Mobile_controls.gd)::_on_use_move_vector': Method not found.

And the code of error was mobile_controls.gd

Help me if you know any fix.

Bye.

extends CanvasLayer
signal use_move_vector
var move_vector = Vector2(0, 0)
var joystick_active = false
func _input(event):
    if event is InputEventScreenTouch or event is InputEventScreenDrag:
        if $TouchScreenButton.is_pressed():
            move_vector = calculate_move_vector(event.position)
            joystick_active = true
            $InnerCircle.position = event.position
            $InnerCircle.visible = true
    if event is InputEventScreenTouch:
        if event.pressed == false:
            joystick_active = false
            $InnerCircle.visible = true
func _physics_process(_delta):
    if joystick_active:
        emit_signal("use_move_vector", move_vector)
func calculate_move_vector(event_position):
    var texture_center = $TouchScreenButton.position + Vector2(32,32)
    return (event_position - texture_center).normalized()

Files

Adventurous 1 v0.3.1 (Android).apk 69 MB
Apr 18, 2023
Adventurous 1 v0.3.1(Windows).exe 65 MB
Apr 18, 2023

Get Adventurous 1

Leave a comment

Log in with itch.io to leave a comment.