CHANGING ROOM MAP-COLOUR (and or label) MIDGAME

Jennifer Wren
05 May 2023, 23:19

I have been trying to make something up on my own, but am just getting errors as I do not know (for certain) what to call the grid_fill and I do not know how to talk about string (like red) in an "if". I want to make scripts that say If room1.grid_fill = red (or if random number = 3), then room1.grid_fill = violet.
However, "red is not an object quest recognizes."
Looking through the help pages, I found a script to change the colour of the grid background, but I want to be able to change the individual room cells.
I know how to change them at the start of the game. I a looking for a script or system I can use to change the colour (or label, maybe) from an if or other in-game script.


Ip Man
13 May 2023, 01:28

Jennifer... what happens when you simply put in the code

room.grid_fill = "Red"

That doesn't change the room colour for you?


Ip Man
13 May 2023, 01:46

I have a room named "Shop" in my test game. I was able to make it change the color of the room mid-game in a script with this code.

Shop.grid_fill = "Red"
Grid_DrawRoom (Shop, true, game.pov)
if (Contains (Shop, game.pov)) {
Grid_DrawPlayerInRoom (Shop)
}

So whatever it is you want to have trigger the room, add that. If it's in a description script, or a take script, or the result of a conversation.


Ip Man
13 May 2023, 01:53

Oooooh! I see, you're trying to do something more complicated

But I think the principle is the same. Try Capital Red in quotes when you refer to the colour in the "if" script.