Login    Forum    Search    FAQ

Board index » Scenarios & Scripting




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Setting starting region
 Post Posted: Sun Apr 11, 2010 5:45 am 
Offline

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


Top 
 Profile  
 
 Post subject: Re: Setting starting region
 Post Posted: Sun Apr 11, 2010 3:51 pm 
Offline

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?


Top 
 Profile  
 
 Post subject: Re: Setting starting region
 Post Posted: Sun Apr 18, 2010 6:05 am 
Offline

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.


Top 
 Profile  
 
 Post subject: Re: Setting starting region
 Post Posted: Sun Apr 18, 2010 11:25 am 
Offline

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


Top 
 Profile  
 
 Post subject: Re: Setting starting region
 Post Posted: Sun Apr 18, 2010 8:15 pm 
Offline

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!


Top 
 Profile  
 
 Post subject: Re: Setting starting region
 Post Posted: Fri Apr 23, 2010 4:57 pm 
Offline

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.


Top 
 Profile  
 
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 6 posts ] 

Board index » Scenarios & Scripting


Who is online

Users browsing this forum: No registered users and 1 guest

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron