Function
chance
(p: number): booleanrand(1) <= p
// every frame all objs with tag "unlucky" have 50% chance die
onUpdate("unlucky", (o) => {
if (chance(0.5)) {
destroy(o)
}
})
group
Math
subgroup
Random
rand(1) <= p
// every frame all objs with tag "unlucky" have 50% chance die
onUpdate("unlucky", (o) => {
if (chance(0.5)) {
destroy(o)
}
})
group
Math
subgroup
Random
Start
Assets
Game Obj
Components
Input
Events
Info
Math
Rendering
Draw
Debug
Plugins
Miscalenous