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?
ID:175624
![]() Mar 26 2003, 7:48 am
|
|
![]() Mar 26 2003, 8:01 am
|
|
screen_loc is just a simple text string. Try this:
|
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... |
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... |
Okay, so in my login proc put
Login() client.screen += obj/Happyface That sounds right, is that what I do??? |
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() 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 Does it matter if ive resised my window? Nope, as long as the coordinates you give in screen_loc fit within the window size. |
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! |
http://www.byond.com/hub/nadrew/nadrewshuddemo Take a look at that, it should help you.
|
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 |