Need help with Snow particle effect

Need help with any SMBX game-related issues? Ask your questions here.
User avatar
Animebryan
Hoopster
Hoopster
Posts: 174
Joined: Fri Jun 03, 2016 5:40 pm
Flair: Need help!
Current Project: Star of Darkness
Contact:

Need help with Snow particle effect

Postby Animebryan » Fri Oct 04, 2019 10:39 am

I'm trying to use a snow effect in a level but I want to make the snow particles stand out more (bigger & less transparent) & increase their number. Also, using an example code, it displays throughout all sections, including indoors. How do I control which sections to have it display in?
Need serious help with Lua based features :(

Enjl
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 8254
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Orphion Egamalenitar Osmos IV, Esq.

Re: Need help with Snow particle effect

Postby Enjl » Fri Oct 04, 2019 11:13 am

Only call the particle effect's draw function under the conditions you want it to draw. For example, after checking if player.section == 2.
To change the properties of the emitter, you can change the ini: https://wohlsoft.ru/pgewiki/Particles.lua#Values
Please do not use any of my assets (graphics, scripts) in works affiliated with the Novaverse. This applies to the original releases of those assets as well as any third-party variations (recolours, script alterations). Thank you.
________________________________________________________

The ABC of Creation
________________________________________________________
Image

User avatar
Animebryan
Hoopster
Hoopster
Posts: 174
Joined: Fri Jun 03, 2016 5:40 pm
Flair: Need help!
Current Project: Star of Darkness
Contact:

Re: Need help with Snow particle effect

Postby Animebryan » Fri Oct 04, 2019 11:50 am

I need code examples
Need serious help with Lua based features :(

Enjl
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 8254
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Orphion Egamalenitar Osmos IV, Esq.

Re: Need help with Snow particle effect

Postby Enjl » Fri Oct 04, 2019 11:54 am

function onDraw()
if player.section == 2 then
myEmitter:Draw(0)
end
end

You should already have a different name for myEmitter in your code.
Please do not use any of my assets (graphics, scripts) in works affiliated with the Novaverse. This applies to the original releases of those assets as well as any third-party variations (recolours, script alterations). Thank you.
________________________________________________________

The ABC of Creation
________________________________________________________
Image

User avatar
Animebryan
Hoopster
Hoopster
Posts: 174
Joined: Fri Jun 03, 2016 5:40 pm
Flair: Need help!
Current Project: Star of Darkness
Contact:

Re: Need help with Snow particle effect

Postby Animebryan » Fri Oct 04, 2019 1:24 pm

Where would I put that code? And what do you mean "different name for myEmitter"?

Image
Need serious help with Lua based features :(

Enjl
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 8254
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Orphion Egamalenitar Osmos IV, Esq.

Re: Need help with Snow particle effect

Postby Enjl » Fri Oct 04, 2019 1:28 pm

Animebryan wrote:
Fri Oct 04, 2019 1:24 pm
Where would I put that code? And what do you mean "different name for myEmitter"?

Image
As you can see, looking at my code and your code side by side, I call :Draw() on something. I named this something myEmitter to indicate that it is a particle emitter. In your code, it is called effect. All you need to do in your code is insert the check for player section, like I suggested in my first reply and illustrated in my other reply. The section number you need to insert depends on which section you want the emitter to draw in. Fairly simple conditional statement.
Please do not use any of my assets (graphics, scripts) in works affiliated with the Novaverse. This applies to the original releases of those assets as well as any third-party variations (recolours, script alterations). Thank you.
________________________________________________________

The ABC of Creation
________________________________________________________
Image


Return to “Help and Support”

Who is online

Users browsing this forum: Bing [Bot], SemrushBot [Bot] and 25 guests