ID:178296
 
I've tried this dozens of times since this command was added, but still no answer, could you guys help me out? How do I apply this proc to a certain icon?

Thanks, Ter13
You go into DM. You press F1. You type in swap, then you press enter. Then you read what's there.
In response to Garthor
Garthor, I have already tried that, would you like to give me some advice? when I compile it when using swapcolor() is says no such proc. I need to know the proper syntax for it, the help directory does not help at all.
In response to Ter13
SwapColor
In response to Garthor
I COULD KILL YOU RIGHT NOW!!!!! Could someone who KNOWS what they are talking about help me? I KNOW it has capitals, I DID NOT ASK HOW TO TYPE IT! I asked how to apply it! I swear to the divine spirits Garthor, if you make one more post that is no help whatsoever here, I WILL rip a few rounded appendages off and spoonfeed them to you! I need to know how to apply it to a SPECIFIC icon, why don't you go try to use it Garthor, and if it works, then I'll trust your advice, if not, then you can shut the hell up!!!!!!!
In response to Ter13
mob/verb/RedToBlack()
var/icon/I = new(usr.icon)
I.SwapColor(25,0,0, 0,0,0)
usr.icon = I
In response to Garthor
thats not right
SwapColor(RGB(25,0,0),RGB(0,0,0))
Garthor, maybe you should test it first, then post it. you idiot
In response to Ter13
don't call me an idiot for giving you code. I have no obligation to test it. I was just giving you the format you needed, so that you'd stop whining like a 4 year old.
In response to Garthor
You don't have any right to post incorrect code snippets, that makes you a moron for misleading a fellow BYONDer and causing him more greif

I really need help on this, anyone?
In response to Ter13
hehe.
In response to Ter13
Ter13 wrote:
You don't have any right to post incorrect code snippets, that makes you a moron for misleading a fellow BYONDer and causing him more greif

You have no right for calling a "fellow BYONDer" an idiot for trying to help you. Then, you call him a moron for posting "incorrect code snippets", which, for all you know, are probably correct. Since I've never used the SwapColor() proc, I can't back Garthor up there.

I really need help on this, anyone?

To quote dozens before me...

No.
In response to Ter13
Ter13 wrote:
You don't have any right to post incorrect code snippets, that makes you a moron for misleading a fellow BYONDer and causing him more greif

I really need help on this, anyone?

I think you kind of should of avoided calling Garthor an idiot several times and insulting his code. Obviously yours is no better, seeing as you can't get it to work either.

Be kind, and people will (probably) help you.

- Malver
In response to Winbiko
God i wish i owned a sodderring iron right now, i thought garthor was bad, but then all of you guys get into it... I'm going to need an extension cord.....
In response to Ter13
Ter13 wrote:
God i wish i owned a sodderring iron right now, i thought garthor was bad, but then all of you guys get into it... I'm going to need an extension cord.....

I'm reminded of a "letter to the editor" that I read in the local paper.

A guy is complaining about how people in the area don't obey traffic laws. He goes on and on about how they rush through lights at the last minute, don't have any idea how to navigate THE traffic circle, and are careless and inconsiderate in general.

To illustrate this, he explains that he's been involved in sixteen (!!!) accidents alone at the same off-ramp.

Moral of the story: When your record is that bad, you should stop blaming other people. You're the one who's being the idiot.

Regards,
Corporate Dog

In response to Corporate Dog
Especially when you're reviving posts that are 3 days old.
In response to Garthor
Nobody is reviving posts. *attempts to smirk innocently*

Ter, Tier, Teir, I'm sorry, I forgot what your name was after I clicked reply. Either way, I recommend you whine and flame excessively, until you get an answer.

Doh!

Wait, no, don't do that. Thats my patented copyrighted method for recieving code help, so you can't do it. I would simply recommend you ask once, if nobody responds, ask again. If they are smartasses with you *looks at Garthor*, pagerban them, then ignore em :P (unless it's me, of course). Eventually somebody with a brain will help you. If you don't get a reply within a week or so, I would recommend reposting, with a new topic, your problem. Possibly word it differently. Anyways, blah blah blah blah blah, blah, blah. Blah blah......


I'll shut up before I get too stupid here.

Remember: Silly is what you are when you are yourself. Serious is just something you do until you can be silly again.
I know this post is old, but I thought I'd try to help out just in case you still are having problems.

By looking into the reference this is what I have come up with. Let's say, for example, you have a turf named Lava. This lava is all red except for some yellow in the middle. Now, when I click on the lava, I want the yellow inside of the lava to turn to black. I would use the SwapColor as follows,
SwapColor(rgb(255,255,51), rgb(0,0,0))

Now, by just putting that inside a proc gets me an error as well. To make this as short as possible, in the reference it shows an example that is creating a new icon first, then swapping the colors, then changing the objects icon to the new "swapped" icon. Did I lose you? Basically you are creating a new icon, swapping the colors, then replacing the old icon with the new icon (with the new colors). Below is an example piece of code that I have tried and works. I hope this was some help.
turf
   Lava
      icon = 'lava.dmi'
      Click()
         src.Change()
         world << "Lava has been changed"
      proc
         Change()
            var/icon/I = new('lava.dmi')  //Creates new icon
            I.SwapColor(rgb(255,255,51), rgb(0,0,0))  //Swaps colors
            src.icon = I  //Sets the Lava icon to the new one with the swapped colors
In response to Creek
ok, thanks a lot, so t his only works with the entire icon file? I just want to change 1 person's shirt black, will other people's shirts still remain red, green, purple, etc?
In response to Ter13
Ter13 wrote:
ok, thanks a lot, so t his only works with the entire icon file? I just want to change 1 person's shirt black, will other people's shirts still remain red, green, purple, etc?

Yes, this will affect the whole icon.
However, you can get around this by extracting the one person's icon and just making them use that:
var/icon/ic = new /icon('players.dmi',"guywithshirt")
ic.SwapColor(rgb(255,0,0),rgb(0,0,0))
themob.icon = ic

Lummox JR