Page 1 of 3
How to disable automap ina floor? (trying to make labyrinth)
Posted: Tue Jan 15, 2013 2:44 am
by ChizFreak
Just that. I want to know if there is any way to prevent the player from opening the automap while he is on a floor. I'm trying to make a labyrinth and an automap would make it a trivial challenge. Making an effective labyrinth for an automap would require far more effort than to make a common labyrinth for non-map users. The Labyrinth is just one of the floors, so I would like to know if I can make it happen for just 1 floor.
Just came to my mind... maybe making a script that instantly kills the player if he opens the map? If this possible? Obviously I would warn the player about this when he reaches this floor.
Re: How to disable automap ina floor? (trying to make labyri
Posted: Tue Jan 15, 2013 3:17 am
by Komag
You could kill the player when pressing tab by detecting the key press with a gui hook. You could also manage to kill the player if they ever click on the little inventory/stats/skills map icon at the top, but that would be much harder to properly set up (depends on resolution, which can vary).
But as far as I know there is no current way to actually prevent the map showing (I'm not sure the effect of instantly killing the party upon the open map command, they might die before or after the map shows, or something different, don't know). The map is a different gui thing, and it would be nice to have its own hook so we could prevent it if wanted.
Re: How to disable automap ina floor? (trying to make labyri
Posted: Tue Jan 15, 2013 3:50 am
by Neikun
Remind me not to Alt-Tab in your dungeon!
Re: How to disable automap ina floor? (trying to make labyri
Posted: Tue Jan 15, 2013 4:26 am
by vidarfreyr
It would be very useful to have some map related functions. Like disable. Or even the ability to make parts of the map permanently under the 'fog of war', and player icon disappearing when walking into the permanent FOW.
There are two main reasons I could name for this:
- 1. The map ruins all puzzles involving teleporting or changing facing of the player without him knowing.
2. The map reveals hidden passages behind invisible walls.
Re: How to disable automap ina floor? (trying to make labyri
Posted: Tue Jan 15, 2013 4:42 am
by ChizFreak
vidarfreyr wrote:It would be very useful to have some map related functions. Like disable. Or even the ability to make parts of the map permanently under the 'fog of war', and player icon disappearing when walking into the permanent FOW.
There are two main reasons I could name for this:
- 1. The map ruins all puzzles involving teleporting or changing facing of the player without him knowing.
2. The map reveals hidden passages behind invisible walls.
I completely agree.
Re: How to disable automap ina floor? (trying to make labyri
Posted: Tue Jan 15, 2013 4:44 am
by ChizFreak
Komag wrote:You could kill the player when pressing tab by detecting the key press with a gui hook. You could also manage to kill the player if they ever click on the little inventory/stats/skills map icon at the top, but that would be much harder to properly set up (depends on resolution, which can vary).
But as far as I know there is no current way to actually prevent the map showing (I'm not sure the effect of instantly killing the party upon the open map command, they might die before or after the map shows, or something different, don't know). The map is a different gui thing, and it would be nice to have its own hook so we could prevent it if wanted.
Well that's unfortunate, anyway could you please tell me how to test that? If they die before the map shows then there is no damage. If they die after the map shows then the labyrinth it's already a bit "spoiled".
Re: How to disable automap ina floor? (trying to make labyri
Posted: Tue Jan 15, 2013 4:53 am
by Komag
you have to add the gui hooks to your party then code in what you want to happen, such as damageTile where the party is. You can see all the party gui hook info here (at the bottom of the "Party" section):
http://www.grimrock.net/modding/asset-d ... reference/
Re: How to disable automap ina floor? (trying to make labyri
Posted: Tue Jan 15, 2013 6:40 pm
by vidarfreyr
Perhaps we could use one of the following
drawRect(x, y, width, height): draws a filled rectangle with current pen color.
drawImage(filename, x, y): draws an image modulated with current pen color.
So that whenever the map is opened you could draw a rectangle over part or all of it, or a picture of an empty map page (a more elegant solution).
Re: How to disable automap ina floor? (trying to make labyri
Posted: Tue Jan 15, 2013 8:40 pm
by mahric
vidarfreyr wrote:Perhaps we could use one of the following
drawRect(x, y, width, height): draws a filled rectangle with current pen color.
drawImage(filename, x, y): draws an image modulated with current pen color.
So that whenever the map is opened you could draw a rectangle over part or all of it, or a picture of an empty map page (a more elegant solution).
Sadly, none of the draw functions we currently have allows us to draw over a map.
The map is always drawn *over* user drawn objects.
Re: How to disable automap ina floor? (trying to make labyri
Posted: Tue Jan 15, 2013 11:36 pm
by vidarfreyr
mahric wrote:Sadly, none of the draw functions we currently have allows us to draw over a map.
The map is always drawn *over* user drawn objects.
It's a shame that. We should request that kind of function with the developer.