Skip to reading
GDScript Programming & Godot

randomize()

Edition 0.86.4.1 HF1

0.86.4.1 Hotfix 1 edition. Earlier lessons and screenshots retain their original version context; revised references and supplements describe the newer behavior.

Download PDFView PDF page
On this page

Earlier edition reference / Current 0.86.4.0 property paths > p. 350

Code example
randomize() -> void

Set the global random seed or randomize it. Use a separate generator for isolated puzzle randomness.

remap()#

Code example
remap(value: float, istart: float, istop: float, ostart: float, ostop: float) -> float

Convert a value from one numeric range to another.

rid_allocate_id()#

Code example
rid_allocate_id() -> int

Low-level resource identifier operations; not ordinary PCA record IDs.

rid_from_int64()#

Code example
rid_from_int64(base: int) -> RID

Low-level resource identifier operations; not ordinary PCA record IDs.

rotate_toward()#

Code example
rotate_toward(from: float, to: float, delta: float) -> float

Move an angle toward a target by a maximum angular step.

round()#

Code example
round(x: Variant) -> Variant

Round to nearest whole value; the suffix selects a typed variant.

roundf()#

Code example
roundf(x: float) -> float

Round to nearest whole value; the suffix selects a typed variant.

roundi()#

Code example
roundi(x: float) -> int

Round to nearest whole value; the suffix selects a typed variant.

Page 315 of 378Permalink
Go to page