Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (NewbieZorro, TipmyPip, 1 invisible), 19,045 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
How to create Paths with WED #236346
11/13/08 18:26
11/13/08 18:26
Joined: May 2006
Posts: 53
Puerto Rico
monchito Offline OP
Junior Member
monchito  Offline OP
Junior Member

Joined: May 2006
Posts: 53
Puerto Rico
Hi:
i want to know is a tutorial is available for the path creation in WED. How do i select one edge, edit etc. Every time i try a
bunch of edges are created non intentionally on the wrong nodes.
I know, i know...more practice. cry and a good tutorial.grin
How do i create programatically?... if possible, like 'create path node' or something.I know the coords that i want, how do i insert the nodes with my coords.
Actually i load the positions into an array and read the position as the entity walk, scan the area while walking, attack if near player and return to the next node. At the last node, reverse the path. If another entity in same path, adjust pan...let it pass...etc It works ok but i want to use the path in WED.
Any help is welcome

Re: How to create Paths with WED [Re: monchito] #236357
11/13/08 19:19
11/13/08 19:19
Joined: Nov 2007
Posts: 1,032
Croatia
croman Offline
Serious User
croman  Offline
Serious User

Joined: Nov 2007
Posts: 1,032
Croatia
try with this: http://www.coniserver.net/coni_users/web_users/pirvu/au/tutorials/zipped/pathfinding.zip i know it's old but still maybe it can be of some use for you.

you could also try to see if there is some tutorial on 3dgsuv.com


but as long as i remember i havent seen any real tutorial on managing paths in WED



Ubi bene, ibi Patria.
Re: How to create Paths with WED [Re: croman] #236380
11/13/08 20:46
11/13/08 20:46
Joined: May 2006
Posts: 53
Puerto Rico
monchito Offline OP
Junior Member
monchito  Offline OP
Junior Member

Joined: May 2006
Posts: 53
Puerto Rico
Thanks...
Works ok.

Re: How to create Paths with WED [Re: monchito] #237307
11/19/08 15:30
11/19/08 15:30
Joined: Sep 2008
Posts: 9
S
Staakman Offline
Newbie
Staakman  Offline
Newbie
S

Joined: Sep 2008
Posts: 9
Current Code:

///////////////////////////////////////////////////////////////
Quote:
#define false 0
#define true 1

/////////////////////
// local variables //
/////////////////////

var CurrentNode = 1; /* CurrentNode */ //current node
var NodeSkills[6]; /* NodeSkills */ //to store node skills
var NodeArray[100]; /* NodeArray */ //array for target nodes
var NodeAI = 0; /* NodeAI */ //índice for target nodes
var NodeAC = 0; /* NodeAC */ //counter for target nodes
var NodeAmount = 0; /* NodeAmount */ //number of nodes
var NodeCounter = 0; /* NodeCounter */ //counter for general use
var Nodelabels[100]; /* Nodelabels */ //array for node labels
var NodeTI = 0; /* NodeTI */ //índice for node labels
var NodeOrder[100]; /* NodeOrder */ //path order
var NodeOI = 0; /* NodeOI */ //índice for path order
var Fila[100]; /* Fila */ //FIFO array
var FilaI = 0; /* FilaI */ //índice for FIFO
var FilaC = 0; /* FilaC */ //counter for FIFO
var Edges = 0; /* Edges */ //number of edges

function busca_limpa() //Empty all variables
{
NodeCounter = 0;
while (NodeCounter <= NodeAmount)
{
Fila[NodeCounter] = 0;
Nodelabels[NodeCounter] = NodeAmount;
NodeOrder[NodeCounter] = 0;
NodeCounter += 1;
}
FilaI = 0;
FilaC = 0;
NodeCounter = 0;
NodeTI = 0;
NodeOI = 0;
}

function busca_largura(v) //label node v with 1 and put on the FIFO
{
Edges = 1;
while (Edges != 0)
{
CurrentNode = path_nextnode(my,v,Edges);
if (CurrentNode == 0)
{
Edges = 0;
}
else
{
if (Nodelabels[CurrentNode] > Nodelabels[v])
{
Nodelabels[CurrentNode] = Nodelabels[v] + 1;
FilaC += 1;
Fila[FilaC] = CurrentNode;
}
Edges += 1;
}
}
}

