| 07-05-2006, 05:00 PM | #1 |
I know, I easily can do this: Trigger: Visibility - Disable black mask JASS:call FogMaskEnableOff( ) But how do I have to set it up, if I want to make it with this trigger instead? JASS:function Trig_InitSicht_Actions takes nothing returns nothing local fogmodifier fog=CreateFogModifierRect(Player(0), FOG_OF_WAR_VISIBLE, bj_mapInitialPlayableArea,true,false) call FogModifierStart(fog) endfunction //=========================================================================== function InitTrig_InitSicht takes nothing returns nothing set gg_trg_InitSicht = CreateTrigger( ) call TriggerAddAction( gg_trg_InitSicht, function Trig_InitSicht_Actions ) endfunction All I always get is an almost complete visible map, but there still is a black edge at the top and right border... What is missing/wrong? |
| 07-05-2006, 05:04 PM | #2 |
That could be the part of the map that is the Camera Bounds. If you want to have your entire map visible, then set the camera bounds to equal the size of the map. |
| 07-05-2006, 05:10 PM | #3 |
Well, so I tried this, but it did not change anything: JASS:function Trig_InitSicht_Actions takes nothing returns nothing local fogmodifier fog=CreateFogModifierRect(Player(0), FOG_OF_WAR_VISIBLE, bj_mapInitialPlayableArea,true,false) call SetCameraBoundsToRectForPlayerBJ(Player(0),bj_mapInitialPlayableArea) call FogModifierStart(fog) endfunction //=========================================================================== function InitTrig_InitSicht takes nothing returns nothing set gg_trg_InitSicht = CreateTrigger( ) call TriggerAddAction( gg_trg_InitSicht, function Trig_InitSicht_Actions ) endfunction EDIT: This also does not work, what can I do? JASS:function Trig_InitSicht_Actions takes nothing returns nothing local fogmodifier fog=CreateFogModifierRect(Player(0), FOG_OF_WAR_VISIBLE, bj_mapInitialPlayableArea,true,false) call SetCameraBoundsToRect(bj_mapInitialPlayableArea) call FogModifierStart(fog) endfunction //=========================================================================== function InitTrig_InitSicht takes nothing returns nothing set gg_trg_InitSicht = CreateTrigger( ) call TriggerAddAction( gg_trg_InitSicht, function Trig_InitSicht_Actions ) endfunction ![]() |
| 07-05-2006, 05:19 PM | #4 |
Camera Bounds is not a trigger. In your World Editor it's under Scenario > Map Size and Camera Bounds |
| 07-05-2006, 05:22 PM | #5 |
Hmmm, that was actually apparent I thought... But, perhaps I have something wrong? 1) My map borders are 128x64 2) My cam borders are 128x64 3) ~"change cam borders" is checked Change here anything? Any suggestions for other possible reasons Undead_Lives? |
| 07-05-2006, 05:25 PM | #6 |
Nope, that was my only idea :P |
| 07-05-2006, 05:26 PM | #7 |
K, nevertheless, thx so far Undead_Lives! Please guys, still need help... |
| 07-05-2006, 05:37 PM | #8 |
It might sound stupid, but have you tried making visible an area larger than the map bounds? |
| 07-05-2006, 05:50 PM | #9 |
Hmmm, ok :) 1 unit from "map borders" are 128 units of WE coordiantes, that makes: 64 * 128 = 8.192; 8.192 / 2 = 4.096 128 * 128 = 16.384; 16.384 / 2 = 8.192 JASS:native Rect takes real minx, real miny, real maxx, real maxy returns rect Should I try this? JASS:local rect R=Rect(-8.192, -4.096, 8.192, 4.096) JASS:local rect R=Rect(-8.192-512, -4.096-512, 8.192+512, 4.096+512) EDIT: I tested this, but it made the rect smaller...? I thought -1-1=-2? JASS:function Trig_InitSicht_Actions takes nothing returns nothing local rect R=Rect(-8.192-512, -4.096-512, 8.192+512, 4.096+512) local fogmodifier fog=CreateFogModifierRect(Player(0),FOG_OF_WAR_VISIBLE,R,true,false) call SetCameraBoundsToRect(R) call FogModifierStart(fog) endfunction //=========================================================================== function InitTrig_InitSicht takes nothing returns nothing set gg_trg_InitSicht = CreateTrigger( ) call TriggerAddAction( gg_trg_InitSicht, function Trig_InitSicht_Actions ) endfunction EDIT2: Yeah, I realized and corrected rect -> Rect |
| 07-05-2006, 05:56 PM | #10 |
You should try using Rect() rather than rect() ;P Anyway, why not use GetMaxX(bj_mapInitialPlayableArea)+128.0 and such for the coordinates? |
| 07-05-2006, 06:10 PM | #11 |
So! Now, I tried this, but still no progress: JASS:function Trig_InitSicht_Actions takes nothing returns nothing local rect R=Rect(GetRectMinX(bj_mapInitialPlayableArea)-256,GetRectMinY(bj_mapInitialPlayableArea)-256,GetRectMaxX(bj_mapInitialPlayableArea)+256,GetRectMaxY(bj_mapInitialPlayableArea)+256) local fogmodifier fog=CreateFogModifierRect(Player(0),FOG_OF_WAR_VISIBLE,R,true,false) call SetCameraBoundsToRect(R) call FogModifierStart(fog) endfunction //=========================================================================== function InitTrig_InitSicht takes nothing returns nothing set gg_trg_InitSicht = CreateTrigger( ) call TriggerAddAction( gg_trg_InitSicht, function Trig_InitSicht_Actions ) endfunction Perhaps the call SetCameraBoundsToRect(R) must be changed to a localplayer refering command, I will try this too. But what to do next? I mean I just created a totally new map for testing this, with only this trigger inside it, but it won't work? hé? EDIT: I have to watch "LOST" now, but in arround 1 hour I'm back, hope you got it then Alevice ;) Nono, I'm very thankful for your help for now, but please go on... You can also try yourself... just creat a new map and paste this code in the trigger and you properly will get the same problem... Till then EDIT2: Back now. But I must go to bed now =) Cause my night ends at 5a.m. *grrr* Hope you will go on with helping me... |
| 07-05-2006, 07:59 PM | #12 |
I was debugging that, and guess what i found? bj_mapInitialPlayableArea Is not the full map size! It is off by what i estimate 64.00 units. Some how I can't seem to be able to assign a larger size than that to a rect, gah. It's that you'll have to use the natives. Will try later, I have to got to work. |
| 07-06-2006, 12:51 PM | #13 |
Ahh, home sweet home ![]() (back from work now) What natives do I have to use? I tried another native, but it also did not work: JASS:function Trig_InitSicht_Actions takes nothing returns nothing local rect R=Rect(GetRectMinX(bj_mapInitialPlayableArea)-2256,GetRectMinY(bj_mapInitialPlayableArea)-2256,GetRectMaxX(bj_mapInitialPlayableArea)+2256,GetRectMaxY(bj_mapInitialPlayableArea)+2256) if (GetLocalPlayer() == Player(0)) then call SetCameraBoundsToRect(R) endif call SetFogStateRect(Player(0),FOG_OF_WAR_VISIBLE,R,true) endfunction //=========================================================================== function InitTrig_InitSicht takes nothing returns nothing set gg_trg_InitSicht = CreateTrigger( ) call TriggerAddAction( gg_trg_InitSicht, function Trig_InitSicht_Actions ) endfunction |
| 07-06-2006, 02:03 PM | #14 |
JASS:loop exitwhen index > 11 set fog[index] = CreateFogModifierRadius(Player(index), FOG_OF_WAR_VISIBLE, 0, 0, 99999, true, false) call FogModifierStart(fog[index]) set index = index + 1 endloop This will remove the black mask from all areas of the map for all players. |
| 07-06-2006, 02:53 PM | #15 |
Did you test that trigger Rising_Dusk? I tried it with these commands, but it also did not work: JASS:function Trig_Unbezeichneter_Ausl__ser_001_Actions takes nothing returns nothing local integer index=0 local fogmodifier array fog loop exitwhen index > 11 set fog[index] = CreateFogModifierRadius(Player(index), FOG_OF_WAR_VISIBLE, 0, 0, 99999, true, false) call FogModifierStart(fog[index]) set index = index + 1 endloop endfunction //=========================================================================== function InitTrig_Test takes nothing returns nothing set gg_trg_Test = CreateTrigger( ) call TriggerAddAction( gg_trg_Test, function Trig_Unbezeichneter_Ausl__ser_001_Actions ) endfunction EDIT: Wew! W8! 1st progrss! After a wait-command it worked! I'm testing this now with the rect triggers... EDIT2: Hmmm... No, it seems it doesn't work with rect-triggers... Please Rising_Dusk, you have a clue? EDIT3: The Rect Visibility Modifiers seems to be bugged if used in that situation, but I can also do what I want with the Radius Visibility Modifier. So, my problem is solved, but the actualy problem still stays the same. |
