ID:146994
 
Okay, I have a HUD system in my game, with a bunch of circles. For their creation:
client/New() ..() new/obj/hud/circles/circle1(src) new/obj/hud/circles/circle2(src) new/obj/hud/circles/circl...

Then for the individual circles:
obj hud circles layer = MOB_LAYER + 1 circle1 icon='Circles.dmi' New(client/C) screen_loc = "10,7" C.screen+=src circle2 icon='Circles.dmi' New(client/C) screen_loc = "11,7" C.screen+=src circle3 icon='Circles.dmi' New(client/C) screen_loc = "12,7" C.screen+=src

Now, When I do a 15x10 map, they are on the right side of the screen, as they are intended to be. When I do a 20x20 map, however, they're all close to my character. Does anyone know how to fix this?
Check the size of the client's screen before setting the screen_loc variable for the circles. Then use some math to determine where they should go.
In response to Jon88
The world/view is 16x10
FireEmblem wrote:
Okay, I have a HUD system in my game, with a bunch of circles. For their creation:
<code> > client/New() > ..() > new/obj/hud/circles/circle1(src) > new/obj/hud/circles/circle2(src) > new/obj/hud/circles/circl...</code>

Then for the individual circles:
<code> > obj > hud > circles > layer = MOB_LAYER + 1 > circle1 > icon='Circles.dmi' > New(client/C) > screen_loc = "10,7" > C.screen+=src > circle2 > icon='Circles.dmi' > New(client/C) > screen_loc = "11,7" > C.screen+=src > circle3 > icon='Circles.dmi' > New(client/C) > screen_loc = "12,7" > C.screen+=src > </code>

Now, When I do a 15x10 map, they are on the right side of the screen, as they are intended to be. When I do a 20x20 map, however, they're all close to my character. Does anyone know how to fix this?

client/New()
..()
new/obj/hud/circles/circle1(src)<---- change src to mob
new/obj/hud/circles/circle2(src)<---- change src to mob

new/obj/hud/circles/circl...</code>
In response to Zaltron
Post [link]

Crispy wrote:
[snip]and please don't quote a very long post just to say one sentence.[/snip]

I think most of us agree that is a bit annoying when we are trying to catch up and read all the forum posts that have been made since we were last on.

Just a heads up.
In response to Zaltron
Dude, when I do (mob), I get RUNTIMES.

<code>FireEmblem (/client): New() runtime error: undefined variable /mob/var/screen proc name: New (/obj/hud/circles/circle9/New) usr: null src: the circle9 (/obj/hud/circles/circle9) call stack: the circle9 (/obj/hud/circles/circle9): New(FireEmblem (/mob)) FireEmblem (/client): New() runtime error: undefined variable /mob/var/screen proc name: New (/obj/hud/circles/circle10/New) usr: null src: the circle10 (/obj/hud/circles/circle10) call stack: the circle10 (/obj/hud/circles/circle10): New(FireEmblem (/mob))</code>
FireEmblem wrote:
Now, When I do a 15x10 map, they are on the right side of the screen, as they are intended to be. When I do a 20x20 map, however, they're all close to my character. Does anyone know how to fix this?

Well, as I understand it - client.screen is nothing more than a "grid" or list with plot points. 1,1 for example. And, if you stretch that grid, the points on the plot move. So, in short - when you change the screen size, you have to realign the screen objects to their respective order.