j_mie6
Deity
How do I add a sign to the map? what I need to do is make a sign which contains the name of the city that is founded there...
I have this:
cityNameDict = {
(2, 1) : "City name",
(3, 18): "Another city name"
}
how do I make it so that a sign is made on the dict key saying the name?
so far I have:
but this just makes an arrow where the coords are because the function is this:
any ideas?
I have this:
cityNameDict = {
(2, 1) : "City name",
(3, 18): "Another city name"
}
how do I make it so that a sign is made on the dict key saying the name?
so far I have:
Code:
def mapNames(data):
for x in data.keys():
addMessage(data[x], (), eWhite, tCoords=x)
but this just makes an arrow where the coords are because the function is this:
Code:
def addMessage(tag, tValues, eColor, tCoords=(-1, -1), sound=""):
"""
Adds the tag (string) message to the game in eColor. (The preset pointers to valid
ColorTypes are eRed, eGreen and eWhite. A None value will disable the message.) If
the tag argument requires other values to be included in the message, then these
can be supplied with the tValues (tuple) argument. The optional tCoords (tuple)
argument is set to a pair of default -1 values that indicate that no arrow should
accompany the text message. (Valid map tile coordinates will enable the arrow.)
The sound argument (string) can point to the location of an optional sound file.
"""
if eColor == None: return
message = Translator.getText(tag, tValues)
bArrow = tCoords != (-1, -1)
Interface.addMessage(pHumanCiv.get(playerID), True, 20, message, sound, eMinorEvent, "", eColor, tCoords[0], tCoords[1], bArrow, bArrow)
any ideas?