ok so im trying to create a fog in a specific are on command. this is what i have right now.
for(var/turf/T in view(15))
new/obj/fog(T)
this is called by a usr verb this is just the creating part. everything else works fine but i cant get the fog to show up.
ID:161043
Jun 25 2008, 4:50 pm
|
|
Jun 25 2008, 4:52 pm
|
|
Using an /obj at every turf for a visual effect is a bad idea. Anyway, search first before posting. This recent topic has implementation of a similar effect. [link]
|
In response to Kaioken
|
|
I did look and thats not what im looking for. Im trying to create a square of fog and it will only last for a little while its a blinding skill for a magician. So there will be the 15 by 15 square of concealment for the magacian so i dont want to add it to the screen and i want to every player to see it. So what would be the best thing to do
|
In response to NightJumper88
|
|
NightJumper88 wrote:
So what would be the best thing to do That's a good detailed explanation. =) For that case, the best way would probably be to simply add overlays to the wanted group of turfs (which you can get by looking up and using block() or range()) and remove them when the spell is over. |
In response to Kaioken
|
|
ok will the overlays be ontop of the mobs thats why i didnt do overlays at first
|
In response to NightJumper88
|
|
Yes. This can also be ensured by adding overlay objects with a higher layer value.
|
In response to Kaioken
|
|
Ok just to make sure Im reading this right i need to make an obj to use as an overlay with a higher layer right? And thanks for the quick responses I appreciate it
|
In response to NightJumper88
|
|
Yes. For more information and examples, read on 'overlays' in the DM Reference (F1 from Dream Maker). You can use obj type paths rather than obj instances.
NightJumper88 wrote: And thanks for the quick responses I appreciate it Sure, you're welcome. |
In response to Kaioken
|
|
Thanks thats where i was reading when refering to making an object I usually can get what i need from the reference in the first place but was lost this time. I got it working now all i need to do is work on the transparency of the fog to get it the way i want. Thanks Again for your help
|
In response to Kaioken
|
|
I do have a question on a similar topic. I have another skill where the caster will shoot out a wave say 5 squares wide and move forward, and I would like it to leave behind water and change the terrain to water for awhile and then fade away back to normal. Any suggestions on the best way to do this you dont have to go in detail right now not working on it just whether or not i should create new terrain or change the current terrain somehow
|
In response to NightJumper88
|
|
You can probably do it similarly to existing projectiles you have implemented (ie a gunshot, a fireball spell...), only make it create 5 at once and tweak its effect so it changed the turf (or whatever)'s type to water (you'd probably want to change the icon then as well I assume), then after a spawn()-ed delay sets it back to what it was before.
|
In response to Kaioken
|
|
ok thanks thats what i figure I would do just wanted to check while you were answering questions to see if there was a better way starting to get above my current coding level and wanted to do more stuff. Thanks again
|
In response to Kaioken
|
|
Hey i was wondering if you could help me with my next problem. Im trying to create multi tile underlays and ive been told to do it like this but i remember seeing somewhere an easier way but cant find it now. Any ideas
mob/Multi New(atom/Loc) ..() BuildIcon() var/list/parts proc/BuildIcon() icon=parts["0,0"] for(var/location in (parts-"0,0")) var/comma=findtext(location,",") var/px=text2num(copytext(location,1,comma)) var/py=text2num(copytext(location,comma+1)) overlays+=image(icon=parts[location],pixel_x=px,pixel_y=py) Overlord parts=list("0,0"='ov_0,0.dmi',"32,32"='ov_1,1.dmi') |
In response to NightJumper88
|
|
Look up the pixel_x and pixel_y vars and learn to do it yourself instead of using someone's premade code. Objects (or object paths) with modified pixel vars that are added to overlays result in pixel-offsetted (including multi-tile if the offset is 32 or more in a given direction) overlay images.
|