-
-
Notifications
You must be signed in to change notification settings - Fork 18
sstring
CryoEagle edited this page Dec 26, 2018
·
5 revisions
Turns a real number into a string.
sstring(n)
Argument | Description |
---|---|
object n |
The variable to transform into a string |
Returns: string
This function tries to change any object to a string. If object t is of a primitive type such as number then this will work out of the box. Should the input type be more complex eg. List<string>
then the type will be returned as a string.
draw_text(16, 16, "Enemies left: " + sstring(instance_number(obj_enemy)));
This code will draw in the top left corner how many enemies are left after an entrance phase of "Enemies left: ". This is very useful for displaying data on the screen such as FPS, instances in a room, coordinates, etc.
Back to strings