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
  #31  
Old 08-05-2003, 01:59 AM
Soul-Blade Soul-Blade is offline
US Marine
Soul-Blade's Avatar
Join Date: Jul 2001
Location: Coeur d'Alene, ID
Posts: 945
Soul-Blade is an unknown quantity at this point
Send a message via AIM to Soul-Blade
Quote:
Originally posted by Kaimetsu


Making one NPC per node is not necessarily the best way. My system holds them all in an array.
Using a array could get enourmously annoying, I think a NPC would be the best way personally. I mean, graal handles NPCs with no script rather nicely.
Reply With Quote
  #32  
Old 08-05-2003, 02:49 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Quote:
Originally posted by Soul-Blade
Using a array could get enourmously annoying, I think a NPC would be the best way personally. I mean, graal handles NPCs with no script rather nicely.
Okay, let's say you use independent NPCs to represent the nodes. How are you going to pathfind through them? Before you start applying the algorithm, you need to know the positions of every node in the web, and details on how they interlink. How will you represent that?
__________________
Reply With Quote
  #33  
Old 08-05-2003, 07:07 AM
Angel Angel is offline
Registered User
Join Date: Dec 2002
Posts: 562
Angel is on a distinguished road
Send a message via AIM to Angel
Do what G2k1 did for railroad tracks lol. and whatever Soul Blade said is false graal wont handle a npc with nothing in it. It will just go bye bye when you come to execute it on a server. You need to define something like a string (setstring this.realnpc,true then use say save[] and then the pathfinding npc can easy find each of the nodes in order.
Reply With Quote
  #34  
Old 08-05-2003, 07:13 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
It will not work, I tell you.
__________________
Reply With Quote
  #35  
Old 08-05-2003, 08:44 AM
Soul-Blade Soul-Blade is offline
US Marine
Soul-Blade's Avatar
Join Date: Jul 2001
Location: Coeur d'Alene, ID
Posts: 945
Soul-Blade is an unknown quantity at this point
Send a message via AIM to Soul-Blade
Quote:
Originally posted by Kaimetsu
It will not work, I tell you.
Well, when I get back from camping next week, I will show what I am working on.

It will work, I can promise you that...you'll see. The way I plan on making it work, it would probably be easy to use an array as well as NPCs.

No time to explain, need to sleep.
Reply With Quote
  #36  
Old 08-05-2003, 05:21 PM
adam adam is offline
http://wiki.graal.us/
adam's Avatar
Join Date: Nov 2001
Posts: 2,247
adam has a spectacular aura aboutadam has a spectacular aura about
Send a message via AIM to adam
I'm thinking, positiong the path nodes with npc's and use another npc to store them in an array and gather info on which one's are connected to which.
__________________
Rogue Shadow (TCN)(NAT)(Global Development Team)

For development help, contact the patrons of the #graaldt irc channel below, I am usually there.
Click Here to Join IRC Chat Now! -- irc.freenode.net Channel: #graaldt
Quote:
<Dustyshouri> no, RogueShadow is always talking about scripts lol
<Dustyshouri> in fact, he pretty much brought Graal back as a topic single-handedly
Reply With Quote
  #37  
Old 08-05-2003, 08:46 PM
Dach Dach is offline
call me Chad, it's cooler
Dach's Avatar
Join Date: Aug 2002
Posts: 1,899
Dach is on a distinguished road
Um, whether you like it or not, the easiest thing to do would be what Kai is saying
__________________
Scripting Documents:Old Script Documentation-Movement Tutorial
Reply With Quote
  #38  
Old 08-05-2003, 11:28 PM
adam adam is offline
http://wiki.graal.us/
adam's Avatar
Join Date: Nov 2001
Posts: 2,247
adam has a spectacular aura aboutadam has a spectacular aura about
Send a message via AIM to adam
Quote:
Originally posted by Dach
Um, whether you like it or not, the easiest thing to do would be what Kai is saying
Depends on if you want lazy people who can't even write a sign script to be able to set the nodes in a level or not?
__________________
Rogue Shadow (TCN)(NAT)(Global Development Team)

For development help, contact the patrons of the #graaldt irc channel below, I am usually there.
Click Here to Join IRC Chat Now! -- irc.freenode.net Channel: #graaldt
Quote:
<Dustyshouri> no, RogueShadow is always talking about scripts lol
<Dustyshouri> in fact, he pretty much brought Graal back as a topic single-handedly
Reply With Quote
  #39  
Old 08-06-2003, 08:42 AM
Projectshifter Projectshifter is offline
The David
Projectshifter's Avatar
Join Date: Apr 2002
Location: USA
Posts: 912
Projectshifter is an unknown quantity at this point
Send a message via ICQ to Projectshifter Send a message via AIM to Projectshifter Send a message via MSN to Projectshifter Send a message via Yahoo to Projectshifter
Quote:
Originally posted by Soul-Blade
Using a array could get enourmously annoying, I think a NPC would be the best way personally. I mean, graal handles NPCs with no script rather nicely.
Arrays are generally the best way to store strings of numbers. It is not practical for HUGE amounts of data that YOU input, but as long as the NPC is handling it, then arrays are generally the best way. You can always do a simple 'for' loop and have it do something such as:
NPC Code:
for (i=0; i<arraylen(var); i++)


Have it check all the coords, for example this.x and this.y as arrays. I still don't understand HOW the nodes are supposed to work, perhaps if it was explained in depth then I could be more helpful.
---Shifter
__________________
Who has time for life these days?
Reply With Quote
  #40  
Old 08-06-2003, 09:36 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Quote:
Originally posted by Projectshifter
I still don't understand HOW the nodes are supposed to work, perhaps if it was explained in depth then I could be more helpful.
---Shifter
Define nodes.
Define links between the nodes.
Let the NPC figure out the way from A to B, following the desired links.

See diagram.
Attached Thumbnails
Click image for larger version

Name:	nodes.png
Views:	208
Size:	10.9 KB
ID:	24776  
__________________
Reply With Quote
  #41  
Old 08-06-2003, 11:19 AM
Projectshifter Projectshifter is offline
The David
Projectshifter's Avatar
Join Date: Apr 2002
Location: USA
Posts: 912
Projectshifter is an unknown quantity at this point
Send a message via ICQ to Projectshifter Send a message via AIM to Projectshifter Send a message via MSN to Projectshifter Send a message via Yahoo to Projectshifter
I understand the rough concept of WHAT a node is I suppose, but more as how opposed to HOW they work. Isn't it they have built-in pre-defined paths to detect the best movement paths? I just don't get how they interact and read from eachother.
---Shifter
__________________
Who has time for life these days?
Reply With Quote
  #42  
Old 08-06-2003, 11:26 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Quote:
Originally posted by Projectshifter
I understand the rough concept of WHAT a node is I suppose, but more as how opposed to HOW they work. Isn't it they have built-in pre-defined paths to detect the best movement paths? I just don't get how they interact and read from eachother.
---Shifter
In the system I describe, a node is just two numbers (x and y coords) with information about the other nodes to which it links. They don't interact with anything, they merely specify waypoints that the NPC can use in going from A to B. There are no predefined paths, the NPC chooses which links to follow.
__________________
Reply With Quote
  #43  
Old 08-06-2003, 11:28 AM
Projectshifter Projectshifter is offline
The David
Projectshifter's Avatar
Join Date: Apr 2002
Location: USA
Posts: 912
Projectshifter is an unknown quantity at this point
Send a message via ICQ to Projectshifter Send a message via AIM to Projectshifter Send a message via MSN to Projectshifter Send a message via Yahoo to Projectshifter
OH!. So instead of looking for ALL points across the entire level(s), it finds the best NODE system to follow, and THEN calculates the path based on those nodes???
---Shifter
__________________
Who has time for life these days?
Reply With Quote
  #44  
Old 08-06-2003, 11:37 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Quote:
Originally posted by Projectshifter
OH!. So instead of looking for ALL points across the entire level(s), it finds the best NODE system to follow, and THEN calculates the path based on those nodes???
---Shifter
Eh, pretty much. Its path is defined in nodes, not tiles.
__________________
Reply With Quote
  #45  
Old 08-06-2003, 11:41 AM
Projectshifter Projectshifter is offline
The David
Projectshifter's Avatar
Join Date: Apr 2002
Location: USA
Posts: 912
Projectshifter is an unknown quantity at this point
Send a message via ICQ to Projectshifter Send a message via AIM to Projectshifter Send a message via MSN to Projectshifter Send a message via Yahoo to Projectshifter
So the nodes are just placed in walkable places around levels? All they do is limit the search of the best path then? LOL, I thought the node held strings and arrays!
---Shifter
__________________
Who has time for life these days?
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 02:37 AM.


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