simpleLayerMovement.lua - For all your custom layer movement needs!

Share and discuss custom LunaLua code and content packs for SMBX2.
User avatar
MrDoubleA
Swooper
Swooper
Posts: 103
Joined: Mon Aug 20, 2018 7:02 am
Contact:

simpleLayerMovement.lua - For all your custom layer movement needs!

Postby MrDoubleA » Wed Apr 01, 2020 3:11 pm

This is a library which allows for you to simply create complex layer movement. You can download it here! For examples and how to use, see "Loading & Examples".
Screenshot: show
Image
Loading & Examples: show
To load it, simply put this in your luna.lua file:

Code: Select all

local slm = require("simpleLayerMovement")
Here are some examples:

Circular Movement

Code: Select all

slm.addLayer{name = "move 1",movement = slm.MOVEMENT_CIRCLE,speed = 64,verticalDistance = 1,horizontalDistance = 1.5}
slm.addLayer{name = "move 2",movement = slm.MOVEMENT_CIRCLE,speed = 32,distance = 0.5}
Looping Movement

Code: Select all

slm.addLayer{name = "move 1",verticalMovement = slm.MOVEMENT_LOOP,verticalSpeed = 2,verticalDistance = 320}
Cosine Wave Movement

Code: Select all

slm.addLayer{name = "move 1",speed = 96,horizontalMovement = slm.MOVEMENT_COSINE,horizontalSpeed = 64,horizontalDistance = 1}
Points Movements

Code: Select all

slm.addLayer{name = "move 1",movement = slm.MOVEMENT_POINTS,speed = 1,points = {vector(64,32),vector(96,96),vector(-96,96),vector(-64,32),vector(0,0)}}
slm.addLayer{name = "move 2",movement = slm.MOVEMENT_POINTS,speed = 3,points = {vector(48,-48),vector(96,0),vector(0,0)}}
Hi. I'm not very active on the forums.
(MrDoubleA#3124 on Discord)

rooms.lua - Quick respawn & Celeste-styled rooms
simpleLayerMovement.lua - For all your custom layer movement needs!
MrDoubleA's NPC Pack
Are you a mouse?
I support: show
Image
Image
Image
Image

Enjl
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 8541
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Orphion Egamalenitar Osmos IV, Esq.

Re: simpleLayerMovement.lua - For all your custom layer movement needs!

Postby Enjl » Wed Apr 01, 2020 3:59 pm

This is really cool. Well done!
The ABC of Creation
________________________________________________________
Image

User avatar
PROX
Mouser
Mouser
Posts: 1855
Joined: Sun Jul 06, 2014 8:50 pm
Current Project: Super Mario Fantasy
Chat Username: PROX

Re: simpleLayerMovement.lua - For all your custom layer movement needs!

Postby PROX » Mon Apr 06, 2020 6:52 am

Finally we won't have crazy jank moving layers. This will be very useful.
I believe and I accept Jesus Christ as my Lord and Savior. If you do, put this in your signature.

If it makes sense then it must make dollars

Youtube Channel: ProxyHax O.O

Please do not use my stuff until I release it. Thank you.

Collab Project I'm working on:

Image

My Graphics Pack:
Image

World Map Pack: viewtopic.php?f=31&t=20173


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 2 guests