Transform Class
Variables
Variable
Type
Description
Examples
# Gets the location of the Collectible object
var Location : vector3 = Collectible.GetTransform().Translation
# Moves the location to a random place inside the boundaries of -100 to 100
var NewX: float = GetRandomFloat(-100.0, 100.0) + Location.X
var NewY: float = GetRandomFloat(-100.0, 100.0) + Location.Y
set Location = vector3{ X := NewX, Y := NewY, Z := Location.Z }
# Teleports the Collectible to the new location, and keep the rotation.
# It is placed inside a 'if' statement because it can fail.
if (Collectible.TeleportTo[Location, Collectible.GetTransform().Rotation]):
Collectible.RespawnForAll()
Collectible.Show()Last updated