If you specify the default control in screen_loc using screen_loc= "[control]:[x]:[offset_x],[y]:[offset_y]" for a screen object, it will not appear on the screen. Setting the control to null will cause it to use y as the x position while placing the screen_loc at the top of the screen.
Numbered Steps to Reproduce Problem:
1: Inside of a proc or verb, have screen_loc accept a variable control in its argument and have screen_loc use it, but pass the default map control (I kept it as "map1".
Code Snippet (if applicable) to Reproduce Problem:
HUD
parent_type = /obj
layer = 50
icon = 'hud.dmi'
var id //Common attributes for all HUD objects
var pos_x
var pos_y
var offset_x
var offset_y
var control
ButtonFrame
Draw(mob/m)
screen_loc = "[control]:[pos_x]:[offset_x],[pos_y]:[offset_y]"
m.client.screen += src
Expected Results:
When using the default map control as an argument, it should appear at the specified location.
Actual Results:
It does not appear on the default map control, but it does appear on other map controls.
Does the problem occur:
Every time? Or how often?
Every time.
In other games?
N/A
In other user accounts?
N/A
On other computers?
N/A
When does the problem NOT occur?
When a map control is not specified in screen_loc in the format screen_loc = "[x]:[offset_x],[y]:[offset_y]".
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
N/A
Workarounds:
Use an if statement if a control is specified and declare screen_loc depending if control is null.
if (!control)
p.screen_loc = "[pos_x]:[offset_x],[pos_y]:[offset_y]"
else
p.screen_loc = "[control]:[pos_x]:[offset_x],[pos_y]:[offset_y]"
Based on the way map icons get filled in, in fact, I would expect this was always the case. The icons get filled at a level "below" the skin where the default map name isn't actually known, and the lack of a map name is what ties the screen object to the main map.