cursor.lua

Share and discuss custom LunaLua code and content packs for SMBX2.

Moderator: Userbase Moderators

Yoshi021
Gold Yoshi Egg
Gold Yoshi Egg
Posts: 691
Joined: Thu Jan 21, 2016 9:06 pm
Flair: :)
Pronouns: He/Him

cursor.lua

Postby Yoshi021 » Tue Jun 16, 2020 9:11 pm

Hello, today I would like to present cursor.lua, a sequel to click.lua. This library is a bit more modern to click.lua!

Documentation:
https://wohlsoft.ru/pgewiki/Cursor.lua

Download:
https://cdn.discordapp.com/attachments/ ... cursor.lua

Novarender
Tweeter
Tweeter
Posts: 145
Joined: Sat Aug 06, 2016 6:59 pm
Flair: Whoa

Re: cursor.lua

Postby Novarender » Wed Aug 11, 2021 12:13 pm

Thanks

Marioman2007
2025 Egg Hunter
2025 Egg Hunter
Posts: 544
Joined: Tue Aug 25, 2020 3:19 am
Flair: Dr. Bones
Pronouns: He/Him

Re: cursor.lua

Postby Marioman2007 » Thu Sep 02, 2021 7:48 am

Question: how can I detect if the cursor is touching an NPC?

MrDoubleA
Edward
Edward
Posts: 394
Joined: Mon Aug 20, 2018 7:02 am
Flair: How much munchers?

Re: cursor.lua

Postby MrDoubleA » Fri Sep 03, 2021 12:37 pm

marioman2007 wrote:
Thu Sep 02, 2021 7:48 am
Question: how can I detect if the cursor is touching an NPC?
Use sceneX and sceneY to create a point collider, and then use that.

Marioman2007
2025 Egg Hunter
2025 Egg Hunter
Posts: 544
Joined: Tue Aug 25, 2020 3:19 am
Flair: Dr. Bones
Pronouns: He/Him

Re: cursor.lua

Postby Marioman2007 » Fri Sep 03, 2021 9:41 pm

MrDoubleA wrote:
Fri Sep 03, 2021 12:37 pm
marioman2007 wrote:
Thu Sep 02, 2021 7:48 am
Question: how can I detect if the cursor is touching an NPC?
Use sceneX and sceneY to create a point collider, and then use that.
Why not directly use scenePos?

Yoshi021
Gold Yoshi Egg
Gold Yoshi Egg
Posts: 691
Joined: Thu Jan 21, 2016 9:06 pm
Flair: :)
Pronouns: He/Him

Re: cursor.lua

Postby Yoshi021 » Mon Sep 06, 2021 1:38 pm

Yes, the library has a scenepos field that is a point collider set to the scene coordinates. There is also a counterpart screenpos collider.

Murphmario
2025 Egg Hunter
2025 Egg Hunter
Posts: 2389
Joined: Fri Dec 20, 2013 7:07 pm
Pronouns: he/him

Re: cursor.lua

Postby Murphmario » Sat Feb 24, 2024 8:44 am

New download link because Discord removed the old one.
https://pastebin.com/LEWj8XTK


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 3 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari