Toggling full-camera particles on certain sections

This is the place for discussion and support for LunaLua and related modifications and libraries.

Moderator: Userbase Moderators

Forum rules
Before you make a topic/post, consider the following:
-Is there a topic for this already?
-Is your post on topic/appropriate?
-Are you posting in the right forum/following the forum rules?
sheepsaren1ce
Cheep-Cheep
Cheep-Cheep
Posts: 11
Joined: Wed Aug 16, 2017 2:05 am

Toggling full-camera particles on certain sections

Postby sheepsaren1ce » Fri Dec 15, 2017 10:37 pm

Hi. I have installed a full camera Rain particle on Lua, but is there any certain way to enable the particles on certain sections?

Thanks. :D

PixelPest
Link
Link
Posts: 7111
Joined: Sun Jul 12, 2015 5:38 pm
Flair: Tamer of Boom Booms
Contact:

Re: Toggling full-camera particles on certain sections

Postby PixelPest » Fri Dec 15, 2017 10:54 pm

You don't "install" rain particles. What code do you have already?

The0x539
Eerie
Eerie
Posts: 751
Joined: Fri Jan 22, 2016 8:02 pm

Re: Toggling full-camera particles on certain sections

Postby The0x539 » Fri Dec 15, 2017 11:57 pm

In your code there'll be an emitter. Somewhere in the code you'll be calling its draw method. Just stick that method call inside an appropriate if statement.

sheepsaren1ce
Cheep-Cheep
Cheep-Cheep
Posts: 11
Joined: Wed Aug 16, 2017 2:05 am

Re: Toggling full-camera particles on certain sections

Postby sheepsaren1ce » Sat Dec 16, 2017 6:03 am

PixelPest wrote:You don't "install" rain particles. What code do you have already?
Code:
local effect = particles.Emitter(0, 0, Misc.resolveFile("particles/p_rain.ini"));
effect:AttachToCamera(Camera.get()[1]);

function onCameraUpdate()
effect:Draw();
end

Hoeloe
Phanto
Phanto
Posts: 1465
Joined: Sat Oct 03, 2015 6:18 pm
Flair: The Codehaus Girl
Pronouns: she/her

Re: Toggling full-camera particles on certain sections

Postby Hoeloe » Sat Dec 16, 2017 7:03 am

Like The0x539 said, you're calling effect:Draw(). All you need to do is check the section first.

sheepsaren1ce
Cheep-Cheep
Cheep-Cheep
Posts: 11
Joined: Wed Aug 16, 2017 2:05 am

Re: Toggling full-camera particles on certain sections

Postby sheepsaren1ce » Sun Dec 17, 2017 3:55 am

Hoeloe wrote:Like The0x539 said, you're calling effect:Draw(). All you need to do is check the section first.
Thanks!


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 3 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari