cursor.lua

Share and discuss custom LunaLua code and content packs for SMBX2.
Yoshi021
Gold Yoshi Egg
Gold Yoshi Egg
Posts: 687
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
Monty Mole
Monty Mole
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
Buster Beetle
Buster Beetle
Posts: 401
Joined: Tue Aug 25, 2020 3:19 am
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
Flurry
Flurry
Posts: 351
Joined: Mon Aug 20, 2018 7:02 am
Flair: How much munchers?
Pronouns: he/him

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
Buster Beetle
Buster Beetle
Posts: 401
Joined: Tue Aug 25, 2020 3:19 am
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: 687
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.


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 3 guests