ID:269960
Nov 26 2005, 8:37 am (Edited on Nov 27 2005, 9:13 am)
|
|
Say i have turf/grass and turf/night/grass, how can i make a verb that replace the regular turf with the night turf like a day night system. Like in dwl.
|
In response to Unknown Person
|
|
I have 2 code files of night and day.
|
In response to Xx Dark Wizard xX
|
|
Uh...how is that relevant to what he posted?
|
In response to Hell Ramen
|
|
turf |
In response to Xx Dark Wizard xX
|
|
i changed it a bit
|
In response to Xx Dark Wizard xX
|
|
veryyyy long
for(var/turf/grass/a in world) new/turf/grassnight(a.loc) del(a) or you can easily do for(var/turf/a in world) a.icon_state = "night" assuming you use a different icon for each turf |
In response to Rky_nick
|
|
any easier way?
|
In response to Xx Dark Wizard xX
|
|
dunno. depends on what exactly your day/night system does
|
In response to Rky_nick
|
|
ok this is what it is. i have
turf I need a verb that adds the text "night" after the turf's iconstate, and changing them, from day to night to day etc etc. |
In response to Xx Dark Wizard xX
|
|
there is a lot easer way creaed a icon. make have the pixele black and the other have invible. like this patten
X0X0X0X0X0X0X0X 0X0X0X0X0X0X0X0 X0X0X0X0X0X0X0X 0X0X0X0X0X0X0X0 X0X0X0X0X0X0X0X 0X0X0X0X0X0X0X0 Where X = Black 0 = Invible Then when its night overlay it on every turf and when its day remove it from every turf |
In response to The Riddler
|
|
I made the icons, i just need a verb that will change all the regular turfs to night like turf/grass and replace it with turf/grassnight. and affect every turf on the map.
|
In response to Xx Dark Wizard xX
|
|
You can't just change path types of an object. In order to do that, you'd have to create a new object in replacement for that, which I doubt you'd want to do. As I said earlier, you want to change the icon instead.
~~> Unknown Person |
In response to Unknown Person
|
|
yes how can i change all the icons.
|
In response to Xx Dark Wizard xX
|
|
A simple for() loop will do. You need to have a global variable checking if it is day or night.
var This would work if all atomic object's icons were in one file. If not, you would have to set some conditions. ~~> Unknown Person |
In response to Unknown Person
|
|
mob/verb how do i apply that to turf |
In response to Unknown Person
|
|
This is my turf file
turf how do i make a verb that changes the regular turfs to night ones |
In response to Xx Dark Wizard xX
|
|
for(var/turf/T in world) Download the dither demo and do the opposite. :o. |
In response to Mysame
|
|
no, i have turfs from dragon warrior 4 which i ripped at night time. I dont need dither, i just need a verb that will replace all my turf/whatever with turf/whatevernight. for every turf.
|
In response to Xx Dark Wizard xX
|
|
examle
|
~~> Unknown Person