Can scripts tell what wall set is in use?

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
Balthasar
Posts: 32
Joined: Sun Dec 09, 2012 1:53 am

Can scripts tell what wall set is in use?

Post 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?
User avatar
antti
Posts: 688
Joined: Thu Feb 23, 2012 1:43 pm
Location: Espoo, Finland
Contact:

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

Post 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.
Steven Seagal of gaming industry
User avatar
Komag
Posts: 3656
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

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

Post 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
Finished Dungeons - complete mods to play
Post Reply