ID:138545
Jun 17 2000, 7:18 am
|
|
Sorry I haven't been posting here in ages, anyways. How if I can, do I put an image in the stat panel window? Also is there any possibility in making certain icons larger, but still having them centered on the grid, i.e. not just a 4x4 tile thing. Also, how would I make it so if I have a certain turf named turf/air, that it would show whatever is below it, so someone could see down from a cliff or through a hole. Also, I still haven't figured out how to make the overlays for clothing, etc. corrospond to the mob's icon_state. Lastly, how can I have an icon display in one state when its on the ground and display another way when its in the usr's inventory? Thanx for all the help you've been in the past and hopefully I'll be able to get Maeva up and running some time to show off some of its new features.
|
In response to Spuzzum
|
|
Also, how would I make it so if I have a certain turf named turf/air, that it would show whatever is below it, so someone could see down from a cliff or through a hole. Hmm. That's a tough one. If you mean showing stuff on a lower Z level, then that just isn't possible without some loss of efficiency and a whole lot of crappy imagery. Yep! But this post got me thinking, and now, there may be a "good enough" crappy solution... I'll post it to the Code and Demos forum straight away. Strictly speaking, it uses area/openAir instead of turf/air, but why quibble? :) |
Yeah, I was thinking about asking where you were just last night, even ;-)
You need to create an object, then pass that object as a stat. For example,
mob
var
obj/pic
New()
..()
src.pic = new /obj
src.pic.icon = 'icon.dmi'
src.pic.icon_state = "icon_state"
Stat()
..()
statpanel("monitor")
stat("health:",usr.healthy) //early to bed,
stat("wealth:",usr.wealthy) //early to rise,
stat("wisdom:",usr.wise) //makes a man...
stat("damage meter:",usr.pic) //passes in the object and thus the icon
We've been demanding that for centuries now ;-)
Hmm. That's a tough one. If you mean showing stuff on a lower Z level, then that just isn't possible without some loss of efficiency and a whole lot of crappy imagery.
You could probably accomplish it by creating a bunch of overlays and overlaying them on turfs on successive Z levels above the mob. Whenever the mob moves, you'd have to delete the old overlays, and make new ones. Like I said... =P
You might also try creating several mobs that correspond to each other, and when the user calls mob.Move(), the mobs move as well. But that would a) be processor intensive, and b) suck when you're trying to define which turfs the mobs can show up under.
Remember, overlays are purely graphical. They have no actual substance, and thus cannot be modified once they are overlaid, save deletion. You'd be better off deleting the old overlay and overlaying the new ones, which would be processed too fast for the player to see anyway.
Yep, all you have to do is modify the icon state whenever you move it into usr.contents. So if you get() an item, you add code into get() that changes the icon state. Likewise, you change the icon state back whenver you drop() an item.
Damn straight! =)