theFarWilds.com
http://thefarwilds.com/forum/

Setting starting region
http://thefarwilds.com/forum/viewtopic.php?f=14&t=1849
Page 1 of 1

Author:  jed [ Sun Apr 11, 2010 5:45 am ]
Post subject:  Setting starting region

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);
}

Author:  Zblader [ Sun Apr 11, 2010 3:51 pm ]
Post subject:  Re: Setting starting region

Wait, so the second to last line sets some coordinates, and then every space in between them is revealed and then fogged?

Author:  Psyclone [ Sun Apr 18, 2010 6:05 am ]
Post subject:  Re: Setting starting region

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.

Author:  jed [ Sun Apr 18, 2010 11:25 am ]
Post subject:  Re: Setting starting region

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

Author:  Psyclone [ Sun Apr 18, 2010 8:15 pm ]
Post subject:  Re: Setting starting region

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!

Author:  jed [ Fri Apr 23, 2010 4:57 pm ]
Post subject:  Re: Setting starting region

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.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/