Hardon Collider Funkyness

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
carvii-
Prole
Posts: 1
Joined: Mon Aug 15, 2022 8:16 pm

Hardon Collider Funkyness

Post by carvii- »

So I'm a little confused because I don't know which file of the Hardon Require libarary to require: https://github.com/vrld/HC :cry:
MrFariator
Party member
Posts: 509
Joined: Wed Oct 05, 2016 11:53 am

Re: Hardon Collider Funkyness

Post by MrFariator »

Basically, there are a couple of main ways to make libraries and modules in lua:
1. You require a single, specific file. If the library needs other files to function, it handles requiring them on its own.
2. You have a folder with init.lua in it. The init.lua basically initializes and returns the library, if the folder is passed to require().

Hardon Collider uses the second approach. So, if you grab HC's files, and place them into a folder named "HC" next to your main.lua, you can just require it with:

Code: Select all

local HC = require 'HC'
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 48 guests