• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

The "light effect" {applying a filter depending on a unit's distance to a torch}

Status
Not open for further replies.
Level 7
Joined
Aug 30, 2008
Messages
347
I need help with a trigger, i tried it numerous times but it didn't work....

I need a trigger that every time a unit walks near a glowing torch they will gain vision(fade filter transparent white, slowly getting more vision) and the more they stray from it they will lose vision(black fade filter thing)

help pls!
 
Level 9
Joined
Jul 3, 2008
Messages
495
Maybe the night elf "Night Vision" (Cant remember the name) can do the work. I dont know if you can make it also work for days.

Else I think the human flare ability can do it. I remember vexorian do that in one of his spells
 
Level 7
Joined
Aug 30, 2008
Messages
347
Yes I'm doing it for a campaign and I'm planning to use the fade filter trigger but have little knowledge of it, also reduces they're acquisition range
 
Level 28
Joined
Jun 4, 2007
Messages
1,480
I know! You can add to them the ability Chaos, alternate unit is the same just with more vision. When they leave give them a Chaos the other way around.

He's talking about fade filters. He want's the screen to be darker when you are far away from the torch and brighter when you're closer.
I'll start working on the system now.

EDIT:
Well the fading works so far but only with one unit and one torch. I think I can add some more torches but not units. The accusition range could be done too but the increased vision part will be a problem.

Here is the current progress: View attachment VisionSystem.w3x
 
Last edited:
Level 9
Joined
Oct 24, 2007
Messages
421
Make a trigger if it's single player that every .03 seconds checks the distance between the unit and the torch, and decide on how far a unit will be before he has 100% blackness. Use an arithmetic to change the transperency value as the distance changes.

I dont have the world editor on me but something like

Event - every .03 seconds of game time

For each integer variable [a] from 1 to [distance checking ranges amount]
Unit group - pick units matching condition [unit type = torch] within [distance checking range] of [hero] and do:
If [still checking] equal to true
Then set [transperency] to [distance arithmetic here]
Cinematic - fade filter apply with tint 0,0,0 with transperency [transparency] over 0 seconds
Set [still checking] equal to false
Else do nothing
(close the unit group thing and after still in loop)
Set [a] to [a] + [added range if torch not within that range]
close loop
If [still checking] equal to true
Fade filter 0,0,0 transparency 0%


I'll make this in the editor later on but it should work, and leaks can be removed from it easily.
 
Level 3
Joined
Jul 6, 2008
Messages
42
I had made some modified on the map Thrikodius make .
Well , i used 20 dummy with each differ by 50 AOE of sight (assumed u used max sight is 1000AOE). Well , for bigger AOE of sight , create more dummy .

In this map I also add 2nd Deneration of fade , that is modified version for your long script , and also 3rd generation that is my version to make this system (well , I'm not using region center but unit position instead.)

Well , I don't think white mask is neccessary - -

Oh ya , my 3rd generation of this vision system can store up to 8192 touches (In case it not lagging = =). To plant more touch , go layer>unit>human>custom unit , There got a dummy different icon with eyes .

Haha , enjoy , any misunderstood , can pm me .
 

Attachments

  • VisionSystem modified.w3x
    27 KB · Views: 56
Level 7
Joined
Aug 30, 2008
Messages
347
Thanks

Yeah that would be cool, :thumbs_up:
thanks by the way everyone who helped, you really helped "advance" most parts in my campaign :mwahaha:
+ Rep
And I'm making sure to put you guys on the big credits list at the end! :fp:

Thanks again! :grin:
 
Status
Not open for further replies.
Top