Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-05-2007, 07:06 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
findpathinarray

I'm pretty curious... could anyone explain this function and its parameters?

Quote:
findpathinarray(obj, obj, obj, obj, obj, int, int, int) - returns object - simple pathfinding; parameters are a two-dimensional array ('tiles'):
tiles were we are allowed to walk
tiles where we are not allowed to walk
tiles where we may stop
tiles where we should not stop
start x and y
maximum path length
Reply With Quote
  #2  
Old 12-05-2007, 07:20 AM
Kyranki Kyranki is offline
Freelance Coder
Join Date: Aug 2007
Location: At the end of the rainbow, in the pot of gold.
Posts: 202
Kyranki is on a distinguished road
Send a message via AIM to Kyranki Send a message via MSN to Kyranki
I have never seen that before. o_O
__________________
Stan.
Reply With Quote
  #3  
Old 12-05-2007, 04:17 PM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
o_o
woah...
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #4  
Old 12-05-2007, 06:43 PM
Novo Novo is offline
[TServerDeveloper]
Join Date: Jun 2006
Posts: 448
Novo will become famous soon enough
Umm... Well, I get the syntax and all... But... How do we decide the final destination? Doesn't make sense.
Reply With Quote
  #5  
Old 12-05-2007, 07:31 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by Novo View Post
Umm... Well, I get the syntax and all... But... How do we decide the final destination? Doesn't make sense.
"tiles where we may stop" <-- Those tiles maybe?
Reply With Quote
  #6  
Old 12-06-2007, 12:10 AM
Novo Novo is offline
[TServerDeveloper]
Join Date: Jun 2006
Posts: 448
Novo will become famous soon enough
Quote:
Originally Posted by Crow View Post
"tiles where we may stop" <-- Those tiles maybe?
If such is true... Then...

PHP Code:
allowedToWalk = new[level.width][level.height];
notAllowedToWalk = new[level.width][level.height];
allowedToStop = new[level.width][level.height];
tileShouldNotStop = new[level.width][level.height];
tileShouldStop = new[level.width][level.height];
tileShouldStopdest.xdest.] = 1;
for ( (
every tile in level) as tile)
  {
    
allowedToWalktile.xtile.] = !onwalltile.xtile.);
    
notAllowedToWalktile.xtile.] = onwalltile.xtile.); // Eh? Isn't this implicit from the last param?
    
tileShouldNotStoptile.xtile.] = !tileShouldStop[tile.xtile.y]; // Implicit?
  
}

findpathinarray(allowedToWalknotAllowedToWalktileShouldStoptileShouldNotStopIdontKnowstartXstartY100); 
That would be my best guess at the syntax. Though, I have done zero attempt to confirm this, and there is a Parameter that I am unsure about. ( This is pseudo-code. )
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 05:37 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.