Page 1 of 1

Codes in Different Sections

Posted: Wed Sep 22, 2021 12:33 pm
by Soronexle
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?

Re: Codes in Different Sections

Posted: Wed Sep 22, 2021 12:41 pm
by Emral

Code: Select all

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