Codes in Different Sections

Post here for help and support regarding LunaLua and SMBX2's libraries and features.

Moderator: Userbase Moderators

Soronexle
Swooper
Swooper
Posts: 67
Joined: Sun Jan 29, 2017 10:34 pm
Contact:

Codes in Different Sections

Postby Soronexle » Wed Sep 22, 2021 12:33 pm

How do you make certain effects occur in separate sections? For example, one of my space levels is trying to change the gravity level, but I don't know the code to separate the define gravity code. Anyone know how to do that?

Emral
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 9865
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Phoenix

Re: Codes in Different Sections

Postby Emral » Wed Sep 22, 2021 12:41 pm

Code: Select all

function onTick()
	if player.section == 0 then
		-- code that runs every frame only in section 0
	end
end


Return to “LunaLua Help”

Who is online

Users browsing this forum: No registered users and 2 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari