Function for Level Name
by UAT (#0025) · in Torque Game Builder · 09/27/2007 (11:24 pm) · 2 replies
I need a function to find what the level name is. I can make one, but would rather use a pre-built one. I looked through the documentation for it, but couldn't find anything like that.
Do you know any functions that return the current level name?
Do you know any functions that return the current level name?
Torque Owner Gabriel Notman
Add to common/gameScripts/levelManagement.cs:
//This holds the name of the last level loaded. $lastLevelName = ""; function getLastLevelLoaded() { return fileName($lastLevelName); }Note: The fileName() function strips all the proceeding path from the string, you may wish to compare the path as well. If so modify this to return the global directly.And to within the function:
under the line
Add
Gabriel