Page 1 of 1

Can scripts tell what wall set is in use?

Posted: Thu Jan 10, 2013 8:12 am
by Balthasar
Just wondering if there's a way for my script to know what wall set is in use on a current level. Anyone?

Re: Can scripts tell what wall set is in use?

Posted: Thu Jan 10, 2013 10:02 am
by antti
One method that pops into my mind would be to check for some assets that you only use with that wallset. For example, you could know that you're using the dungeon wallset if a dungeon_stairs_up or dungeon_stairs_down is found in the level.

Re: Can scripts tell what wall set is in use?

Posted: Thu Jan 10, 2013 12:18 pm
by Komag
You could just define it ahead of time with your own chart of variables listed in a script entity (names whichWallScript:

Code: Select all

level1Wall = "dungeon"
level2Wall = "temple"
level3Wall = "temple"
level4Wall = "prison"
then refer to that from any other script with the script name then . such as:

Code: Select all

if whichWallScript.level2Wall == "temple" then blahblahblah end
or you could just return it:

Code: Select all

print(whichWallScript.level2Wall)
return whichWallScript.level2Wall