• 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.

Creating fog for separate users

Status
Not open for further replies.
Level 30
Joined
Sep 30, 2008
Messages
1,460
If anyone has played my D3W map, you will notice there are two areas. The dungeon, and the outside forest area :) However, as it stands, both areas are using the global fog defined in the map options.

What I wan't to do is change the fog effects from the deep blue, to grey when a player steps outside the dungeon. However, I also want the fog to stay blue for any players that are still in the dungeon :p So basically I need to find a way to change fog colour for each player, rather than globally.

As far as Im aware, theres no way of creating different fog effects for different players by using GUI triggers.

Is there a way to do this using Jass? :S
 
Level 9
Joined
Apr 28, 2009
Messages
538
it can be done in GUI too. ([Unit enters-leaves region] + [environment - set fog - reset for (for owner of triggering unit)]) etc
 
Level 9
Joined
Apr 28, 2009
Messages
538
ops, my bad. Sorry. It seems it's not possible to do such thing in GUI.
However, i'll keep loking for a method, i'll let u know if I find something.
 
Level 17
Joined
Jun 12, 2007
Messages
1,261
You could try using the GetLocalPlayer function.
But if it wont work your map will desync (disconnect) players from your game.
So if GetLocalPlayer doesn't work you are out of luck.

But fog is graphical so GetLocalPlayer should be able, as any other thing that's graphical can be local.
Don't know how to use it? Don't worry, they are 2 lines of jass. Easy to use as custom scripts.

  • Actions
    • Custom script: if (GetLocalPlayer()==Player(0)) then
    • // Your actions for that player.
    • Custom script: endif
Just remember, 0 = player 1, 1 = player 2 as it's jass.
 
Status
Not open for further replies.
Top