Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
some help
#2
I just little bit drunken, but I hope I understood your question anyway.

You have to get the position where the village should be create! (Like: Nord-East(ne), Nord-West (nw), South-West (sw), South-East (se)).
So if you get this information you can create a random number for the X and Y coordinates.
For example you got a map with coords between -50|50.

So the Script would be like this one:
PHP Code:
$position $_GET['position'];

if(
$position == "ne")
   {
     
$x rand(050);
     
$y rand(050);
   }
   elseif(
$position == "nw")
   {
    
$x rand(-500);
    
$y rand(050);
   }
   elseif(
$position == "sw")
   {
    
$x rand(-500);
    
$y rand(0, -50);
   }
   elseif(
$position == "se")
   {
    
$x rand(050);
    
$y rand(0, -50);
   }
   else  
// If random position
   
{
    
$x rand(-5050);
    
$y rand(-5050);
   }

create_village($x$y); 

I hope, I could helped you :')

Sorry for bad english Big Grin

so far
Yannici
Manchmal denke ich:
Reply


Messages In This Thread
some help - by sinner - 02.07.2011, 00:42
RE: Game developing hotfix help - by Yannici - 02.07.2011, 01:52
RE: Game developing hotfix help - by Molt - 02.07.2011, 08:00
RE: Game developing hotfix help - by Yannici - 02.07.2011, 10:53
RE: Game developing hotfix help - by sinner - 02.07.2011, 10:30
RE: Game developing hotfix help - by Molt - 02.07.2011, 10:47



Users browsing this thread: 1 Guest(s)