function busca_ordena() //feed an array with the order of the nodes that will be covered.
{
NodeAI = random(NodeAC); // int(random(NodeAC));
NodeOI = Nodelabels[NodeArray[NodeAI]];
NodeOrder[NodeOI] = NodeArray[NodeAI];
while (NodeOI > 1)
{
Edges = 1;
CurrentNode = 1;
while (CurrentNode != 0)
{
CurrentNode = path_nextnode(my,NodeOrder[NodeOI],Edges);
if (CurrentNode != 0 && (Nodelabels[CurrentNode] < NodeOI))
{
NodeOI -= 1;
NodeOrder[NodeOI] = CurrentNode;
CurrentNode = 0;
}
Edges +=1;
}
}
NodeOI = 1;
CurrentNode = NodeOrder[NodeOI];
}

function busca(w) //Set all nodes not marked and set all nodes with infinity value
{
busca_limpa();
Fila[FilaI] = w;
Nodelabels[w] = 1;
while (Fila[FilaI] != 0)
{
busca_largura(Fila[FilaI]);
FilaI += 1;
}
busca_ordena();
}

function busca_alvo(tipo) //function search the path entity and verifies which nodes is of a specific type (type = tipo)
{
NodeCounter = 0;
NodeAI = 0;
while (NodeCounter < 100)
{
NodeArray[NodeCounter] = 0;
NodeCounter += 1;
}
NodeCounter = 1;
while (NodeCounter <= NodeAmount)
{
path_getnode(my,NodeCounter,vector,NodeSkills);
//path_nodeskills(my,NodeCounter,NodeSkills);
if(NodeSkills[0] == tipo)
{
NodeArray[NodeAI] = NodeCounter;
NodeAI +=1;
}
NodeCounter += 1;
}
NodeAC = NodeAI;
NodeAI = 0;
NodeCounter = 0;
}
///////////////////////////////////////////////////////////////

But how do I use this?!?

How do I use this peace of code to let an object follow a path in A7 with Lite-C? (doesn't give any bugs yet).

Last edited by Staakman; 11/19/08 15:32.
Re: How to create Paths with WED [Re: Staakman] #237315
11/19/08 16:26
11/19/08 16:26
Joined: Oct 2004
Posts: 1,655
T
testDummy Offline
Serious User
testDummy  Offline
Serious User
T

Joined: Oct 2004
Posts: 1,655
That sample resembles material related to:
BSF_FourX
Path-Finding using Breadth First Search Algorithm
ROGERIO DE LEON PEREIRA
joshua@fourx.com.br

Conversion of an alternate BSF (Breadth Search First) sample here to Lite-C, should be fairly easy.
Of course, such tasks are better left to those with more interest in Lite-C conversions.


Re: How to create Paths with WED [Re: testDummy] #237320
11/19/08 16:45
11/19/08 16:45
Joined: Oct 2008
Posts: 218
Nashua NH
heinekenbottle Offline
Member
heinekenbottle  Offline
Member

Joined: Oct 2008
Posts: 218
Nashua NH
A* tutorial

This is a tutorial for A* pathfinding that I found somewhere around here. Its in C-Script but perhaps you can translate it into Lite-C. Its from A5.20 but I think it can be translated.


I was once Anonymous_Alcoholic.

Code Breakpoint;
Re: How to create Paths with WED [Re: heinekenbottle] #237334
11/19/08 17:43
11/19/08 17:43
Joined: Jul 2008
Posts: 2,110
Germany
rayp Offline

X
rayp  Offline

X

Joined: Jul 2008
Posts: 2,110
Germany
I was wondering the same think...implementation ok...but how to assign it to
my entity ?
Ive tryed it but my entity wont follow...


Acknex umgibt uns...zwischen Dir, mir, dem Stein dort...
"Hey Griswold ... where u gonna put a tree that big ?"
1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected
rayp.flags |= UNTOUCHABLE;
Re: How to create Paths with WED [Re: rayp] #237898
11/23/08 11:11
11/23/08 11:11
Joined: Sep 2008
Posts: 9
S
Staakman Offline
Newbie
Staakman  Offline
Newbie
S

Joined: Sep 2008
Posts: 9
Anyone able to help us out here?

Thanks in advance,
Thista_@hotmail.com


Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1