Whats the best way to make a falling comet?Ice Comet in CBEffects looks great but it’s static.
Ty.
Whats the best way to make a falling comet?Ice Comet in CBEffects looks great but it’s static.
Ty.
Should be simple - simply be a matter of changing X/Y values of the vents inside of the comet VentGroup.
Check out the “translate” command.
Should be simple - simply be a matter of changing X/Y values of the vents inside of the comet VentGroup.
Check out the “translate” command.
Caleb, could you give a short example please?
I try this code:
local CBE = require("CBEffects.Library") local CBObject = CBE.VentGroup{ { preset = "fountain", title = "fontanna", x= 200, y= 300 }} CBObject:emit("fontanna") CBObject:translate("fontanna", 400) CBObject:emit("fontanna")
but without success. Second emit is in new position. First emit doesn’t move.
Thank you.
The first emit doesn’t move because the X/Y position means the location particles will be created when .emit() is called.
If you want to move the entire effect, you could move the vent’s content group:
[lua]
local vent = CBE.NewVent{
preset = “fountain”,
title = “fontanna”,
x = 200,
y = 300
}
vent:emit()
vent.content.x, vent.content.y = 400, 300
vent:emit()
[/lua]
By the way, with CBEffects 2.0 and up, single vents should utilize the .NewVent function call for maximum goody.
I think I still don’t understand what a vent is
I want two independent vents.
So, I’m trying to generate two vents one after another and move first vent down, and second vent up.
But this code doesn’t work correctly:
local vent = CBE.NewVent{ preset = "fountain", title = "fontanna", x = 200, y = 300, perEmit=30, } vent:emit() v = vent.content transition.to( v, { time= 1000, y=600} ) vent:emit() v2 = vent.content transition.to( v2, { time= 1000, y=0} )
what is wrong?
A vent is an object that creates and moves a specific type of particles according to pre-defined rules. VentGroups are “managers” for vents; they aid in having more than one vent instead of using multiple references.
Two vents merits a VentGroup, after all :
[lua]
local ventGroup = CBE.VentGroup{
{preset = “fountain”, title = “fontanna1”, x = 200, y = 300, perEmit = 3}, – Changed from 30… that’ll make things go really slow
{preset = “fountain”, title = “fontanna2”, x = 200, y = 300, perEmit = 3}
}
ventGroup:start(“fontanna1”, “fontanna2”) – Start them emitting
transition.to(ventGroup:get(“fontanna1”), { – The “get” command returns the actual vent object
time = 1000, y = 600
})
transition.to(ventGroup:get(“fontanna2”), { – Now use the second fountain
time = 1000, y = 0
})
[/lua]
Anyhow, that should serve as a pointer.
Caleb, could you give a short example please?
I try this code:
local CBE = require("CBEffects.Library") local CBObject = CBE.VentGroup{ { preset = "fountain", title = "fontanna", x= 200, y= 300 }} CBObject:emit("fontanna") CBObject:translate("fontanna", 400) CBObject:emit("fontanna")
but without success. Second emit is in new position. First emit doesn’t move.
Thank you.
The first emit doesn’t move because the X/Y position means the location particles will be created when .emit() is called.
If you want to move the entire effect, you could move the vent’s content group:
[lua]
local vent = CBE.NewVent{
preset = “fountain”,
title = “fontanna”,
x = 200,
y = 300
}
vent:emit()
vent.content.x, vent.content.y = 400, 300
vent:emit()
[/lua]
By the way, with CBEffects 2.0 and up, single vents should utilize the .NewVent function call for maximum goody.
I think I still don’t understand what a vent is
I want two independent vents.
So, I’m trying to generate two vents one after another and move first vent down, and second vent up.
But this code doesn’t work correctly:
local vent = CBE.NewVent{ preset = "fountain", title = "fontanna", x = 200, y = 300, perEmit=30, } vent:emit() v = vent.content transition.to( v, { time= 1000, y=600} ) vent:emit() v2 = vent.content transition.to( v2, { time= 1000, y=0} )
what is wrong?
A vent is an object that creates and moves a specific type of particles according to pre-defined rules. VentGroups are “managers” for vents; they aid in having more than one vent instead of using multiple references.
Two vents merits a VentGroup, after all :
[lua]
local ventGroup = CBE.VentGroup{
{preset = “fountain”, title = “fontanna1”, x = 200, y = 300, perEmit = 3}, – Changed from 30… that’ll make things go really slow
{preset = “fountain”, title = “fontanna2”, x = 200, y = 300, perEmit = 3}
}
ventGroup:start(“fontanna1”, “fontanna2”) – Start them emitting
transition.to(ventGroup:get(“fontanna1”), { – The “get” command returns the actual vent object
time = 1000, y = 600
})
transition.to(ventGroup:get(“fontanna2”), { – Now use the second fountain
time = 1000, y = 0
})
[/lua]
Anyhow, that should serve as a pointer.