FANDOM


Where are you?

This easy tutorial will show you how to put on the screen the positon of the camera



char* Location;

strcpy(Location,"X:");

strcat(Location,dbStr(dbCameraPositionX());

strcpy(Location," Y:");

strcat(Location,dbStr(dbCameraPositionY());

strcpy(Location," Z:");

strcat(Location,dbStr(dbCameraPositionZ());

dbText(0,0,Location);


Explanation:

char* Location;

Defines a char* (Set of characters) called location

strcpy(Location," X:");

Fills the Location with the string "X:"


strcat(Location,dbStr(dbCameraPositionX());

Apends dbStr(dbCameraPositionX()) to the string Location

dbStr(dbCameraPositionX())

Converts the integer dbCameraPositionX() to a string

dbText(0,0,Location); Outputs location on the screen to position X: 0, : )


By AlexI

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.