ID:175624
 
OK guys, sorry to bug you all again but I seem to have a little dilema, I cant put jack into the screen. The help file mentions using screen.loc proc`s for putting stuff on screen, but when I put this in(The happy face thing is just a test, I can make more complex suff later)

obj
Happyface
icon = 'Happyface.dmi'
screen_loc(1,1)

The dern thing screams at me! it says, bad argument, or something like that. Can anyone help me on this one?
screen_loc is just a simple text string. Try this:
obj
Happyface
icon = 'Happyface.dmi'
screen_loc = "1,1"
In response to Air Mapster
And that`ell put it on the screen at 1,1?

Does it matter if ive resised my window? like my world view is

world
view = 11

i think...
In response to Dreadlordmajik
Nope, that alone isn't enough to put them on the screen... That just tells the program where to put them when you add them later...

You've got to throw in a line somewhere that looks like this (within a mob proc, usually in
Login()
):
client.screen += new/obj/whateverobject

And no, it doesn't matter if you've resized your view...
In response to SuperSaiyanGokuX
Okay, so in my login proc put

Login()
client.screen += obj/Happyface

That sounds right, is that what I do???
In response to Dreadlordmajik
Dreadlordmajik wrote:
And that`ell put it on the screen at 1,1?

As SSGX said, you have to add it to the client's screen variable first. The screen_loc just says that's where you want it to go if/when it gets added to the client screen.
client/New()
. = ..()
src.screen += new/obj/Happyface

That's the simplest approach. To get more complex so that you can add or remove it at will, I would add a mob variable to contain the Happyface. Then you could have verbs to add/remove it, or add/remove it based on conditions within the game:
mob
var
obj/Happyface/happy = new

verb
happy()
src.client.screen += src.happy
sad()
src.client.screen -= src.happy


Does it matter if ive resised my window?

Nope, as long as the coordinates you give in screen_loc fit within the window size.
In response to Air Mapster
Ok, so just to dubble check, I put this under obj..

obj
Happyface
icon = 'happyface.dmi'
screen_loc = "1,1"

and then under login i put

Login()
client/New()
. = ..()
src.screen += new/obj/Happyface

And should i feel the need to cahnge it, I would put 2 named icons in the Icon file 'Happyface,dmi' under the names (happy and sad)

Then to change them by clicking I could alter the obj file to look like this

obj
Happyface
icon = 'Happyface.dmi'
screen_loc = "1,1"
(double click command..) change icon_state = sad

Is that right? Do I learn quick or have i confused myself? Thanks for the help BTW!
In response to Dreadlordmajik
http://www.byond.com/hub/nadrew/nadrewshuddemo Take a look at that, it should help you.
In response to Nadrew
Hehe, I appretiate your help, but I forgot to mention one little thing, see, I`m writting all of this from school cause I don`t have the internet at home... So any demos and library files (unless text tutorials) are absoloutly useless to me cause I cant download anything here.

Sorry for the mixup
In response to Dreadlordmajik
That's what floppy drives are for.
In response to Skysaw
Yep, that's how I did it at school. But some schools don't allow use of disk drives, but in that situation have a talk with your computer teacher, he/she will probably let you after you tell him/her your case.