Creating fog for separate users

Status
Not open for further replies.
Level 30
Joined
Sep 30, 2008
Messages
1,459
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
 
it can be done in GUI too. ([Unit enters-leaves region] + [environment - set fog - reset for (for owner of triggering unit)]) etc
 
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.
 
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.
Back
Top