hello i am working on my project i was trying divide my speed variable (which is 300) by 4 its telling me the result and 0 i tried to convert it to float but its not working
here is my variables
export (int) var speed = 300
export (int) var jump_speed = -600
export (int) var gravity = 1500
export (float, 0, 1.0) var friction = 0.25
export (float, 0, 1.0) var acceleration = 0.25
onready var sprite = get_node("icon")
onready var collider = get_node("CollisionPolygon2D")
var velocity = Vector2.ZERO
and here is my function
func size_detection():
if $icon.scale == Vector2(0.125,0.125):
speed = float(speed) / 4.0
gravity = float(gravity) / 4.0
jump_speed = float(jump_speed) / 4.0