chance(p: number): boolean
rand(1) <= p
// every frame all objs with tag "unlucky" have 50% chance die onUpdate("unlucky", (o) => { if (chance(0.5)) { destroy(o) } })
rand(1) <= p
// every frame all objs with tag "unlucky" have 50% chance die onUpdate("unlucky", (o) => { if (chance(0.5)) { destroy(o) } })
Assets
Components
Component Types
Input
Events
Info
Math
Misc
Draw
Layer
Camera
Level
Plugins
Button Bindings