Imgflip Logo Icon

first.mp4

185 views 7 upvotes Made by anonymous 2 years ago in MS_memer_group
Make your own GIF
6 Comments
1 up, 2y,
1 reply
whoa :0)
[deleted] M
0 ups, 2y,
1 reply
Bro it took
extends KinematicBody2D

const ACCELERATION = 100
const MAX_SPEED = 200
const FRICTION = 400

var velocity = Vector2.ZERO

onready var animationPlayer = $AnimationPlayer
onready var animationTree = $AnimationTree
onready var animationState = animationTree.get("parameters/playback")

func _physics_process(delta):
var input_vector = Vector2.ZERO
input_vector.x = Input.get_action_strength("ui_right") - Input.get_action_strength("ui_left")
input_vector.y = Input.get_action_strength("ui_down") - Input.get_action_strength("ui_up")
input_vector = input_vector.normalized()

velocity.x = 0
velocity.y = 0

if input_vector != Vector2.ZERO:
animationTree.set("parameters/Idle/blend_position", input_vector)
animationTree.set("parameters/Run/blend_position", input_vector)
animationState.travel("Run")
velocity += input_vector * ACCELERATION
else:
animationState.travel("Idle")
velocity = Vector2.ZERO

velocity = move_and_slide(velocity)
to make him move
1 up, 2y,
1 reply
made w/ Imgflip meme maker
what the f**k like scratch is 10 times better
[deleted] M
0 ups, 2y,
1 reply
made w/ Imgflip meme maker
That's simple af
But I have more elements and resources to use.
Everything is so much more organized, practical, and just in general pretty awesome. This engine also does 3d games as well
1 up, 2y,
1 reply
You can make 3d games with scratch as well 💀
[deleted] M
0 ups, 2y
dnc
I prefer godot
cry
extends KinematicBody2D

const ACCELERATION = 100
const MAX_SPEED = 200
const FRICTION = 400

var velocity = Vector2.ZERO

onready var animationPlayer = $AnimationPlayer
onready var animationTree = $AnimationTree
onready var animationState = animationTree.get("parameters/playback")

func _physics_process(delta):
var input_vector = Vector2.ZERO
input_vector.x = Input.get_action_strength("ui_right") - Input.get_action_strength("ui_left")
input_vector.y = Input.get_action_strength("ui_down") - Input.get_action_strength("ui_up")
input_vector = input_vector.normalized()

velocity.x = 0
velocity.y = 0

if input_vector != Vector2.ZERO:
animationTree.set("parameters/Idle/blend_position", input_vector)
animationTree.set("parameters/Run/blend_position", input_vector)
animationState.travel("Run")
velocity += input_vector * ACCELERATION
else:
animationState.travel("Idle")
velocity = Vector2.ZERO

velocity = move_and_slide(velocity)
Make your own GIF
Created from video with the Imgflip Animated GIF Maker