Author |
Message |
jed
|
Post subject: Setting starting region Posted: Sun Apr 11, 2010 5:45 am |
|
Joined: Tue Jan 08, 2008 2:07 am Posts: 1045
|
You can now set the region where people start from. This will give you a small starting region in the corner:
void afterStart() { Player gHumanPlayer=getHumanPlayer(0); fogMap(); lightFog(gHumanPlayer,0,0,1,2); }
|
|
|
|
|
Zblader
|
Post subject: Re: Setting starting region Posted: Sun Apr 11, 2010 3:51 pm |
|
Joined: Thu Nov 26, 2009 4:10 am Posts: 829
|
Wait, so the second to last line sets some coordinates, and then every space in between them is revealed and then fogged?
|
|
|
|
|
Psyclone
|
Post subject: Re: Setting starting region Posted: Sun Apr 18, 2010 6:05 am |
|
Joined: Thu Jan 07, 2010 10:41 pm Posts: 83
|
How does "lightFog(gHumanPlayer,0,0,1,2);" work? What are the parameters? I've tried messing around with different values, but the light fog shows in the same places.
|
|
|
|
|
jed
|
Post subject: Re: Setting starting region Posted: Sun Apr 18, 2010 11:25 am |
|
Joined: Tue Jan 08, 2008 2:07 am Posts: 1045
|
You probably need both of these:
void fogMap(); // All spaces are returned to deep fog for all players
void lightFog(Player player,int x1 ,int y1,int x2,int y2); // sets the a range of spaces to light fog. A box from x1,y1 to x2,y2 // wont have any effect if called in configGame or beforeStart
|
|
|
|
|
Psyclone
|
Post subject: Re: Setting starting region Posted: Sun Apr 18, 2010 8:15 pm |
|
Joined: Thu Jan 07, 2010 10:41 pm Posts: 83
|
jed wrote: You probably need both of these:
void fogMap(); // All spaces are returned to deep fog for all players
void lightFog(Player player,int x1 ,int y1,int x2,int y2); // sets the a range of spaces to light fog. A box from x1,y1 to x2,y2 // wont have any effect if called in configGame or beforeStart Ahh... there's my problem then. I was doing it in beforeStart. Thanks!
|
|
|
|
|
jed
|
Post subject: Re: Setting starting region Posted: Fri Apr 23, 2010 4:57 pm |
|
Joined: Tue Jan 08, 2008 2:07 am Posts: 1045
|
Ok this works now. but I had to make a new hook function so you should do your fogging in: bool duringStart()
and just return false if you don't want the normal fog.
|
|
|
|
|
|