Login
Remember
IF Answers
Ask a Question

# help changing map color via code. [Quest]

0 votes
33 views
asked Aug 8 in Authoring by RanDumSocks (28 points)
edited Aug 8 by RanDumSocks

I am newer to the syntax of Quest so forgive me if I as a lot of questions.

I am looking to change the gridfill color of a specific room's map. I have tried changing the color via interacting with an object withing the room which gridfill color I want to change.

I have tries this:
exampleRoom.grid_fill="Green"

no error pops up but the room color ceases to change. I have also tried RGB numbers and hex, thought I might try everything before I ask. I am obviously referring incorrectly to the specific attribute I want to change, or Quest is giving me the bird so to speak :D

EDIT: I have fount that this code works, but the map color won't update. Is there some type of refresh or reload function for maps that will still keep the user's map data?

Help would be much appreciated!

- quest

## 1 Answer

0 votes
answered Aug 8 by RanDumSocks (28 points)
Best answer

Sorry let me answer my own question in case someone has the same. I fixed the issue. I had to manually call the function:

    Grid_Redraw()

to update the color then:

    Grid_DrawPlayerInRoom()

to add the player dot. I am clueless why this doesn't just update automatically, must be some type of error.

## Related questions

- How can I run a command via script? [Quest]
- Map drawing and offset bugs [Quest] [Game breaking]
- Help! I need to use a candle as a light source in rooms in my Quest text adventure game
- Is there any way to paste code into the web version of Quest?
- How to show unexplored map nodes at the start?

...