26

Re: [Modification] Red Laser/Green Laser

please tell me how does it work

27

Re: [Modification] Red Laser/Green Laser

It easy to change the color: (If you have already C++ and the source)

1. Open the file src\game\client\componets\items.cpp
2. Search in this file for "laser"
3. Under this word you find "inner_color" and "outer_color" (not the ones with // infront)
4. Inner_color is the color of the laser, outer_color is the color of the laser at the end
5. After this two values you see something like "vec4 inner_color(0.5f,0.5f,1.0f,1.0f);"
6. The first 0.5f is the red color, the second 0.5 is the green color and the first 1.0 is the blue color the last 1.0 you don't need to change (1.0 = max; 0.0 = min)
7. Change the numbers and compile it.
    FINISH

28

Re: [Modification] Red Laser/Green Laser

yeah, i like it, really nice wink i think that could be in 5.2 or 6.0, to select the colour wink

29

Re: [Modification] Red Laser/Green Laser

@KillaBilla: Do i have to change the numbers like in a graphic programm, that's rgb?

Sry for my bad english I'm just 15^^

30

Re: [Modification] Red Laser/Green Laser

Yes: But its not the html rgb in html the highest number is ff for the laser the highest is 1.0.
Its rgb but you need an f behind the value, I don't know why but it is needed.

For Example: (1.0f,0.0f,0.0f,1.0f) is a red laser
                     (0.0f,1.0f,0.0f,1.0f) is a green laser

Now you have to know how to mix up color wink (red + blue = purple ect.)

31

Re: [Modification] Red Laser/Green Laser

Is there a page like this: http://tomheller.de/theholycymbal/html-farben.html
for these colours?

Sry for my bad english I'm just 15^^

32

Re: [Modification] Red Laser/Green Laser

No, there is no exiting page like this, you have to do it yourselfe, like:

HTML       TW
  ff           1.0
  00         0.0
  75         0.5    (ca.)

33

Re: [Modification] Red Laser/Green Laser

mmh lets see if i understood it big_smile
when not i will look in google ^^

Sry for my bad english I'm just 15^^

34

Re: [Modification] Red Laser/Green Laser

hope it will be allowed to change the colour in the next teeworlds version :]

35 (edited by KillaBilla 2009-06-24 11:27:04)

Re: [Modification] Red Laser/Green Laser

Hello everbody,

I made a small tool for those people who wants to make there own laser color! You just have to enter the html hex color like "ff00ff" and to press enter, then you get the tw color, but you have to put it in the source without me and the tool wink. I am sorry because it is only for Windows, it is written in Batch a small Windows programming language. To get the HTML color look on a page like this: http://tomheller.de/theholycymbal/html-farben.html. And don't enter the # from the html hex.


Download: Windows (3 KB) Don't change anything in this file!