ID:158079
![]() Nov 6 2009, 4:11 pm
|
|
How do I make a turf that adds an overlay icon_state, 1 tile above the base icon. Thanks for the help =D
|
Your description was not detailed enough, so in my answer I'm going to have to take a guess (or three). When you ask a question (or describe a problem), it should be detailed and comprehensive so that other people, who initially have no idea what you're talking about, can understand exactly what you mean after they read it, and be aware of precisely what you want (or what the problem is).
I assume you want said turf to add an overlay to any [player?] mobs that enter it, which appears on the tile above them. To do this you will need to look up (F1 in Dream Maker) overlays, pixel_x and Entered(). What you will need to do is to override the respective turf's Entered(), and in there, check if what entered the turf is a mob [or a player mob], and if so, add an overlay to it using a value that indicates a pixel_y value of world.tile_size (or 32, as you would've always used up to BYOND 455, but that's a little less robust). An example of such a value is the type path of the following object definition: obj/overlay/above_head Then, adding an overlay using the type path value /obj/overlay/above_head (or an object created from it) will cause it to appear 32 pixels above the mob. There are also various other methods, such as using an /image object: overlays += image('icon.dmi',null,"iconstate",pixel_y = world.tile_size) (Note: the var world.tile_size is only present beginning from the beta release of version 455) |
See what I was able to do was this.
switch(input("pick") in list("a","b","c")) So inside a.dmi, is normal, battle1, and battle2. I managed to do this: turf This turf makes any icon or as I use em' players that touch it leave it's normal icon state and become battle2 icon state. However as you can see its battle form is a multi tile icon. So I want the turf not only to change the normal state to battle2 state, which I did, but to also add battle1 1 tile above battle2. Sorry for not being specific before =[ you can help I'll really appreciate it =D |
atom / var / pixel_y