HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Annoying River Rushes Problem

08-30-2006, 05:17 AM#1
WTFish
I'm using river rushes in my map, and, while looking nice, they are really starting to annoy me. Other doodads change brightness when its day or night, whereas river rushes stay the same ( looks so bad at night lol). Does anyone know how I can change this, or maybe a custom model that will look similar but change brightness? That would be great.
08-30-2006, 06:18 AM#2
WildFurbolg
Make them unselectable immortal (by adding Aloc and Avul abilities) units then change their vertex color or transparency by a trigger at night.


Go to Object Editor, create a new unit. Set its model = River_Rush_Model, remove pathing and collision size, disable attack. Then add Locust (Aloc) and Neutral - Invulnerable (Avul) abilities.

Place these units instead of 'rushes' at the river.


You need a trigger, here is an example:

Variable: "RiverRushes" (Unit Group)

Trigger 1:

- Map Initialization
- Set RiverRushes = All units of type (type of your RiverRush unit)

Trigger 2:

- Time of day becomes equal 6
- Pick every unit in (RiverRushes) and
-- Set Vertex Color of (Picked Unit) to 100%, 100%, 100% with 100% opacity.

Trigger 3:

- Time of day becomes equal 23
- Pick every unit in (RiverRushes) and
-- Set Vertex Color of (Picked Unit) to 100%, 100%, 100% with 50% opacity.


Or something like that.

Enjoy!
08-30-2006, 09:24 PM#3
[Death]
Or you could just tint them darker?

Change the tint in the Art - Tinting Color Red/Green/Blue fields from 255 to other numbers - experiment.
09-01-2006, 05:57 AM#4
WTFish
@WildFurbolg: It would look really odd if they randomly changed tinting at certain times of the day, and if I wanted it to be smooth, it would require period trigger maybe?

@[Death]: Yeah I could tint them darker, but then they look really out of place at day time. (Exactly the same problem but opposite, lol.)

Perhaps there is a custom grass-like model that will darken/light at night/day changes?
09-01-2006, 06:55 AM#5
Pheonix-IV
You'll have to edit the model and remove the unshadowed material line.
09-01-2006, 01:19 PM#6
WildFurbolg
WTFish: Of course, you can make a periodic trigger, but I said I wrote just an example. If you want smooth morph, just use a loop with TriggerSleepAction(0.1) inside it.

Just like:

Collapse JASS:

// in Rushes_Fade use something like Const +/- udG_FadeInt for vertex coloring.

set udg_FadeInt = 10
loop
 exitwhen udg_FadeInt < 0
 call ForGroup(udg_Rushes, function Rushes_Fade)
 call TriggerSleepAction(0.1)
 set udg_FadeInt = udg_FadeInt - 1
endloop

In this case you won't notice visual difference.
09-01-2006, 08:19 PM#7
WTFish
Ahh... lol that looks tricky :P. I think it would be easier if I did what Phoenix-IV suggested, if that works. Is there a program I can download to do that, phoenix?
09-02-2006, 02:06 PM#8
Guesst
Here they are without the non-shading:
Attached Files
File type: zipriverrushes.zip (5.8 KB)
09-02-2006, 09:21 PM#9
WTFish
Sweet, thanks man! These will do nicely... :D